DCPS how not to preview in Acrobat
-
- Posts: 23
- Joined: Fri Apr 17, 2015 11:09 am
DCPS how not to preview in Acrobat
How can I save it to a PDF without previewing in Acrobat with the DCPS ?
-
- Posts: 36
- Joined: Thu Jan 28, 2010 2:30 pm
Re: DCPS how not to preview in Acrobat
Add a printer named "PDF-Document" to your Printer array, then chose this printer as target.bamunz@earthlink.net wrote:How can I save it to a PDF without previewing in Acrobat with the DCPS ?
Code: Select all
_p := "Test-File"
do case
case cPrinterName = "PDF-Document"
PSSetDevice(DEV_PDFFILE)
PSSetFileName(_p)
otherwise
PSSetPrinter(nPrinter)
endcase
PSBeginDoc(nPrinter, _p, APS_PORTRAIT, 1)
Best regards
Leon
Leon
-
- Posts: 23
- Joined: Fri Apr 17, 2015 11:09 am
Re: DCPS how not to preview in Acrobat
PSSetDevice(DEV_PDFFILE)
PSSetFileName("Test"+ ".pdf")
DCPS BEGINDOC TITLE "Sales Receipt" ORIENTATION 1 PAGESIZE DMPAPER_LETTER
@ 20, 8, 275, 210 DCPS FRAME THICKNESS 2 FILLCOLOR GRA_CLR_WHITE
@ 27 , 75 DCPS SAY " S A L E S R E C E I P T " FONT '16.Arial Bold'
@ 35 , 15 DCPS SAY 'SALES RECEIPT # ' FONT '8.Arial'
@ 35 , 175 DCPS SAY " Today's Date " FONT '8.Arial'
DCPS OFF
It displays it in acrobat which I would like to stop.
PSSetFileName("Test"+ ".pdf")
DCPS BEGINDOC TITLE "Sales Receipt" ORIENTATION 1 PAGESIZE DMPAPER_LETTER
@ 20, 8, 275, 210 DCPS FRAME THICKNESS 2 FILLCOLOR GRA_CLR_WHITE
@ 27 , 75 DCPS SAY " S A L E S R E C E I P T " FONT '16.Arial Bold'
@ 35 , 15 DCPS SAY 'SALES RECEIPT # ' FONT '8.Arial'
@ 35 , 175 DCPS SAY " Today's Date " FONT '8.Arial'
DCPS OFF
It displays it in acrobat which I would like to stop.
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: DCPS how not to preview in Acrobat
Hi,
just add one line at end of this function(located in dcps.prg) – works ok for me.
May be Roger can add any get/set function for enable/disable preview window.
FUNCTION DC_PsEndDoc()
LOCAL cFileName := PSSetFileName()
PsEndDoc()
IF !Empty(cFileName)
DC_SpawnUrl(cFileName)
ENDIF
PSSetFileName( ”” ) <- add this
RETURN nil
HTH
Zdeno
just add one line at end of this function(located in dcps.prg) – works ok for me.
May be Roger can add any get/set function for enable/disable preview window.
FUNCTION DC_PsEndDoc()
LOCAL cFileName := PSSetFileName()
PsEndDoc()
IF !Empty(cFileName)
DC_SpawnUrl(cFileName)
ENDIF
PSSetFileName( ”” ) <- add this
RETURN nil
HTH
Zdeno
-
- Posts: 23
- Joined: Fri Apr 17, 2015 11:09 am
Re: DCPS how not to preview in Acrobat
That worked thanks.