Page 1 of 1

DC_PRINTFILE to PDF and page number

Posted: Sat Oct 21, 2017 1:19 pm
by Victorio
Hi,

I am searching some solution for print page number , when print to PDF file.
I do not want use some third party sw, like pdftk, or some other, which need run with runshell.
I have TXT file and this file I print with function DC_PRINTFILE.
I need put to every page his number.

DCPRINT OPTIONS TO aOptions NAME 'RauknReport' ;
BUSYMESSAGE "Generujem tlačovú zostavu" ;
FORMSIZE XBPPRN_FORM_A4 ;
VIEWPORT 150,150,4750,6500 ; // toto je zhruba ok
MARGIN {-2,1} ; // prvé číslo horný okraj, druhé ľavý
TO aOptions
dcpstatus:=DC_PRINTFILE(suborptk2,.F.,"11.Courier New",aOptions)

RauknReport is "virtual printer" in profile PDF Creator.

I examine generate one file with only page numbers to PDF, and merge with PDF report, with PDFTK.EXE , works fine, but first must count pages in PDF file, and generate PDF file with page numbers, this need some time to processing...

Know you any simpliest way ?

Re: DC_PRINTFILE to PDF and page number

Posted: Sat Oct 21, 2017 2:03 pm
by Auge_Ohr
Victorio wrote:Know you any simpliest way ?
a PDF Printer just print what you send
so count/print your Pagenumber before send to PDR Printer.

Re: DC_PRINTFILE to PDF and page number

Posted: Sun Oct 22, 2017 10:25 am
by Victorio
yes, I know,
I mean, include for example to function DC_PRINTFILE some generate headers/or bottom with page number, when sending print to PDF Printer. I mean it is possible modify DC_PRINTFILE function to put printing of page number.

I can include page numbers and also End of page character to print report in TXT format before print, but sometimes is problem with printable rows on page on different printer. Now I have 66 rows, but I am not sure if this work on any type of printer with A4 format.