Question Ways to merge PDF and text to print as one job

LBaliao

Member
Hello.

Looking for ideas. I currently have a text file that I am importing and sending to the printer. However, I want to insert a PDF in the middle of the text file and be able to print them both as one print job. The PDF can have image so I can't just extract text from PDF to merge. I have limited version of QuickPdf.

Thanks in advance for tips.

Liza
 
Hi
I'd do it using pdfInclude (but being the maintainer of it, I'm a little bit biaised ;)) i.e. I would generate a pdf file with everything merged correctly together then send it to the printer.
Would give you full control and full ABL...
Regards
JC
 

LBaliao

Member
Hi
I'd do it using pdfInclude (but being the maintainer of it, I'm a little bit biaised ;)) i.e. I would generate a pdf file with everything merged correctly together then send it to the printer.
Would give you full control and full ABL...
Regards
JC

Hi Jean. Yes, I offered the same solution of creating a new PDF and merging both text and content of PDF into one but it's not feasible at this time. I read much of the pdfInclude from www.oehive.org and wonder if I missed a command to convert an existing one page PDF to an image file such as jpeg or bmp. I'd appreciate if you can spare some time again to respond. Thank you!
 

LBaliao

Member
Hi Liza
You have the doc here: http://www.snowwolf-software.com/pdfinclude/readme.pdf
pdfInclude cannot convert a pdf file to any image format.
Why "creating a new PDF and merging both text and content of PDF into one (is) not feasible at this time"?
May be I'd need more detail in order to better understand, as for now I don't see why this would be impossible.
Regards
JC

Hi Jean. Thanks again. I will review the document from the link you provided. We have to rewrite an entire module to go the route of new PDF combining existing text and PDF file into one print job. My next best bet is to be able to convert PDF file to image.

Best,
Liza
 
Hi Liza
If I understand correctly you have an existing system producing a kind of text report, and you want to append to this report an existing pdf file? and may be append more text pages after? Do you also need to alter the existing pdf?
This is definitely something where pdfInclude could help; it can of course create a new pdf file based on any existing text file, and include any existing pdf. I can explain how if you confirm I understood correctly.
I already did some "filters" using pdfInclude, in order to enhance existing text reports, which take as input an existing report and output them as a pdf file, adding a logo and transforming the "ascii art" lines into real lines for example. These filters can also change the font (e.g. bold, italics) based on some rules you define. Such a filter could also add an existing pdf file into the result, no problem.
At the end the generated pdf file will be sent to the printer, as one and only one print job.
Regards
JC
 

LBaliao

Member
Hi JC.

Sorry for my delayed response. I am going to list below the process. The thing is I cannot create a new PDF file and send the PDF to printer. It will require rewrite of the whole print engine of the existing module. In addition, we have to be able to handle restarts when it jams, figure out which tray to use, etc.

1. Open a print job.
2. Open text file.
3. Import line per line from text file and output to printer.
4. In the middle of the text file or after matching string or x number of lines imported, print the content of the PDF file (no alteration) to the same print job.
5. Complete printing text file.
6. Close print job.

Another option is to convert PDF to image as images are already handled by our print engine.

I so appreciate your help.

Thanks again.
Liza
 
Top