Printing to pdf with DCPRINTER and XbpPdf

This forum is for general support of Xbase++
Message
Author
jjelders
Posts: 9
Joined: Sun Jul 25, 2010 3:04 pm

Printing to pdf with DCPRINTER and XbpPdf

#1 Post 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.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Printing to pdf with DCPRINTER and XbpPdf

#2 Post by rdonnay »

I have never heard of XbpPdf.

Tell me more.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Printing to pdf with DCPRINTER and XbpPdf

#3 Post 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
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Printing to pdf with DCPRINTER and XbpPdf

#4 Post 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.
The eXpress train is coming - and it has more cars.

jjelders
Posts: 9
Joined: Sun Jul 25, 2010 3:04 pm

Re: Printing to pdf with DCPRINTER and XbpPdf

#5 Post 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.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Printing to pdf with DCPRINTER and XbpPdf

#6 Post by rdonnay »

Ok, I will look at XbpPdf.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Printing to pdf with DCPRINTER and XbpPdf

#7 Post 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?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Printing to pdf with DCPRINTER and XbpPdf

#8 Post 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?
Best regards,

Chris.
www.aboservice.be

jjelders
Posts: 9
Joined: Sun Jul 25, 2010 3:04 pm

Re: Printing to pdf with DCPRINTER and XbpPdf

#9 Post 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

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Printing to pdf with DCPRINTER and XbpPdf

#10 Post 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.
Best regards,

Chris.
www.aboservice.be

Post Reply