Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating a PDF from an FRX
Message
 
To
07/11/2003 13:00:16
Dave Nantais
Light speed database solutions
Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00847728
Message ID:
00847747
Views:
17
This message has been marked as the solution to the initial question of the thread.
Hi Dave,

Yes, it is possible to create an EXACT duplicate of what the Native VFP RW generates into a PDF document. PDF Documents were the only way to get an EXACT MATCH of a VFP Report Output due to its nature of having EXACT Absolute placement of objects capabilities. That is why I started with PDF. However, now that I have created my new SaveToWORD() Method which can also now provide an EXACT placement capability while still being able to EDIT the Word document output on a page by page basis. Word can now do this as well. I am able to do this because I am rendering a METAFILE representation of what is in my Report Preview Engine directly to a METAFILE object which is no different than rendering it to a DEVICE CONTEXT on my Report Preview ActiveX Control. So, with the next release you can see how this works in a single ActiveX Method which can also render the pages to a Word Document using OLE Automation at a rate of 10+ pages per second on my 1.6GHz notebook. Not too shabby doing it that way. Each page is a Metafile representation of the page and you can Right Click over that Page Object and select EDIT and then edit the text and rotate shapes etc. It works very well. Now, it's not a flowing Word Processor text document like an RTF representation would be but it looks just like it did in the Report Preview and it is editable.

On rendering an exact duplicate of a VFP Report, do you really want all of the native BUGS that it renders on some reports? From the suggestions of others, Doug Hennig, Barb Peisch, etc., there are some things that I render the way that it should be and not the way that VFP renders it. I have a test report that is 4 GROUP BANDS with a multiple SHAPE objects that are Filled. They are all spanning the GROUP BANDS. When, VFP renders it in the PREVIEW you will notice little white gaps between the bands on the filled shapes. In some instances where there is supposed to be a filled shape behind some of the text, the FILLED SHAPE is MISSING. So, I have chosen to do that part correctly.

I will be the first to admit, that I still don't have the EXACT duplication down on recreating VFP Native FRX Report Output. However, every day I am closer than I was the day before. In fact, I use HYPERSNAP Screen Capture tool to measure the pixel differences between my tool at 100% and VFP's Native RW at 100% and then work on tweaking mine to match. It's very tedious but that's the level of perfection that I am working towards. I still have work to do on my STRETCH WITH OVERFLOW text which has been the hardest thing to match due to their formulas depending on available space. But, you can get fairly close.

So, yes I believe that it is possible. I know that my ActiveX control is not the limiting factor of the VFP Output. It's a matter of coding the VFP VCX classes correctly to match the VFP Output. My Report Engine can have objects positioned absolutely anywhere you want. It's just my job to place them there correctly. <g>

Also, I gained a 3 to 6 times improvement in speed of my VFP Rendering Engine after refactoring and redesigning my VCX Report Classes last weekend. So, a report that was taking 58 seconds to render 121 pages is now only taking 8 seconds to render the same exact report and with greater accuracy. The new VCX and OCX has not been posted yet but it will be in the next few days.



There are an assortment of relatively report add on tools that convert a foxpro report into a pdf file (WITHOUT capturing the info from the printer driver). To fairly evaluate them I'd like to know one fact.

Because of the internal architecture of the PDF file is it theoretically possible to build a PDF that is identical to a VFP report?

I do not believe it is possible.
Previous
Reply
Map
View

Click here to load this message in the networking platform