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

Problem exporting PDF with richtext containing images

edited June 2012 in Devices
Testing RB 14.04, when I export a report to PDF containing richtext with images, the richtext/image doesnt appear in the PDF (I use the RB Infopower support - ppWwRiched).

Using RB 10 with TExtrDevices exports PDF fine.

Is there are fix for this?

Carlos


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

Comments

  • edited June 2012
    Hi Carlos,

    The RB PDF device does not support exporting Infopower Richtexts that
    include images directly. You can work around the limitation by setting
    the PDFSettings.ExportRTFAsBitmap property to True.

    Another option is to consider using an RTF component that is fully
    supported such as TRichView.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Em 19/06/2012 16:11, Nico Cizik (Digital Metaphors) escreveu:

    I cannot find this property in Object Inspector. Is it not published?
    Anywaym doesnt look like a good solution for me.


    My ERP uses Infopower since the beggining (+13 years). All my customers
    are used to the Infopower RichEditor, and RB+ExtraDevices were working
    fine until now. Changing to another component doesnt look good for me.

    Is there any plans to fully support wwRichEdit in PDF export? RB support
    wwRichEdit since "pipart" times, it is a shame that the native PDF
    export doesnt support it.

    I'm also not convinced that the problem is really lack of support. Seems
    more like a bug in the PDF device, for example, I have richtexts with
    images that are being exported (altough with incorrect image size), and
    others that are not exported at all. So, what is it? Partial support?
    Sounds like bug to me.

    I can provide richtext samples so you can test them there, if you want to.

    For now, seems that this is a blocking factor to me upgrade to latest RB
    version.

    Carlos
  • edited June 2012
    Hi Carlos,

    I apologize if I was unclear about our intentions.

    We are constantly pursuing the enhancement of the PDF device.

    ReportBuilder first converts all advanced components into metafiles then
    manually reads the metafile commands and translates them to PDF drawing
    commands. This method of vector graphic conversion was originally
    intended to only be used with native advanced components (RichText,
    Barcode, etc.) but we then decided to try to support all metafiles
    making the feature extremely complex.

    In recent years, Infopower has changed the way richtext is rendered
    exposing a limitation of the PDF device that has been in place since the
    beginning. The limitation affects about one percent of all metafiles we
    encounter. We are aware of the limitation and have been actively trying
    to remove it for years without success. This should give you an idea of
    the complexity of the issue.

    That being said, we are still working to enhance the PDF device to fully
    support exporting all metafiles.

    1. The ExportRTFAsBitmap property is public and needs to be set in code.
    This creates a high quality bitmap representation of the RTF component
    and places it inside the PDF.

    2. If you need even higher quality output, you might try using a PDF
    printer such as PrimoPDF, Bullzip, or Acrobat.

    Out of curiosity I tried TExtraDevices with the latest version of
    Infopower. The resulting PDF was incorrectly generated when a Richtext
    included an image.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Hi Nico! Thanks for answering.


    Since I'm still using Delphi 2007, I'm stuck with Infopower Studio 2007,
    so I guess it doesnt has the "changes" you are talking about.


    Good. Maybe you could take a look at my problematic RTFs and try to
    enhance the PDF device to support them?


    This is not an option for me, since it would not allow the person who is
    reading the PDF to copy text from it to paste in other documents.


    The intention of using an export device is to remove the need of
    installing PDF printers. Most of my customers doesnt even understand
    what a virtual printer is, so you can imagine the kind of support I
    would need to provide if they need to install a PDF printer to all of
    their machines


    It works perfect with RB 10, I assure you. TExtraDevices (Waler)
    development seems to be frozen from years, and in spite of the fact that
    you can compile it with no errors using RB 14, it seems that it doesnt
    export RTFs to PDF correctly when used with RB 14. I guess recent
    versions of RB introduced some changew that broke something in TExtraDevices

    I really wish to upgrade to newest RB version since I plan to move to
    XE3 when it is released, but to do that, I need to fix this situation. I
    hope I can count on you and I'm here to help with any test you need me
    to do.

    PS: Out of curiosity, I looked at TppRichView and it lacks the MailMerge
    property available in TppRichText, and I use it a lot.

    Thanks,

    Carlos
  • edited June 2012
    I have more news about this:

    The native PDF device present in ReportBuilder 10 exports the rechtexts
    with images perfectly! So, seems that some change introduced in the
    native PDF device after RB 10 is causing all the damage.

    Just a note: the fact that I cannot hide the native export devices from
    the device list caused some confusion to me, since I see both the PDF
    from TExtraDevices and the native PDF in the list of devices. Actually,
    TExtraDevices is not exporting correctly even in RB 10, so, the
    situation is:

    Exporting RichText with images:

    RB 10 + TExtraDevices: export is not accurate
    RB 10 + native PDF device: works 100% fine!!!
    RB 14 + native PDF device: doesnt export ok, sometimes all the richtext
    are is exported blank, sometimes images are exported with wrong size.

    With this new information, I guess you can compare the native PDF device
    of RB 10 with the actual one and find some change that can be causing
    the problem.

    Hope to hear from you.

    Carlos

    Em 20/06/2012 10:21, Nico Cizik (Digital Metaphors) escreveu:
  • edited June 2012
    Hi Carlos,

    ReportBuilder 10 did not support vector graphic PDF export. Therefore
    all richtext components were first converted to a bitmap then sent to
    the PDF file.

    Unless you are using a different third party utility to export to PDF,
    the result you are seeing in RB 10 is identical to setting
    ExportRTFAsBitmap to True in RB 14.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Em 21/06/2012 15:51, Nico Cizik (Digital Metaphors) escreveu:

    Confirmed, you are right.

    Anyway, I offered to send the problematic RTF to you so you could try to
    enhance/fix the currently PDF device, but you never answered. Should I
    guess that this is a "lost battle" and that I should start looking for
    alternatives?

    I need a honest answer here, since it will affect my future development
    plans when migrating to newest Delphi versions.

    Thanks,

    Carlos
  • edited June 2012
    Hi Carlos,

    Yes, please send the examples (simpler the better) to
    support@digital-metaphors.com in .zip foramt and I'll take a look at them.

    As I mentioned before, this is an extremely difficult issue that we have
    already spent countless hours researching with very little success. We
    will continue to research the limitation as time allows but given its
    history, I cannot guarantee any time frame for a solution.

    We feel that even with this small limitation, ReportBuilder and the
    included PDF device are very powerful and useful tools. The work-around
    options I've already given or simply separating the images from the
    richtexts inside the report should be sufficient to keep you up and
    running until we can support the feature.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2012
    Em 22/06/2012 11:47, Nico Cizik (Digital Metaphors) escreveu:

    It is probably in your mailbox now.


    Please drop me a note, even in private, after you make your first
    analisys of the samples I have sent. Maybe the problem is not extactly
    related to that specific issue you are talking about.


    Things are a bit more complex than you can imagine. Today, my customers
    has total flexibility of creating multiple layouts for some orders, etc.
    They just create the base layout using wordpad or word, and load it into
    the application as rtf. I cannot predict where and if a customer will
    use images inside the text, nor the size, etc. so there is no way to
    separate images from texts keeping the currently flexibility.

    Hope to hear from you soon.

    Carlos
This discussion has been closed.