Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

foxpro to pdf

Cybermens

Programmer
Mar 25, 2025
21
I am using win2pdf to create pdf from a report generated on foxpro fos dos. Win2pdf can automatically save as pdf without the user giving a filename. Now i want to get this thing one step ahead. I want the pdf filename to be based on one of the fields results of that report automatically.
 
I understand you were getting both Win10 32bit and DOSBO-X working. I also understand you previously were already using your applicaiton under XP. How were and are you printing? FRX, Using ?? or @say?

If you're going the DOSBOX-X route you have a lot of options:

If you're going the Windows10 32bit route, I assume you can make use of the Windows printers, though was 2.6 actually allowing SET PRINTER TO NAME <<Windowsprintername>> and printing in the Windows environment? The DOSBOX-X documentation suggest you'd be printing to a port and need to use some third party solution among possibly other things to route output to LPT1 or others to a printer.

You're not very communicative about what you already have and do, but I guess one option always will apply to the solution you have at hand already: Rename the PDF file you generate now, yourself, from VFP. COPY FILE original.pdf TO yourname.pdf is clearly the simplest you can do as aftermath.

I guess the problem is to get out what is printed "based on one of the fields results of that report". Again, more details, please. You can't expect us mind reading.
 
Last edited:
I understand you were getting both Win10 32bit and DOSBO-X working. I also understand you previously were already using your applicaiton under XP. How were and are you printing? FRX, Using ?? or @say?

If you're going the DOSBOX-X route you have a lot of options:

If you're going the Windows10 32bit route, I assume you can make use of the Windows printers, though was 2.6 actually allowing SET PRINTER TO NAME <<Windowsprintername>> and printing in the Windows environment? The DOSBOX-X documentation suggest you'd be printing to a port and need to use some third party solution among possibly other things to route output to LPT1 or others to a printer.

You're not very communicative about what you already have and do, but I guess one option always will apply to the solution you have at hand already: Rename the PDF file you generate now, yourself, from VFP. COPY FILE original.pdf TO yourname.pdf is clearly the simplest you can do as aftermath.

I guess the problem is to get out what is printed "based on one of the fields results of that report". Again, more details, please. You can't expect us mind reading.
see the crm is for a courier company. they fill a form which starts with airway bill number , address etc etc, in the end either hit save or print. When you print , win2pdf prints and also saves as pdf at the sametime.

Now at this point i want win2pdf or similar software to save the document as pdf but the file name should be the airway bill number , without user interference .
 
the file name should be the airway bill number , without user interference .
Well, as said, COPY FILE or RENAME FILE can do this job. As your code surely knows the bill number, where's the problem? That doesn't even require a software able to make a setting for the filename, that only requires you to know the file name to rename.

I know PDF Creator will take the name of the print job and also allows setting up a number sequnce, naming by date, etc, but you won't find any PDF printer getting data from inside the rpoert as printer name. It is clearly involved in printing everything, so it sees all data, but nothing of that data has a special meaning to it, that's only available on the VFP level, or do you think otherwise? I mean, you could start an AI company and build intelligent PDF printer drivers that you simply can tell "take the airway bill number as file name". But without AI nothing is simpler than taking the airway bill number users enter to store that for later renaming of a file that always is report.pdf or any other static name. You could use a timer that looks for the file name and as long as the PDF printer adds to the file, you will not be able to get hands on it to rename it, but once all "printing" is done, that's a step you do from the context that knows the easiest: Your FP code. Is that really too kludgy for you? As you know the name in advance you could go through hoops and automate to configure the output name before each report run, knowing wher to store it as a registry key, for example. But why so complicated?
 
Last edited:
I have managed to create reports in TXT file. Now when I open the file it looks fine then when you print they wont be able to have any alignment.
 

Part and Inventory Search

Sponsor

Back
Top