Foxite.COM Community Weblog

Foxite.COM Community Weblog - free weblog service for the Visual FoxPro Community.
Welcome to Foxite.COM Community Weblog Sign in | Join | Help
in
Home Blogs Forum Photos Forum Archives

Luis Guillermo Navas Dangel



QuickFRX2PDF Update

Hi to all. It's been a while since I use my Blog here at this greate site www.foxite.com

I have updated my Listener to create PDF Files, now it can merge existing documents into the PDF file being generated. I also had chance to get a better performance when processing reports with Images in it. Today I tried the INVOICE reports sample that come with VFP and it took me less than 50 seconds to proccess 747 pages. Here's some sample code of how to use it:

You can generate two types of PDF files, a normal file, this PDF file will let you Copy the text, has a better resolution at greater zoom levels and the file size it's really small.

Local loListener As ReportListener, lcTargetFile As String, lcMasterPassword As String, lcUserPAssword As String,;
lcMergeFileName As String

lcTargetFile="MyPDfFile"
lcMasterPassword="master"
lcUserPassword="user"
lcMergeFileName="existingPDF"
loListener = NewObject('PdfListener1', 'QuickFRX2PDF.vcx','QuickFRX2PDF.App')
loListener.TargetFileName = lcTargetFile
loListener.QuietMode=.F. &&Put .T. to turn off messagges
loListener.EncryptDocument=.F. &&Put .T. to Encrypt Document
If loListener.EncryptDocument
loListener.MasterPassword=lcMasterPassword
loListener.UserPassword=lcUserPassword
EndIf
loListener.MergeDocument=.F. &&Put .T. to Merge Document with an Existing PDF
If loListener.MergeDocument
loListener.MergeDocumentName=lcMergeFileName &&Name of the existing file to be merged with
EndIf
loListener.OpenViewer=.T. &&Put .F. to prevent Acrobat Reader from being opened
Report Form myrerport.frx Object loListener

And you can generate an Image PDF File, this kind of PDF will export everything as an image file to the document, people will not be abble to copy your text form it, but PDF files are bigger and has less resolution at greater zoom levels.

Local loListener As ReportListener, lcTargetFile As String, lcMasterPassword As String, lcUserPAssword As String,;
lcMergeFileName As String

lcTargetFile="MyPDfFile"
lcMasterPassword="master"
lcUserPassword="user"
lcMergeFileName="existingPDF"
loListener = NewObject('PdfListener2', 'QuickFRX2PDF.vcx','QuickFRX2PDF.App') &&By calling PdfListener2 we create a PDF File as image.
loListener.TargetFileName = lcTargetFile
loListener.QuietMode=.F. &&Put .T. to turn off messagges
loListener.EncryptDocument=.F. &&Put .T. to Encrypt Documente
If loListener.EncryptDocument
loListener.MasterPassword=lcMasterPassword
loListener.UserPassword=lcUserPassword
EndIf
loListener.MergeDocument=.F. &&Put .T. to Merge Document with an Existing PDF
If loListener.MergeDocument
loListener.MergeDocumentName=lcMergeFileName &&Name of the existing file to be merged with
EndIf
loListener.OpenViewer=.T. &&Put .F. to prevent Acrobat Reader from being opened
Report Form myrerport.frx Object loListener

Also you can specify other options for both PDF Files types, you can enabled or disable print button, copy options and you can encrypt the document with 2 different levels and assign a passwords.
Anyone interest in try it, can download a copy from www.crystalvfpclass.net
It comes with complete Help file and sample form, and there's also a version in Spanish.
Or send me an email to lnavasdangel@gmail.com

Published Monday, March 13, 2006 4:49 PM by luisn

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

zxevil163 said:

BYbDaw Hi from Russia!
March 17, 2008 12:53 PM
 

zxevil172 said:

WFphqC      Were a U from?
I'm from Guatemala, why?
March 28, 2008 11:51 AM

What do you think?

(required) 
(optional)
(required) 

This Blog

Post Calendar

<March 2006>
SuMoTuWeThFrSa
2627281234
567891011
12131415161718
19202122232425
2627282930311
2345678

Post Categories

Syndication