Page 1 of 2

Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 8:42 am
by jjelders
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.

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 9:12 am
by rdonnay
I have never heard of XbpPdf.

Tell me more.

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 9:20 am
by Tom
XbpPdf is a PDF creation class Edgar Borger (from Brazil, afaik) wrote. As I heard, this is handy, but not very fast - and it has a reduced functionality compared to similar tools.

http://borger.com.br/Softsupply/PDF/Xbppdf.htm

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 11:00 am
by rdonnay
I don't mind working directly with XbpPdf if I can get a copy.

Currently, I use the Win2Pdf driver or the BullZip driver to print to PDFs.

Have you looked at this possiblity?

It requires no code changes.

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 2:52 pm
by jjelders
There is a free download from the site http://borger.com.br/Softsupply/PDF/Xbppdf.htm.
This is a full version to test. The only thing is that it prints the text "DEMO" in all pdf's until you buy the "keycode".

Yes, I tried the Bullzip driver.
My problem is that I am not allowed to install drivers on the machines my programm is running on.
I have to do it all from within Xbase.

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 5:19 pm
by rdonnay
Ok, I will look at XbpPdf.

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Wed Feb 16, 2011 6:05 pm
by rdonnay
This looks like a complicated solution.

How is it that you are wanting XbpPdf and eXpress++ to be integrated?

What do you expect the user interface to be?

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Thu Feb 17, 2011 6:20 am
by skiman
Hi,

As far as I know, it is possible to use Edgars PDF class from the preview window.

Code: Select all

/ oPrinter:=DC_printerObject()
oPrinter:oFindButton:Activate:={||CreatePDF()}
I suppose that at this moment the printer-object is passed to that class? So maybe it is possible to create the printerobject as the preview WITHOUT showing it, and passing it afterwards to that class?

This way there wouldn't be any modification for the DCPRINT commands?

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Fri Feb 18, 2011 9:29 am
by jjelders
Yes, skiman, that would be a solution.
But how can I make the previewwindow invisible?

Integration into dcprint could be:
DCPRINT ON SIZE 70,100 TO oPrinter PDFFILE <pdf-filename>
No userinterface needed; only create a pdffile

Re: Printing to pdf with DCPRINTER and XbpPdf

Posted: Fri Feb 18, 2011 9:43 am
by skiman
Hi,

My suggestion was for Roger. Maybe it was an idea that could help to implement this pdf class without a lot of coding.