Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Using GDI+ EMF to export to PDF with RB 12.05

edited September 2011 in General
Hi!

when producing an EMF using GDI+ feature (from a TeeChart 2011) it will not
be displayed in a TppImage of RB 12.05 correctly when the report is exported
to PDF.

The GDI+ EMF can easily be created by adding a TTeeGDIPlus component to a
form and assigning any TeeChart to the published "TeePanel" property. To
assign the resulting EMF to the tppImgage component I used this common
source code:
http://www.digital-metaphors.com/rbWiki/RCL/Chart/How_To...Chart_As_Image

The result is OK in RB preview and on printer.

But the PDF export leads to an nearly empty ppImage.

best regards
Jo

System:
Delphi XE Enterprise
Windows 7 / 64Bit
TeeChart 2011.03.30407 Win 32
RB pro 12.05 Build 224

Comments

  • edited September 2011
    Hi Jo,

    In my testing with the TeeGDIPlus component it looks as though the
    resulting metafile created uses the ModifyWorldTransform command
    numerous times. This currently is a limitation of the PDF device's
    metafile rendering capability.

    As a workaround you can use the Chart.TeeCreateBitmap routine to render
    the chart as a bitmap rather than a metafile or you can let the PDF
    device convert the metafile for you by setting the
    PDFSettings.ExportMetaFileAsBitmap property to True. Note that the
    second option may give poor resolution.

    For the next release of ReportBuilder there will be high quality bitmap
    conversion as well as JPEG compression added to the PDF device making
    this process much easier and giving smaller files.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.