Page 1 of 1

Print PDF file in background

Posted: Mon Dec 27, 2021 6:43 am
by Piotr D
Hi,
How can I print PDF file in background (without displaying its content)?

Regards
Piotr

Re: Print PDF file in background

Posted: Mon Dec 27, 2021 7:17 am
by Wolfgang Ciriack
Use the Microsoft Print to PDF printer:

Code: Select all

 DCPRINT ON NAME "Microsoft Print to PDF" ;
         TOFILE OUTFILE (<MyfileWithPath.pdf>) ;
 	 TO oPrinter ;
  	 SIZE .... ;
  	 FORMSIZE XBPPRN_FORM_A4 ;
	 TITLE ...

Re: Print PDF file in background

Posted: Mon Dec 27, 2021 11:30 am
by Piotr D
Wolfgang,
I am concerned with printing PDF files already existing on disk.
Piotr

Re: Print PDF file in background

Posted: Mon Dec 27, 2021 2:39 pm
by Wolfgang Ciriack
So you can try (from german newsgroup):

Code: Select all

lSuccess := ShellExecute( 0, ;
                             "print", ;  
                             cPath + cFILE, ;
                             cPara, ;
                             cHome, ;
                             SW_HIDE)

Re: Print PDF file in background

Posted: Sun Jan 02, 2022 9:47 am
by Piotr D
Wolfgang,
thanks for the idea, i'll try. But isn't "print" just for printing txt files?

Piotr