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

Problem when exporting PDF

edited June 2012 in General
Hello,

I am creating an Report Builder Archive which contains several reports and one of them has image objects displaying metafiles. When the archive is exported to a PDF file, the metafiles are not exported correctly. The texts will be lost. See my Archive file (you can download it here: www.msse.at/_dwnld/testarchive.zip).

Render the archive to a Viewer and the texts will be displayed fine.

I use DelphiXE2 and compile 32bit and the latest RB version 14.05.

Regards,
Michael

Comments

  • edited June 2012
    I tested your images and found that they use the ModifyWorldTransform
    metafile command.
    Unfortunately, RB is not support this command in the PDF meta reader (can
    not
    correct export images with this command).

    I found this problem 1 year ago.

    In RB 12 I try used TppPDFSettings ExportMetaFileAsBitmap and
    MetafileToBitmapQuality
    properties for some kind fix of this problem.

    In RB 14 in TppPDFSettings was added UseJPEGCompression property which
    will allow to export images
    as JPG instead bitmap.

    But all of this is not so good as metafile...
    Additionaly:
    1. ExportMetaFileAsBitmap, MetafileToBitmapQuality, UseJPEGCompression is
    not a published properties.
    They are not available for end user.
    You have to write code (or patch RB sources), if you want that end user
    have control of them in designer, rap or ExportToFile Dialog.
    2. This properties can not be set for single (selected) metafile. As
    result - all metafiles in report will be exported as BMP (or JPG).

    May be this 2 "defects" will be fixed in new versions...
    On this moment - I have to used patch for do this....

    I spend a lot of time on this problem.
    I found that all editors (all C# programs as example) that used GDI+ for
    metafile generation, inserts ModifyWorldTransform command in it.
    But Delphi XE used gdi32 for metafiles.
    I don't found any problems with export gdi32 metafiles in PDF...


    On Fri, 01 Jun 2012 09:25:38 +0300, Michael Schwarzl
  • edited June 2012
    Hi Michael,

    As Dima mentioned. The RB PDF device does not currently support the
    ModifyWorldTransform API command when processing metafiles. To work
    around the issue you will need to set the ExportMetafileAsBitmap
    property of the PDFSettings to True.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Hi Dima,

    Thanks for chiming in and giving feedback about this issue.

    We have known about this for much longer than a year. Nard and I have
    spent countless hours researching the problem with next to nothing to
    show for it. It is very frustrating.

    If you would like, please send me an absolute minimum metafile that
    exports incorrectly and uses the ModifyWorldTransform command and I will
    try to look at it again.

    Best Regards,

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