XFRX versions 15.0, Release notes
Release date: 18 Mar 2014
Important installation note for the latest version
Important installation notes for 12.x versions and newer
-
VFP 6.0: The XFRX previewer component requires FOXTOOLS.FLL library
if used in VFP 6.0.
-
XFRXLIB.FLL now also requires MSVCP71.DLL library
to be installed (the previous version required GDIPLUS.DLL and
MSVCR71.DLL libraries), all three libraries are required now
New features
-
New output type: Plain HTML output
This output type works in a similar fashion to the plain excel output type: The objects on the page are aligned into a grid, each object going into a separate cell, and then the output is layed out
as a table. Lines and rectangles are displayed as table cell borders. Fonts, colors and sizes are defined via CSS.
This solution produces a clean, fast rendering, cross-browser compatible HTML output, suitable for web pages or emails. (Click here for a sample document: Sample1)
The output is invoked by "HTMLPLAIN" output type parameter:
loSession = xfrx("XFRX#INIT")
lnRetVal = loSession.SetParams("output.html",,,,,,"HTMLPLAIN")
If lnRetVal = 0
loSession.ProcessReport("report1")
loSession.finalize()
Endif
By default, the output is a complete self-contained HTML file. You can also use the HTML_NOSTYLES option to process just the inner HTML, without CSS styles, head or body tags:
loSession = xfrx("XFRX#INIT")
lnRetVal = loSession.SetParams("output.html",,,,,,"HTMLPLAIN")
If lnRetVal = 0
loSession.SetOtherParams("HTML_NOSTYLES", .T.)
loSession.ProcessReport("report1")
loSession.finalize()
Endif
Notes:
- This feature requires .NET framework 3.5. The HTML is produced by a .NET console application which reads XML files generated by XFRX and coverts them. This console application (xfrxt.exe) needs to be distributed along with the application.
- This output type currenty does not support images
Bugs fixed
- Better (more precise) output for multiline labels/textboxes
- Output directory write permission check
- DOCX - codepage problems, backcolor problems
- DOCX - text rotation
- DOCX - speed enhancement
- DOCX, OpenOffice - intermittent page number fix
- DOC - crossover tags
- Enhanced codepage conversion
- Enhanced support if asian codepages in OpenOffice and DOCX
- PDF - fixed problems with displaying Arial Narrow and Arial Black fonts
- Listener mode - db area number preservation fix
- XFRX Previewer - "mdot" bug fixed
- HTML output - font family name bug
- OpenOffice - image rotation
- OpenOffice - hyperlink bug
XFRX versions 14.7, Release notes
Release date: 30 Nov 2013
New features
-
New output type: Native Word (docx) output - the Word application is not required and does not need to be installed to generate the documents
The new output type can generate Word documents in docx (OpenXML) format both in the standard and flow layout. The generated documents are equivalent to the standard word documents
generated by XFRX and can be opened in Word versions 2003 (with a plugin), 2007 and newer. The output type codes are "NATIVE_DOCX" (standard) and "NATIVE_FDOCX" (flow layout).
Overview:
Output type code |
Standard layout |
Flow layout |
Output format |
Word version needed to generate |
Word version needed to view |
DOC |
yes |
no |
DOC |
2000+ |
2000+ |
FDOC |
no |
yes |
DOC |
2000+ |
2000+ |
NATIVE_DOCX |
yes |
no |
DOCX |
none |
2003+ |
NATIVE_FDOCX |
no |
yes |
DOCX |
none |
2003+ |
Usage:
All you need to do is to specify NATIVE_DOCX or NATIVE_FDOCX. This is a pure VFP implementation so no other setup is needed, except MD5.FLL library MD5.FLL, which is a free
library implementing the MD5 algorithm. MD5.FLL was written by Duke Lotherington, Visual Records Consulting, 3944 Murphy Canyon Rd, San Diego CA 92123, duke@visualrecords.com
(http://www.leafe.com/dls/vfp)
Pre VFP-9 mode:
loSession= xfrx("XFRX#INIT")
lnRetVal = loSession.SetParams("output.docx",,,,,,"NATIVE_FDOCX")
If lnRetVal = 0
loSession.ProcessReport("report1")
loSession.finalize()
Endif
VFP-9 mode:
loxfrx = XFRX("XFRX#LISTENER")
lnRetval = loxfrx.SetParams("output.docx",,,,,,"NATIVE_FDOCX")
IF lnRetval = 0
REPORT FORM report1 OBJECT loxfrx
endif
Bugs fixed
- XFRX diagnosis module does not require FOXTOOLS.FLL in compile time any more
- XML output type now includes the code page defined in SetParams
- Pictures rotation is now supported DOCX output. We will be adding this to other output types (where doable)
- FIXED: Open office output type does not include the correct code page in listener mode
- FIXED: Report previewer: unpaired Lockscreen = .T. / .F.
XFRX versions 14.6, Release notes
Release date: 4 Nov 2013
New features
-
XFRX Diagnosis
Running XFRX with the following parameters:
DO xfrx WITH "XFRX#DIAGNOSIS", "DIAGNOSIS.TXT"
Will create a new file specified by the 2nd parameter (DIAGNOSIS.TXT), which is useful when dealing with setup problems. It lists the version number, registration string,
vcx, dll and fll file version and locations and other information. Please review this file when dealing with setup problems and also please send it to us attached to support
questions.
-
New output types - "DOCX" and "FDOCX"
The new output types run the standard (DOCX) or flow layout (FDOCX) conversion and generate word documents with the DOCX extension (the OpenXML format). This output type
requires Word 2007 or newer to be installed on the computer. (until the next XFRX release ... at least ;)
Bugs fixed
-
Word standard and flow layout output
- Intermittent freezing of Word 2007 when previewing a document generated by XFRX
- Textbox height calculation fix - this was a Word 2010-only specific fix
- Exporting to DOC format using Word 2010 or 2013 will save the document as a DOCX document. Unfortunately this was the only way to solve the intermittent Word 2010 freezing, caused
by changes in the HTML output support in these versions.
- PDF output
- Additional enhancements to 32bit images rendering
- Enhanced support for Bold, Italic and Bold/Italic font styles when used with non-Latin1 character sets
- HTML output
- Output to HTML in VFP 9.0 going via XFF file or XFRX previewer displayed the page footer over the bottom of the detail output. This problem has been fixed.
- XFRX Print and Previewer Modules
- Fixing duplicate constant compile error
- Fixed intermittent freezing of the printer properties dialog box
- Open office output
- proper attributes encoding and code page setting
- better environment cleanup method
- layout enhancements - textbox background and transparency settings, rotation
XFRX versions 14.5, Release notes
Release date: 12 May 2013
New features
-
Better barcode support: new PDF output directive - #UR SYMBOLFONT
Put "#UR SYMBOLFONT" into the comment of the report field that contains the barcode. This will instruct the engine not to do any codepage conversions and flag the font as a symbol font in the PDF document.
Bugs fixed
- PDF output
- 32bit images are now rendering properly
- document properties longer than 255 characters are now supported
- Fixed errors in digitally signed documents on certain computers
- XFRX Draw engine
- Creating new XFF document is not complaining about exclusive access any more
- XFRX Previewer
- Intermittent error on mouse-wheel click is fixed
- Reporting engine - affects all output types
- Bugs fixed in 'Stretch relative to tallest object in group'
- Memory leak in hndlib.dll fixed (Many thanks to Borislav Borissov and Martina Jindrova for tracking this down). This error was causing various intermittent layout or structure errors in the generated documents, especially in long documents or when a large amount of documents were created at a time
XFRX versions 14.4, Release notes
Release date: 11 September 2012
New features
Bugs fixed
- Excel output type (XLS)
- Enhanced footer rendering. The system now eliminates vertical gaps between bottom of the page and the page footer
- 'pos' already exists warning message removed
XFRX versions 14.3, Release notes
Release date: 3 June 2012
New features and bug fixes
- PDF output
- Font glyphs extraction algorithm has been improved, the size of PDF files with embedded font subset is now significantly smaller
- Date/time metadata now includes the current time zone
- Word-wrapping algorithm issue fixed in VFP 5
- PDF/A is now supported
PDF/A is an ISO standard for the digital preservation of electronic documents. PDF/A document is a PDF document with specific restrictions that ensure that the document will always display and print exactly the same way, no matter which platform or document viewer is used:
- Platform independent
- No hidden or transparent content
- All information needed to display the document is embedded (including fonts)
- Document metadata stored as XML
- No encryption, no password protection
- No JavaScript or other executable parts
- No LZW compression
- Displayed and printed content must match (all annotations must be printed)
There are currently two PDF/A specifications:
- PDF/A-1 from 2005
- PDF/A-2 from 2011
XFRX currently supports specification PDF/A-1 Level “B” (PDF/A-1b).
Note: Please note the PDF/A-enabled document files can be significantly larger than regular PDF documents because the used fonts must always be included.
To generate a PDF/A document, call SetPDFA(.T.) method on the session object before processing. This method is available in VFP8 and VFP9 session objects, as well as the XFRX#DRAW object.
Example (VFP 9.0):
LOCAL loObj
loObj = EVALUATE([XFRX("XFRX#LISTENER")])
lnRetVal = loObj.SetParams("pdfa9.pdf",,,,,,"PDF")
IF lnRetVal = 0
loObj.setpdfa(.T.)
REPORT FORM demoreps\invoices object loObj
ENDIF
XFRX versions 14.2, Release notes
Release date: 26 September 2011
New features and bug fixes
- PDF output
- Bookmarks and document properties are now encoded in unicode, allowing non-Latin 1 characters to be correctly displayed.
The text is converted using the default code page or the code page specified in the 4th parameter of the SetParams method (tcCodePage)
- PDF file size issue fixed - images in the PDF file were saved in BMP format in some scenarios, which was increasing the file size significantly
- Improved compatibility in appending to existing PDF files
- Vertical lines rendering problem fixed - in some scenarios vertical lines showed slanted in the PDF output.
- Occasional layout issues fixed - word-wrapping algorithm improved
- Excel output - the compatibility check window is now always suppressed
- OpenOffice output types - significant layout improvements in all output types
- Multiline export layout fix
- Transparent background is now correctly rendered
- field content overflowing boundary box problem fixed
- Flowmode now respects text horizontal shift within one line
- XFRX previewer - intermittent crashing on mouse middle-click fixed
- XFRX previewer - local variable declaration fixes
- XFRX previewer - current area reset fix
XFRX versions 14.1, Release notes
Release date: 6 December 2010
Office 2010 compatibility notes fixes
- Word 2010 - fixed the problem with missing pictures
- Intermittent Excel 2010 freezing fixed
- Issues with picture frames in flow layout word output fixed
- "Cannot load Word or Excel application" error message - please be aware XFRX does not support Office 2010 running in "Click to run" setup mode.
More info at:
http://xfrx.blogspot.com/2010/12/office-2010-and-click-to-run.html
XFRX versions 14.0, Release notes
Release date: 19 July 2010
New features
Digital signatures in PDF
The digital signature can be used to validate the document content and the identity of the signer. (You can find more at http://en.wikipedia.org/wiki/Digital_signature). XFRX implements the "MDP (modification detection and prevention) signature" based on the PDF specification version 1.7, published in November 2006.
The signing algorithm in XFRX computes the encrypted document digest and places it, together with the user certificate, into the PDF document. When the PDF document is opened, the Adobe Acrobat (Reader) validates the digest to make sure the document has not been changed since it was signed. It also checks to see if the certificate is a trusted one and complains if it is not. The signature dictionary inside PDF can also contain additional information and user rights - see below.
At this moment XFRX supports invisible signatures only (Acrobat will show the signature information, but there is no visual element on the document itself linking to the digital signature). We will support visible signatures in future versions.
In the current version, XFRX is using the CMS/PKCS #7 detached messages signature algorithm in the .net framework to calculate the digest
- which means the .NET framework 2.0 or newer is required. The actual process is run via an external exe - "xfrx.sign.net.exe", that is executed during the report conversion process. In future, we can alternatively use the OpenSSL library instead.
How to invoke the digital signing
(Note: the syntax is the same for VFP 9.0 and pre-VFP 9.0 calling methods)
To generate a signed PDF document, call the DigitalSignature method before calling SetParams. The DigitalSignature method has 7 parameter:
cSignatureFile
The .pfx file. pfx, the "Personal Information Exchange File". This file contains the public certificate and (password protected) private key. You get this file from a certificate authority or you can generate your own for testing, which for example, OpenSSL (http://www.slproweb.com/products/Win32OpenSSL.html). XFRX comes with a sample pfx that you can use for testing.
cPassword
The password protecting the private key stored in the .pfx file
nAccessPermissions
per PDF specification:
1 - No changes to the document are permitted; any change to the document invalidates the signature.
2 - Permitted changes are filling in forms, instantiating page templates, and signing; other changes invalidate the signature. (this is the default value)
3 - Permitted changes are the same as for 2, as well as annotation creation, deletion and modification; other changes invalidate the signature.
cSignatureName
per PDF specification: The name of the person or authority signing the document. This value should be used only when it is not possible to extract the name from the signature; for example, from the certificate of the signer.
cSignatureContactInfo
per PDF specification: Information provided by the signer to enable a recipient to contact the signer to verify the signature; for example, a phone number.
cSignatureLocation
per PDF specification: The CPU host name or physical location of the signing.
cSignatureReason
per PDF specification: The reason for the signing, such as ( I agree ... ).
Demo
The demo application that is bundled with the package (demo.scx/demo9.scx) contains a testing self-signed certificate file (TestEqeus.pfx)
and a sample that creates a signed PDF using the pfx. Please note Acrobat will confirm the file has not changed since
it was signed, but it will complaing the certificate is not trusted - you would either need to add the certificate as a trusted one
or you would need to use a real certificate from a certification authority (such as VeriSign).
Feedback
Your feedback is very important for us. Please let us if you find this feature useful and what features you're missing.
XFRX versions 12.9, Release notes
Release date: 15 June 2010
Bugs fixed
- PDF output - multiline text rendering - center and right-aligned text is now rendered properly
- PDF output - specific BMP picture subformats (32 bpp and others) were rendering as a black box. This problem has been fixed.
- VFP 9 listener mode - Render method now properly calls the chained report listeners' methods
- The proper field codepage is now stored in the XFRX intermediate file
- High resolution pictures now render and print properly
- "@L" picture format is now working correctly in all VFP versions
- Warning about "page" index overwrite is removed
- Warning about "pos" index overwrite is removed
- The correct background color wasn't displaying for fields marked as opaque using a dynamic condition
- "#UR OUTLINE" and "#UR TOOLTIP" now support numeric values
- XFRX previewer - an error was showing when no data were loaded
- XFRX previewer - email icon tooltip fixed
- XFRX previewer - intermittent crashing was fixed [negative window handlers]
- XFF Printing - enhanced custom paper-size handling
- XFF Printing - paper orientation problems fixed
XFRX versions 12.8, Release notes
Release date: 22 November 2009
New features / Updates
Bugs fixed
- Dynamic properties in VFP 9.0 - dynamic textbox background is now displayed correctly
- Rectangle-bound scripts in VFP 9.0 are now correctly evaluated
- Word output - the page margins are updated so that wide reports fit into the paper size
- PDF output - word wrapping algorithm didn't intermittently work properly with dashes and some other characters that allow for wrapping to a new line
- PDF output - fonts with no code page are now properly handled if a code page is specified
- PDF output - left and center alignment calculation shift in GDI+ mode has been fixed
- Word output - the temporary XML copy of the word document could have been left undeleted with certain Word versions
- Previewer - XFRX previewer now works properly in top-level forms
- "@Z$" format string is now handled properly
- Printing - the printer paper size is now automatically pre-selected with the report paper size
- 'X_TRIM missing' error is fixed
- Excel output in VFP 9.0/SP2 now properly exports numeric values and numeric formats - if you need the numeric values, set
the CallEvaluateContents property of the xfrxlistener to 2.
More details: the actual bug was caused by the new Listener properties introduced in SP2: CallAdjustObjectSize, CallEvaluateContents.
When the
default parent report listener is used (fxlistener at FFC), it checks for the report dynamics and if there are not any, it sets these
two properties to 1 and thus disables the EvaluateContents calls. However, when EvaluateContents is not called, XFRX won't know
about the actual numeric value and the output will be exported as a text.
XFRX versions 12.7, Release notes
Release date: 23 December 2008
New features / Updates
Bugs fixed
- Intermittent crashing on Windows Vista with specific printers has been fixed
- The printed output was occasionally shifted for specific printers
- Open office output layout issues have been fixed
- Page-range filtering didn't work for merged reports
- XFRX previewer issues
- Double-click on a custom hyperlink executed the linked event twice
- Bookmark panel size wasn't setup correctly during drilldown
- The previewer form didn't work correctly inside top-level forms
- Occasional screen flickering during drilldown
- Print options do not show if no printers are installed
Known issue: The full justify feature (<FJ>) does not work in the previewer. We are working on fixing this as soon as possible.
XFRX versions 12.6, Release notes
Release date: 01 August 2008
New features / Updates
-
Full justification is now supported in PDF, Word output, picture export and the XFRX previewer
Add <FJ> into the comments of the fields you want to full justify.
-
Absolute layout boxes in Word output are now automatically expandable
-
Picture rotation is now supported in VFP 9.0, using the new SP2 designer user
interface
- XFRX Previewer
-
Hyperlink decoration can now be suppressed on the printer output
A new property has been added to the XFCont, cntXFRXMultipage and frmMPPreviewer classes: UnderlineHyperlinksOnPrint.
You can use the following values:
0 - no decoration for hyperlinks
1 - display "normal" hyperlinks in blue, but do not decorate custom event hyperlinks (green)
2 - (default value) decorate both blue and green hyperlinks
To support this, the PrintDocument method of the XFRX#DRAW
class has a new parameter, tnUnderlineHyperlinksOnPrint, with the same values and logic.
-
Custom buttons can now be added to the XFRX previewer toolbar at runtime
This feature is implemented using the extension handler mechanism: A new method is now supported - ToolbarOnInit, which is invoked at the time the toolbar is initialized.
In this method the extension handler can add new buttons to the previewer and their click events can be bound with other methods in the extension handler. A new property
is now supported, too - oPreviewContainer. If it is available, the previewer will automatically fill it with the XFCont object reference for easier access to the previewer
properties in the custom buttons click event methods.
Example:
use demoreps\sales
local loSession, lnRetval, loXFF, loPreview, loScripts
loSession=EVALUATE([xfrx("XFRX#LISTENER")])
lnRetVal = loSession.SetParams(,,,,,,"XFF") && no name = just in memory
If lnRetVal = 0
REPORT FORM demoreps\sales object loSession
*
* the XFRX#DRAW object reference is stored in oxfDocument property
*
loXFF = loSession.oxfDocument
*
* initialize the previewer
*
SET PATH TO xfrxlib
SET CLASSLIB TO xfrxlib ADDITIVE
loPreview = CREATEOBJECT("frmMPPreviewer")
*
* setup the extension handler
*
loPreview.oExtensionHandler = CREATEOBJECT("SampleExtensionHandler")
loPreview.windowtype = 1
loPreview.iTool = 2 && embedded toolbar
* loPreview.iTool = 1 && standard toolbar
loPreview.PreviewXFF(loXFF)
loPreview.show(1)
ENDIF
DEFINE CLASS SampleExtensionHandler as Custom
oPreviewContainer = null
PROCEDURE ToolbarOnInit
LPARAMETERS toToolbar
LOCAL button
IF toToolbar.AddObject("mybutton", "commandbutton")
BINDEVENT(toToolbar.mybutton, "click" , this, "ButtonClicked")
toToolbar.mybutton.tabindex = 1
toToolbar.mybutton.Visible = .t.
IF UPPER(totoolbar.BaseClass)!="TOOLBAR"
toToolbar.mybutton.left = toToolbar.cmdQuit.left
toToolbar.cmdQuit.left = toToolbar.mybutton.left + toToolbar.mybutton.width
ENDIF
endif
PROCEDURE ButtonClicked
LOCAL lcString
lcString = "this.oPreviewContainer.Name: "+this.oPreviewContainer.Name+CHR(13)
lcString = lcString + "current page: "+TRANSFORM(this.oPreviewContainer.nPageNo)+CHR(13)
lcString = lcString + "XFRX#DRAW Object: "+this.oPreviewContainer.oXFRXWriter.Name+CHR(13)
lcString = lcString + "Page count: "+TRANSFORM(this.oPreviewContainer.oXFRXWriter.PageCount)+CHR(13)
WAIT WINDOW lcString
*
* this.oPreviewContainer.oXFRXWriter.PrintDocument(...)
* this.oPreviewContainer.oXFRXWriter.SavePicture(...)
ENDDEFINE
Bugs fixed
- "SET NULL ON" problem has been fixed
- A problem with previewer crashing on Windows Vista has been fixed
- Dynamic background is now supported in VFP 9
XFRX versions 12.5 + 12.4, Release notes
Version 12.5 released on: 31 January 2008
Version 12.4 released on: 14 November 2007
New features / Updates
-
VFP 9.0 SP2 features are now supported
This version supports both VFP 9.0 SP2 and VFP 9.0 pre-SP2 environments. In SP2 it supports the new dynamics and rotation features.
-
GDI+ compatible word wrapping algorithm
The new version comes with an alternate GDI+ wordwrapping algorithm. Since the introduction of VFP 9.0 we are experiencing layout compatibility issues between the
old reporting engine (pre-VFP 9.0) and the new reporting engine (VFP 9.0). [Please see Guide to Reporting Improvements VFP 9.0 help topic for more information.]
With XFRX we are experiencing a similar problem - while the pre-VFP 9.0 report engine inside XFRX is using GDI for wordwrapping and layout calculation, the VFP 9.0
report that is used in XFRX for VFP 9.0 is using GDI+. Moreover, XFRX is using GDI+ for printing, output to pictures and previewing.
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. Here is a summary:
XFRX ver. 12.3 and earlier |
| VFP 9.0 | VFP 8.0 and earlier |
Output to PDF and other output formats | GDI | GDI |
Report engine | GDI+ | GDI |
Report previewer | GDI+ | GDI+ |
Printing out of XFRX | GDI+ | GDI+ |
Although converting everything to GDI+ would ease the complexity, it would bring another problem - "old" reports might need to be modified.
So, instead, the latest XFRX version now contains both GDI and GDI+ wordwrapping algorithms and you can choose which one is going to be used. By default GDI+ is used
in VFP 9.0 in the listener mode and GDI is used in VFP 8.0 earlier. There is probably no reason to switch to GDI in VFP 9.0 but it might sometimes be useful to switch
to GDI+ as printing and previewing is still in GDI+:
XFRX ver. 12.4 with wordwrapping set to GDI+ |
| VFP 9.0 | VFP 8.0 and earlier |
Output to PDF and other output formats | GDI+ | GDI+ |
Report engine | GDI+ | GDI+ |
Report previewer | GDI+ | GDI+ |
Printing out of XFRX | GDI+ | GDI+ |
XFRX ver. 12.4 with wordwrapping set to GDI |
| VFP 9.0 | VFP 8.0 and earlier |
Output to PDF and other output formats | GDI | GDI |
Report engine | GDI+ | GDI |
Report previewer | GDI+ | GDI+ |
Printing out of XFRX | GDI+ | GDI+ |
To set the wordwrapping algorithm manually then, before running your reports, create a public or private variable _xfrx_WordWrapAlgorithm and set it to 1 for GDI mode
and 2 for GDI+ mode.
-
E-mail support in the XFRX previewer
An email icon has been added to the XFRX previewer toolbar. It is disabled by default for backward compatibility and can be enabled by setting the iEmail property of the
previewer class [xfCont, cntXFRXMultiPage or frmMPPreviewer] to 1.
If you click the email icon, it runs the Email method of the xfCont class. By default it displays a simple dialog box asking for email address, subject, body, etc. and
uses VFPWinsock library to send the email.
Note: VFPWinsock is a free SMTP sendmail library written by a VFP MVP Francis Faure. It is not distributed together with XFRX and it can be downloaded from
http://www.xfrx.net/vfpWinsock/index_e.asp. It is a nice little package written in VFP distributed as a single .prg.
The default behavior can be intercepted or overridden by an extension handler [Please find more information about extension handlers in the Developer's Guide here:] - and, as the default dialog does not ask for all information VFPWinsock needs (eg. it does not ask
for SMTP host) you actually need to create an extension handler to make it work in your environment. There are two events that extension handler can implement:
Following are sample of the two most common scenarios:
- Suppress the default behavior and handle the email event on your own
loPreview = CREATEOBJECT("frmMPPreviewer")
loPreview.iEmail = 1 && show the email icon
loPreview.oExtensionHandler = CREATEOBJECT("SampleExtensionHandler")
loPreview.PreviewXFF(loXFF) && preview the document
loPreview.show(1)
DEFINE CLASS SampleExtensionHandler as Custom
PROCEDURE Email
LPARAMETERS loXFF
LOCAL loSession, lcFileName
loSession=EVALUATE([xfrx("XFRX#INIT")])
lcFileName = Addbs(Sys(2023))+"test.pdf" && temporary file name
If loSession.SetParams(lcFileName,,.T.,,,,"PDF") = 0 && the 3rd parameter says we do not want to preview the PDF
loSession.TransformReport(loXFF)
LOCAL sm
Set Procedure To vfpwinsock ADDITIVE
sm = Createobject("vfp_winsock_send_mail")
sm.smtp_host = "your.smtp.server.here" &&&<<<<<<<<<<<<<<<<<<<< put your smtp server here
sm.From = "eqeus@eqeus.com"
sm.To = "eqeus@eqeus.com"
sm.subject = "Email test"
sm.silence = .T.
sm.attaCHMENT = lcFileName
if !sm.Send()
MESSAGEBOX(sm.erreur,16,"xfrx test")
ELSE
MESSAGEBOX("Message was sent",0,"xfrx test")
ERASE (lcFileName)
endif
Endif
RETURN .F.
ENDPROC
ENDDEFINE
- Use the default dialog box, use an extension handler to supply mail server parameters and let XFRX send the email
DEFINE CLASS SampleExtensionHandler as Custom
PROCEDURE EmailOptions
LPARAMETERS loXFF, loOptions
loOptions.cSMTP_HOST = "mail.your_domain.com"
loOptions.cFrom = "eqeus@eqeus.com"
ENDPROC
ENDDEFINE
Bugs fixed
- Landscape printing has been improved, both clockwise and anti-clickwise rotation is now supported
- Landscape reports printing as portrait in Word has been fixed
- The 10000 lines limit in XLS output has been removed
- Picture shift problem in XLS has been fixed
XFRX version 12.3, Release notes
Release date: 27 August 2007
Important installation notes for 12.x versions
-
The XFRX previewer component requires FOXTOOLS.FLL library
if used in VFP 6.0.
-
XFRXLIB.FLL now also requires MSVCP71.DLL library
to be installed (the previous version required GDIPLUS.DLL and
MSVCR71.DLL libraries), all three libraries are required now
New features / Updates
Bugs fixed
- Speedup - the XFF file processing and PDF generation should be around 10-20% faster
- "Money" type was not properly handled in some scenarios
- Printing multiple pages per sheet was not working correctly for the "letter" size papers
- Horizontal and vertical lines were not properly rendered in page footer for flow layout output types (FDOC, FRTF)
- A bug causing slowdown when exporting to PDF was fixed
- PAGETOTAL variable was not correctly evaluated when merging multiple reports
- A combination of a specific font, "stretch" flag and a textbox height could cause an occasional blank line inclusion
- Appending to PDF - PDF files with a specific format were not correctly supported
- Printing - layout problems with landscape reports have been fixed
- VFP 8 engine - objects on bands wrapped to a new page occasionally got a wrong z-index
- VFP 9 engine
- Cancelling a report was producing an empty document. No whatever was processed till the user cancelled the report is generated in the document.
- Exporting landscape reports to Word produced a document that appeared as portrait when printed
- AdjustObjectSize event is now properly propagated to listener's successors
- XFRX previewer
- Navigation using searched keywords was not working correctly when SET EXACT was set to ON
- Various tweaks were done to improve the user interface
XFRX version 12.2, Release notes
Release date: 5 December 2006
Important installation notes for 12.x versions
-
The XFRX previewer component requires FOXTOOLS.FLL library
if used in VFP 6.0.
-
XFRXLIB.FLL now also requires MSVCP71.DLL library
to be installed (the previous version required GDIPLUS.DLL and
MSVCR71.DLL libraries), all three libraries are required now
New features / Updates
-
XFRX Advanced Previewer
-
Printer selection dialog enhanced
The dialog contains new controls allowing for the following options:
-
The number of copies to print
-
Include odd / even or all pages
-
Zoom - printing multiple pages per sheet
-
Export dialog enhanced
The dialog allows for the following new features:
-
Specify the export output targets that would be available for selection
-
When exporting to "Image" output formats, the following new options are
available:
-
The number of copies to print
-
Include odd / even or all pages
-
Zoom - printing multiple pages per sheet
-
The DPI of the image created
-
Previewer extension handler
The extension handler now supports two new events (PrintOptions and
ExportOptions) - print and export events after the options dialog is selected
and the user clicks [Ok]. The events receive two parameters - the XFF object
reference and an object containing the parameters user selected.
Example: Defining
the export output options list, intercepting the XLS export
USE invoices ORDER customer
LOCAL loSession, lnRetval, loXFF, loPreview, loScripts
loSession=EVALUATE([xfrx("XFRX#LISTENER")])
lnRetVal = loSession.SetParams("",,,,,,"XFF") && no name = just in memory
If lnRetVal = 0
REPORT FORM invoices OBJECT loSession
loXFF = loSession.oxfDocument
*
* initialize the previewer
*
SET CLASSLIB TO xfrxlib ADDITIVE
loPreview = CREATEOBJECT("frmMPPreviewer")
loPreview.setExtensionHandler(CREATEOBJECT("MyExtensionHandler"))
loPreview.windowType = 0
loPreview.iBook = 0
loPreview.PreviewXFF(loXFF)
loPreview.show(1)
ENDIF
DEFINE CLASS MyExtensionHandler AS Custom
PROCEDURE Export
LPARAMETERS toXFF
IF USED("_xfExportTypes")
USE IN _xfExportTypes
ENDIF
*
* define my export options list
*
CREATE CURSOR _xfExportTypes (name C(50), extension C(4), targetCode C(10))
INSERT INTO _xfExportTypes VALUES ("HTML", "html", "HTML")
INSERT INTO _xfExportTypes VALUES ("PDF", "pdf", "PDF")
INSERT INTO _xfExportTypes VALUES ("Excel", "xls", "XLS")
ENDPROC
PROCEDURE ExportOptions
LPARAMETERS toXFF, toOptions
IF toOptions.cTarget = "XLS"
*
* my own code to handle output to Excel
*
=MESSAGEBOX("exporting to "+toOptions.cOutputFile)
RETURN .F. && suppress the default behavior
eLSE
RETURN .T. && continue with the default behavior
ENDIF
ENDPROC
ENDDEFINE
-
Printing and exporting to pictures
The SavePicture and PrintDocument methods now have new parameters for
controlling whether to include all pages, odd or even only, the number of
copies and the number of pages per sheet.
Bugs fixed
-
frmMPPreviewer class was missing the iBook property
-
Private data session reports were causing crashes in previewer (VFP 9)
-
Opaque colored backgrounds were not printing properly
-
The report previewer wasn't sending the XFF file reference parameter to the
extension hander events
-
Displaying multiple pages at once in the previewer was not working correctly
(old pages being left on the screen) if there were not enough pages
remaining in the document
-
XFRX was producing corrupted PDFs when fonts were included in the document
(error 135)
-
Appending to PDF was improved (more PDF document "subformats" are now
supported)
-
Wrapped lines were dropped in the previewer (in some scenarios)
-
OpenOffice - the absolute layout output was not working correctly (blank
textboxes) with the latest OpenOffice version
-
The word wrapping algorithm was not respecting the current code page - Cyrillic
texts having lines too wide
-
VFP 8 engine - vertical lines are now properly wrapped to a new page
when stretched bands wrap
-
If the page range is not specified for SavePicture and PrintDocument method,
the whole document is exported/printed
XFRX version 12.1, Release notes
Release date: 5 September 2006
Important installation notes
-
The XFRX previewer component requires FOXTOOLS.FLL library
if used in VFP 6.0.
-
XFRXLIB.FLL now also requires MSVCP71.DLL library
to be installed (the previous version required GDIPLUS.DLL and
MSVCR71.DLL libraries), all three libraries are required now
New features / Updates
-
XFRX Advanced Previewer
-
The previewer is now able to preview multiple pages at once
A new selection control on the toolbar can now switch the previewer to display
up to 8 pages at the same time
-
Displaying progress bar
A progress bar object reference can be sent to the previewer to show progress
when exporting to PDF and other output formats
Example:
loXFF = XFRX("XFRX#DRAW")
loXFF.openDocument("output.xff")
loProgress = createobject("progress")
&& this is
a progress object that will be passed to the previewer
loPreview = CREATEOBJECT("frmMPPreviewer")
loPreview.oProgress = loProgress && set the reference
loPreview.previewXFF(loXFF, "XFRX sample",1,"XFRX Sample Job name")
&& you can now also specify the printer job name
loPreview.show(1)
define class progress as custom
procedure updateProgress
lpara tnReport,tnPage,tnPercentage
wait window nowait "Exporting page: "+allt(str(tnPage))+" (Press
Ctrl+Q to Cancel)"
endproc
enddef
-
Exporting from the previewer can be cancelled by user action
The TransformReport method now reacts to the gnStopXFRX public variable
change so that the export in progress can be cancelled
Example:
PUBLIC gnStopXFRX
ON KEY LABEL CTRL+Q gnStopXFRX = 1
&& the subsequent
report exporting can be cancelled by
&& pressing CTRL+Q
-
Print job name can be specified for each previewing document
A new (4th, optional) parameter of the PreviewXFF method specifies the printer
job name. If the 4th parameter is empty, the 2nd parameter (report caption) is
used as the printer job name. If both 2nd and 4th parameters are empty, the
default printer job name "XFRX" is used.
Bugs fixed
-
Bookmarks were not exporting to PDF
-
OpenOffice output didn't work correctly with SET EXACT flag set to ON
-
Memory leak problem in XFRXLIB.FLL was fixed
-
RightClick and MouseWheel events are now properly handled in the XFRX previewer
- Flow
layout options - bands wrapping on a new page were incorrectly rendered as page
headers
XFRX version 12.0, Release notes
Release date: 17 August 2006
Installation notes:
-
The XFRX previewer component requires FOXTOOLS.FLL library
if used in VFP 6.0.
-
XFRXLIB.FLL now also requires MSVCP71.DLL library
to be installed (the previous version required GDIPLUS.DLL and
MSVCR71.DLL libraries)
New features / Updates
-
New output types
-
Flow layout Open Office Writer document (FODT)
-
Absolute layout Open Office Calc Spreadsheet (ODS)
-
Flow layout Open Office Calc Spreadsheet (FODS)
Since 12.0, the Writer and Calc outputs
are supported, both of which can be generated either using the absolute or
flow layout format (please see chapter "Flow layout document option" in the
Developer's guide for more information about the flow
layout options).
To generate the OpenOffice document, use
the following codes as the 7th parameter (targetType) of the
SetParams method:
Document type
|
targetType
|
OpenOffice Writer document with absolute layout
|
ODT
|
OpenOffice Writer document with flow layout
|
FODT
|
OpenOffice Calc spreadsheet with absolute layout
|
ODS
|
OpenOffice Calc spreadsheet with
flow layout
|
FODS
|
-
XFRX Advanced Previewer
The displaying component was completely reworked, result of which is:
-
Significant speed increase
The previewer is now about 50 times faster in displaying the page content and
moving from one page to another
-
Unicode support
The previewer now supports Chinese and Japanese code pages, correctly displays
Hebrew and Arabic and supports multiple code pages within single report (new
feature in VFP 9)
-
Better rendering
As the XFRX previewer in previous version was using GDI, text with small font
sizes was displayed slightly wider, which was causing various layout
discrepancies. These problems are now gone as the new previewer is using GDI+.
-
Rotated text
Rotated labels and fields are now supported in the previewer
-
Searching
Searching in the previewer is now significantly faster. The whole document is
searched, all found occurences are listed in a side panel (as
hyperlinks/bookmarks).
-
PDF Output
Unicode is now supported in the PDF output type. This allows for converting of
multi-byte code pages (Chinese, Japanese) as well as supporting multiple code
pages withing one report / document.
The unicode samples can be downloaded from:
http://www.eqeus.com/files/xfrx12_demos.zip
-
Printing and export to pictures
-
These output types now also support unicode and multiple character sets.
-
When exporting to pictures, the 7th and 8th parameters can specify a DPI or a
zoom factor of the picture
Example:
loXFF.SavePicture("output.bmp","BMP",1,1,24,,"DPI",300) && saves the picture as 300 DPI
loXFF.SavePicture("output.bmp","BMP",1,1,24,,"ZOOM",150) && zoom to 150%
Bugs fixed
-
Occasionally, pictures stored in relative paths to the FRX file locations were
not correctly displayed.
-
Font subset embedding didn't work correctly with true type fonts with short
"loca" table adressing.
-
Occasional crashing when converting reports to pictures.
-
If the datasession Init method returned .F., the report was not properly
cancelled.
-
Pictures with zero height or width were causing a corrupted PDF
-
When PictureDPI property was set, "stretch picture, retain shape" wasn't
working correctly in PDF
-
The layout of printing / previewing / generating pictures was improved -
"cleaner" lines, proper handling of transparent / invisible rectangles
XFRX version 11.3, Release notes
Release
date: 14 March 2006
New features / Updates
-
XFRX Advanced Previewer
-
Tabbed interface
The advanced previewer can now preview multiple documents using the popular
tabbed interface approach.
-
Custom event hyperlinks (drill-down)
XFRX now
recognizes two types of hyperlinks:
-
“normal”
hyperlinks (printed in
blue), which navigate to other places in
the report or to an external web address and
-
“custom event”
hyperlinks (printed in
green), where XFRX allows for assigning a
custom VFP code that will be called when users click the hyperlink.
This “custom
event” hyperlink feature can be used to invoke application specific actions
(information forms, custom processes, etc.) or for implementing drill-down functionality – invoking detailed
report where the field user clicked on is taken as a parameter for the
report (for example, clicking a customer name in the report listing all
customers can run a report with detail information about this specific
customer). The new report can be directed to a new page of a multipage
previewer, which could provide a comfortable environment for “drilling down”
specific information – with the ability to go back to the original report
without closing the current one, side by side report comparison, exporting /
printing selected reports, etc.
Please find more information about this feature as well
as a step-by-step example in the Developer's guide, "Implementing custom event hyperlinks (drilldown) in
XFRX previewer" chapter.
-
Fake toolbar option
The previewer can now optionally replace the default toolbar with a
toolbar-like control placed above the previewer control. This option can be
very useful if the previewer form is not inside the main VFP screen.
-
New toolbar icon - "Export"
If the user clicks at the new Export icon, a dialog with the output
type and the file name selection is displayed and the output document is
generated based on options selected.
-
Previewer extension handler
The extension handler allows for extending the functionality of the basic
classes without need of creating subclasses. All you need is to create a custom
class, which implements certain methods. The custom class is registered with
the XFRX previewer class (using SetExtensionHandler method) and the previewer
calls the extension methods on appropriate events.
-
The previewer instantiation is now significantly simplified
A complete standalone-window previewer is now shipped with XFRX - all you need
to do to make it work is to instantiate a class and call one of its methods
with an XFF file to preview as a parameter. Alternatively, you can use the
prepared single document or multiple documents (tabbed interface) controls to
your forms.
Please find more information about the advanced previewer in the Developer's
guide, "XFRX previewer" chapter.
-
German localization is now available
-
PDF output format
-
Hebrew code page (cp 1254) is now supported
-
Pictures are binary comparised to reduce the size of PDF documents with
repeated pictures
-
VFP 9: DynamicLineHeight property is used to control if the text field
background color should fill the whole textbox (VFP 9 default behavior) or only
the actual text printed (VFP 8 backward compatibility behavior)
-
General
-
Target image DPI can be specified (large pictures can be downsampled to reduce
the result document size) [see PictureDPI property for XFRXListener and
XFRXSession classes at Developer's guide, "Properties and methods common in
XFRXListener and XFRXSession classes" chapter].
-
Image quality can be specified for ActiveX objects [see DefaultPictureFormat
property for XFRXListener and XFRXSession classes at Developer's guide,
"Properties and methods common in XFRXListener and XFRXSession classes"
chapter].
Bugs fixed
-
Strikethrough font attribute is now correctly recognized
-
Exporting to image formats was crashing in VFP7.
-
XFRX Previewer
-
SetLanguage method was modifying the actual SELECT area
Evaluation package note: The Prevdemo directory with the XFRX
previewer implementation sample has been removed as the same functionality is
now supported by the "native" class frmMPPreviewer of XFRXLib.vcx.
XFRX version 11.2, Release notes
Release
date: 6 December 2005
New features
-
OpenOffice Writer document format is now
supported.
OpenOffice is using the OASIS Open Document Format for Office Applications,
which is also supported by a variety of other office applications including
StarOffice, KOffice, and IBM Workplace. XFRX generates the file format
natively, so OpenOffice doesn’t have to be installed on the computer where the
document is generated.
You can find more information about the OASIS Open Document Format at
http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office.
More information about OpenOffice can be found at
http://www.openoffice.org.
-
TIFF, GIF, PNG, BMP and JPEG picture format is now
supported in PDF and RTF output types. (BMB and JPEG formats are supported
natively, for other picture formats the GDI+ version of XFRXLIB.FLL is
required)
XFRX version
11.1, Release notes
Release
date: 7 September 2005
New features
-
Turkish (1254) and Greek (1253) code pages are now
supported in the PDF output
-
A printer properties dialog
for a given printer can now be invoked from XFRX, returning the printer
properties structure as a string. This string can be saved as a user
preference and sent to XFRX when printing. This functionality is similar to
SYS(1037) introduced in VFP 9.0, with two
differences/improvements:
-
The page setup and printer
selection dialogs are skipped, which saves two clicks for the users and
preempts confusions in case the printer has already been selected. (Very
often, there is a printer selection box in the "main" form and a button to
invoke printer properties).
-
This implementation works in earlier versions of Visual FoxPro, too (from VFP
5.0)
-
A custom printer properties
structure can be used when XFRX transforms the output to a
printer
-
HNDLIB.DLL and XFRXLIB.FLL versions check. When the
required library version is not available, the warning message displays:
Bug fixes
-
General issues
-
XFRX now supports using THISFORM in before/after
band expressions
-
VFP 9.0 related issues
-
RANGE clause is now supported
-
RTF issues
-
The problem with long text being wrapped too early has
been fixed
-
DOC issues
-
A bug in rectangle transparency/back color calculation
has been fixed
-
XFRX previewer
-
Right aligned labels position shift has been
fixed
-
Print engine
-
A bug in rectangle transparency/back color calculation
has been fixed
-
TABs are now supported in the printed output
-
Problems with early wrapping and stretched text being
too high have been fixed.
XFRX version
11.0, Release notes
Release
date: 2 June 2005
New features
-
This version introduces custom scripts. Custom
scripts are methods or code snippets written in Visual FoxPro, which can be
linked to objects on the report or triggered during the processing of the
report, and can be used to "draw" to the report being processed: to generate
pictures, add any custom graphics (graphs, watermarks, etc.), text objects,
hyperlinks, bookmarks and many more.
The new version also allows to bypass the reporting engine altogether and
create any of the output formats supported by XFRX from scratch – directly from
your Visual FoxPro code.
Please see the Developer's guide at http://www.eqeus.com/xfrxmanual.php
for more information.
-
Text
message of the error codes returned by SetParam method can now be retrieved
with ErrorMessage method.
Bug fixes
-
General issues
-
Striked font style is now supported in all output
formats (except plain text :) )
-
If a report didn't exist, the warning message
was not suppressed in the silent mode
-
SavePicture method was crashing when the page range was
specified with string value (e.g. "4-5")
-
VFP 9.0 related issues
-
The problems with XFRXListener initializations when the
support libraries were not in the default directory have been
fixed
-
FRTF issues
-
The document was displayed in CP 1251 (in cyrilic) when
opened in Open Office.
-
Page size calculation problem (long pages were wrapping
to a new page) has been fixed
-
XLS issues
-
Transparent textboxes are now correctly converted as
trasparent
-
XFRX previewer
-
Problems with line colors have been fixed
-
The printer selection dialog box is now
localizable
XFRX version
10.2, Release notes
Release
date: 20 April 2005
New
features
-
XFRX is now able to print the generated reports. You
can print the stored XFF files as well as print directly from the advanced
previewer.The advanced previewer implements a simple printer selection dialog,
with an option to select page ranges to print, which can be easily
overwritten by a custom form. Please see the Developer's guide at
http://www.eqeus.com/xfrxmanual.php for more information.
Bug fixes
-
VFP 9 related issues
-
SetOtherParams method is now correctly
implemented
-
PDF issues
-
8-bit grayscale JPEG pictures are now supported in
PDF
-
XFRX now saves repeated pictures more effectively
(reduces the size of the final document)
-
If the PDF file could not be created, wrong return
code was returned (-1 instead of -3). This problem has been fixed.
-
XLS issues
-
rectangle background color is now supported
-
XFRX is now able to generate multiple sheets for a
single report run, in two modes: sheet-per-page or sheet-per-group
-
The sheet names can now be defined as an expression
evaluated for each sheet
-
The grid can now be hidden in the generated XLS
documents
-
By default, the content of non-stretchable fields is
cut according to the size of the field. XFRX can now optionally leave the
full content of the field in the Excel cell.
-
XFRX Previewer
-
The problem with searching with "Use
Wildcards" and "Search Backward" flags has been fixed
-
"Search Next" was not working correctly if searching
conditions where modified
-
The found expression was not correctly highlighted if
"Use Wildcards" flag was on
-
Reporting engine
-
Pictures stretching across multiple bands should
print once per page
-
XFRXLIB.FLL version checking has been added
-
Various layout problems in FDOC and FRTF output
targets have been fixed