How to hide page numbers on Pdf

General TRichView support forum. Please post your questions here
Post Reply
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

How to hide page numbers on Pdf

Post by starhu »

Hello,

I exported ScaleRichview using Gnostice EdocEngine.

In the SRichViewEdit I set the pagenumbers to be hidden, however it can be seen in the generated Pdf.

Is this a ScaleRichview setting or EdocEngine setting?

In gtPDFEngine I set CalculateVariables := false and AutoPaginate := false ;

Thank you
Sergey Tkachenko
Site Admin
Posts: 17326
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

ScaleRichView exporter for eDocEngine was written by Gnostice, so I do not know its settings.
But it should call either DrawPage or DrawMetafile method of TSRichViewEdit.
Look what is passed to "PageNoVisible" parameter in this call (the 3d parameter from the end)
yagui
Posts: 6
Joined: Tue May 13, 2014 4:11 pm

Post by yagui »

Starhu: would you be able to hide the page number when generating the PDF file with Gnostice EdocEngine?
I have exactly the same problem.

Thanks and regards,
Martin
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Post by starhu »

Yagui:

This is the solution:


In unit gtScaleRichviewIntf
in method makepagemetafile change
ASRichViewEdit.DrawMetafile(PageNo, Result, True, True, False);
to
ASRichViewEdit.DrawMetafile(PageNo, Result,False, True, False);
yagui
Posts: 6
Joined: Tue May 13, 2014 4:11 pm

Post by yagui »

Thanks a lot Starhu!!!.

I went a little further and I've change the method invocation to:

Code: Select all

ASRichViewEdit.DrawMetafile(PageNo, Result,ASRichViewEdit.PageProperty.PageNoVisible,True,False);
so it uses the configuration defined in TSRichViewEdit object.

Thanks and regards,
Martin
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Post by starhu »

Martin:
You are welcome!

It was clever, what you did, I'm going to use this code myself, too.

Regards,

Zsolt
Sergey Tkachenko
Site Admin
Posts: 17326
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

A page-number field for insertion in headers and footers will be implemented in this month, so displaying them separately will be an obsolete feature.
yagui
Posts: 6
Joined: Tue May 13, 2014 4:11 pm

Post by yagui »

I'm still having problems generating PDF files. The botton margin from page 2 and the next pages is not taked into account. The botton margin for page 1 is ok, but in page 2, 3, 4, etc it writes text where it should be blank.

I've use the demo ScaleRichViewDemo.exe with my own RFT file (RTF created from ScaleRichView export option) and I've got the same wrong result, page 1 botton margin ok but the following pages not.

Starhu, did you have the same problem?.

Thanks and regards,
Martin
Post Reply