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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating PDF with file name from VFP application 1

Status
Not open for further replies.

SitesMasstec

Programmer
Sep 26, 2010
526
Brasil
I have installed the CutePDF Writer to generate reports from my Visual FoxPro 9 application. Now I want to go further:
Every time my application generates a PDF report I want to bypass the Save As screen popup; I want CutePDF save the file with a pre-defined name (informed inside the VFP application, for example, ACCOUNTS.PDF).
Is it possible?
Thank you
 
Hello Tamar!
Indeed this afternoon I used the Foxypreviewer. I had searched here all morning for advice, and I find a post by you about Foxypreviewer.
Now I think that because I used the clause SET REPORTBEHAVIOR 90 my report was showed incorrectily, and I uninstalled Foxypreviewer.
Does Foxypreviewer do any change in the Registry keys or FoxPro keys?
Because even after I initialized the computer and erase the Foxypreviewer folder and the command in my VFP application program the report was showed badly incorrect, using CutePDF.
After a second reinitializing the report was normal again.
Well, of course I did something wrong.
I will try it tomorrow again.
Thank you.
 
foxypreviewer needs reportbehavior 90 and with legacy reports you easily get distorted output, as that mode renders with GDI+ instead of GDI in the legacy mode. The main difference between using GDI and GDI+ is text width. Each text element is slightly wider with GDI+, which can result in element content being cut, earlier wrapping longer stretched fields.

So you really have to adjust your report to work with foxypreviewer in 90 mode, typically making all report controls a little wider or changing fontsize one point down will stop text wrap or overlap.

Bye, Olaf.
 
Thanks to Olaf, Vilhelm and again to Tamar.

Olaf:
Yes, text was wider and cut off.
I think I will have to design a NEW report and cut/paste/ajust the objects from the former report to the new one I will create, correct?
Does Foxpreviewer change settings in VFP 9 even after I delete its folder and quit and execute VFP again?

Vilhelm:
I think the first example provided by Mike Gagnon is simpler to implement than the second example, as I see and compare them.

Thank you very much.

 
>I think I will have to design a NEW report and cut/paste/ajust the objects from the former report to the new one I will create, correct?
Just modify the existing report. You can of course make a copy and adjust that.

If foxypreviewer would make some changes to the registry, simply go into tools->options, set the options as wanted and finally click the SET AS DEFAULT button.
You have to ask the foxypreviewer developers, if they do such things.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top