Printing to pdf with DCPRINTER and XbpPdf
Posted: Wed Feb 16, 2011 8:42 am
Is it possible to use XbpPdf in combination with the Express DCprint command?
Not as the giving example with the pdf-button in the preview window but directly.
In other words: I want to use the same Express code and redirect it to a pdf file.
IF lPreview
//aButtons := array(13)
//aButtons[DCPRINT_BUTTON_FIND] := {60,20,'PDF'}
DCPRINT ON SIZE 70,100 PREVIEW NOPRINTBUTTON TO oPrinter //BUTTONS aButtons TO oPrinter //PREVIEW NOPRINTBUTTON //BUTTONS aButtons //NOPRINTBUTTON
// oPrinter:=DC_printerObject()
// oPrinter:oFindButton:Activate:={||CreatePDF()}
ELSE
DCPRINT ON SIZE 70,100 TO oPrinter CANCELENABLE <- here I want to print directly to a pdf file instead of the printer without a preview.
ENDIF
I wrote this to Edgar Borger and he came with the following answer:
To create the PDF file via XbpPDF class, I need the dc_PrinterObject, that Express++ creates in a print job, and I only have access to this object in the preview window, so, no, it is not possible to do what you want, maybe if you talk to Roger he can give you some hint on how to do it, I will be happy to change my class if this is necessary, or if he provides a new solution for this problem.
Not as the giving example with the pdf-button in the preview window but directly.
In other words: I want to use the same Express code and redirect it to a pdf file.
IF lPreview
//aButtons := array(13)
//aButtons[DCPRINT_BUTTON_FIND] := {60,20,'PDF'}
DCPRINT ON SIZE 70,100 PREVIEW NOPRINTBUTTON TO oPrinter //BUTTONS aButtons TO oPrinter //PREVIEW NOPRINTBUTTON //BUTTONS aButtons //NOPRINTBUTTON
// oPrinter:=DC_printerObject()
// oPrinter:oFindButton:Activate:={||CreatePDF()}
ELSE
DCPRINT ON SIZE 70,100 TO oPrinter CANCELENABLE <- here I want to print directly to a pdf file instead of the printer without a preview.
ENDIF
I wrote this to Edgar Borger and he came with the following answer:
To create the PDF file via XbpPDF class, I need the dc_PrinterObject, that Express++ creates in a print job, and I only have access to this object in the preview window, so, no, it is not possible to do what you want, maybe if you talk to Roger he can give you some hint on how to do it, I will be happy to change my class if this is necessary, or if he provides a new solution for this problem.