Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FRx + PDF in single print job
Message
From
07/02/2012 01:15:09
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01534180
Message ID:
01534644
Views:
130
>>>Hi All,
>>>
>>>I am trying to come up with a method whereby I can print a VFP report and 1 to many PDFs within a single print job. I wish to do this so as to be able to have the printer staple all of the pages together.
>>>
>>>I imagine that I can probably find a pdf creation tool (a pdf printer I can print to) that can achieve this but is there a cleverer way using NOPAGEJECT and then outputting the pdfs to the print job, also without ending the print job (until the last pdf).
>>>
>>>I want to avoid having to output the VFP report to PDF as it has trutype barcodes on it and they don't scan when converted to pdf.
>>>
>>>Cheers,
>>>Jamie
>>
>>Hi Jamie,
>>
>>Check FoxyPreviewer
>>The usage for your purpose is realy very simple:
>>
>>
>>* Create a PDF file merging reports, without preview
>>LOCAL loReport AS "PreviewHelper" OF "FoxyPreviewer.App" 
>>loReport = CREATEOBJECT("PreviewHelper") 
>>loReport.AddReport(_Samples + "\Solution\Reports\colors.frx", "FOR Client = 'VFPx' ") &&' FRX File, Clauses 
>>loReport.AddReport(_Samples + "\Solution\Reports\Precent.frx") &&' FRX File, Clauses 
>>loReport.cDestFile = "c:\my1stSample.PDF"
>>loReport.RunReport() 
>>
>>
>>All you need to do is to distribute one single file, FOXYPREVIEWER.APP
>>
>>If you need to export just one FRX, it's even simpler:
>>
>>
>>DO FOXYPREVIEWER.APP
>>REPORT FORM YourReport OBJECT TYPE 10 TO FILE "c:\my2ndSample.PDF"
>>
>>
>>That simple!
>>Please check the documentation for more options, etc
>>
>>HTH
>
>Hey Cesar,
>
>Thanks for the reply. I may not have explained myself clearly enough!
>
>I want to be able to output an FRX to printer (not PDF), followed by some pdfs to printer (not reports, just pdfs that are already created) AND have that all of happen in one print job.

Windows, rather than VFP, might be able to help you with that. You can set the output port of any Windows printer to FILE:, rather than LPT1, DOT001 etc. So, if you do a regular print to that printer, you get prompted for a file name, and the job is saved as that file.

In your case, maybe you would print one FRX job to a file FRX001.prn, and two PDF print jobs saved to PDF001.prn and PDF002.prn. Also, let's suppose the port of the actual printer is LPT1. You could then issue the following DOS/CMD prompt command to print all 3 as a single job:
COPY FRX001.prn+PDF001.prn+PDF002.prn LPT1 /b
REM The +'s concatenate the files, the /b means do a binary copy which will be required to work properly
There are probably much more elegant ways to use Windows API or some such to achieve the same thing but this gives the idea.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform