One of the coolest is the following:
to export a report to PDF without previewing, people just need to do the following:
DO FoxyPreviewer.app REPORT FORM YourReport OBJECT TYPE 10
Yes !
That's all you need.
Even better than that, the new - oops !!!!, hahahaha, VFP9 is quite old right now, reporting system from VFP9 allows me to access some of the report clauses used in the report form command. so now we can use the object type clause of the report form command much better, using the "to file" and the "preview", see:
DO FoxyPreviewer.app REPORT FORM (_Samples + "\Solution\Reports\Wrapping.frx") ; OBJECT TYPE 10 ; && regular PDF TO FILE ("c:\FoxyNewTest.PDF") ; && destination file PREVIEW && open the default PDF viewer
to file - is the destination file, that can be sent directly in the report form command !
preview - opens the default file viewer, eg. adobe reader for PDFs
So, in summary, I've enabled 2 object type's allowing automatic PDF generation, without previewing, with just one single line of code, just the same way we used to run our reports!
- object type # 10 = regular PDF, searchable
- object type # 11 = PDF as image, non searchable
- object type # 12 = RTF
- object type # 13 = XLS
- object type # 14 = HTML using XSL
- object type # 15 = HTML using basic HTML commands, easier to export to web
- object type # 20 = Any file type from the above, just send the corrret file extension, and FoxyPreviewer will internally use the needed ReportListener to create the output
A very cool part of all this is that now we have even a new option for report previsualization, trasforming our reports in pdf, and using Adobe Reader to preview them !
that's really neat! Because the reader brings some very nice options for printing, text searching, hyperlinks, emailing, saving, etc etc etc...
If you want to customize your PDFs using the new object type clause, of course you can! Just use the following properties available in the _Screen.oFoxyPreviewer object:
WITH_Screen.oFoxyPreviewer .lQuietMode .lPdfEmbedFonts .lPdfCanPrint .lPdfCanEdit .lPdfCanCopy .lPdfCanAddNotes .lPdfEncryptDocument .cPdfMasterPassword .cPdfUserPassword .lPdfShowErrors .cPdfSymbolFontsList .cPdfAuthor .cPdfTitle .cPdfSubject .cPdfKeywords .cPdfCreator .cPdfDefaultFont .lOpenViewer .nPpdfPageMode
These properties are all described in the foxypreviewer documentation.
Of course this needs some tests, i'm waiting for the feedback of people interested in that feature.
The recommended mode - make it simple !!!
From now on, I'm recommending people to use only the simplified mode:
DO FoxyPreviewer.app REPORT FORM YourReport PREVIEW
Some of the main improvements / fixes
- improved the fonts substitution in the PDF rendering. the fonts Arial and Courier New will appear well, using some internal fonts from the pdf engine.
- wingdings was enabled too!
- fix in PDF "stretch to fit" and multilines sentences - thanks to Fabio Vieira
- fix sending emails, automatic opening tables
- from now on, whatever that the pdf engine will not be able to draw, it will get an image from the source report surface, crop and paste the image in the PDF document. This works nice for barcodes, and some fonts that can't be embedded.
- included all of the available properties for the complete mode to the "_screen.ofoxypreviewer" object (that is created after you "do foxypreviewer.app"
- several small fixes in the xls rendering, hopefully now all reports will generate valid worksheets. (special thanks to jorge chang for his samples and testing)
- using the simplified mode now you can change your printer directly from the combobox, thanks to lisa slater nicholls, for her great article "a print job to call your own"
Special thanks
- to all the translators who have been translating the localizations table, alowing the tool to be multilanguage. currently we have 16 languages available!
- Soykan Ozcelik and Luis Maria Guayan, for their terrific support, tests and help, and more than that, for translating the Foxypreviewer documentation to Turkish and Spanish, allowing more people to use the tool, and for providing a very positive and constant support in their local VFP forums. currently we have all dialogs, tooltips and captions available in:
- english
- portuguese
- czech
- spanish
- dutch
- turkish
- french
- german
- indonesian
- arabic
- greek
- italian
- persian
- polish
- russian
- swahili
That's super important, because this utility is getting really big, with lots of possibilities of usage, and for me it's impossible to test in all environments.
Documentation
As said above, the documentation has been updated, and also translated to turkish and spanish:
English documentation
Turkish documentation / Türkçe dökümantasyon
Spanish documentation / Documentacion en español
The foxypreviewer.app file size
- notice that the file foxypreviewer.app has become bigger, about 3MB. that is because I added the "debug info" information to the app.
That makes the file bigger, but on the other hand, provides a more detailed debugging information. that way, people will be able to tell me the line that originated the bug, even running foxypreviewer in production.
That will be only for now, during the tests. in the future, after i stop making constant changes, I'll remove that, and the apps will come back to the original and compact size, about 1.5 MB
And of course, you can recompile the app using the sources, removing the debuginfo if you want!
Foxypreviewer general info
Foxypreviewer documentation
FoxyPreviewer FAQS
Foxypreviewer downloads