Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

 

HTML page size adjustment

This paragraph applies both to VFP 9 and VFP 8. The ShrinkHeight method is implemented both in XFRXListener and XFRXSession class.

When generating HTML documents, XFRX makes the page a bit shorter by default (by 1.65 inches). This is to suppress the bottom of a page to wrap to a new page when printing from the Internet Explorer. Two lines are added to the printed page - at the top and bottom of the page - as header and footer. By calling ShrinkHeight() method, you can either suppress this behaviour by calling:

ShrinkHeight(0)

or set your own value by which the page will be shrinked. The unit is Inch * 10000, so to make the page shorter by 2 inches, call

ShrinkHeight(20000)

The value sent by ShrinkHeight() method is applied to all output types, not just HTML.

See also: User-defined page size

Plain output

This output type currently does not support images

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 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 

Autoconvert EMF/TIFF to PNG

Because some html previewer doesn't support EMF or TIFF image, you can enable feature for converting EMF/TIFF to PNG. (XFRX 15.5) 
loSession.SetOtherParams("CONVERTEMF_TIFFTOPNG",.T.)

 

 

  • No labels