Picture quality when exporting to pdf

Posted by: boettcher on 31 July 2022, 5:24 pm EST

  • Posted 31 July 2022, 5:24 pm EST

    I noticed a problem when I'm exporting documents with the C1FlexViewer.
    When I'm exporting to pdf the picture quality suffers. A lot.
    The images are loaded into a c1.win.flexReport.Imagefield. They are correctly displayed. When they are exported to jpg or png the quality stays the same. When printing to a pdf printer the quality is ok. As soon as I export to Pdf the quality suffers (thats also the case when I use the C1FlexReport RenderToFilter method or the C1PdfDocumentSource Export method)

    I attached samples. One pdf exported with flexviewer, one printed via a pdf printer and the original image.

    - Hans
  • Replied 31 July 2022, 5:26 pm EST

    Sorry for the large picture, That was supposed to go into the zip archive.Sample.zip
  • Replied 1 August 2022, 6:51 pm EST

    Please, post few rows of the code u used to generate PDF!
    Maybe you missed some "switch" while generating
  • Marked as Answer

    Replied 1 August 2022, 8:34 pm EST

    Hi Hans,

    We have tested with your image and unable to replicate this issue at our end i.e., everything is fine.
    There's no image quality issue while exporting to Pdf.

    Please refer the attached sample for the same. It also includes Export_Pdf and Print_Pdf: FlexViewerExportPdf.zip

    Please check at your end too.

    Could you please update the sample to replicate this issue and let us know.
    FYI, We are using C1FlexViewer 4.5.20222.566 version.

    @Fabio, We have tried as follows:
    1. Added ImageField into the FlexReport.
    2. Loaded that FlexReport to the FlexViewer,
    3. Clicked on Export button. (exported as PDF).
    4. Clicked on Print Button and select Microsoft Print to Pdf.(Printed as Pdf)

    Observation - Image quality is good in both Pdf files.

    Best Regards,
  • Replied 3 August 2022, 10:38 pm EST

    Hi Nitin,
    Thank you for your fast reply.

    After a long search I found the mistake.
    The sample you send works without problems.

    My mistake:
    To generate the report I need I generated various reports and merged them together.

    To do that I generated the various reports, got the pages via flexreport.GetPageImage() and added the page via an ImageField to the merged flexreport.
    The report inside the flexviewer looks good.

    If you now export as pdf (only then) the quality suffers.

    I modified your sample to reflect that behavour attached it.

    My workaround for now:
    I export the report as image and turn these into an pdf file.

    - Hans

  • Replied 4 August 2022, 9:10 pm EST

    Hi Hans,

    Thanks for pointing out this issue. We have replicated this issue at our end.
    This seems like a bug. So, that we have escalated this to the development team.
    We will get back to you once we get any update from them. [Internal tracking Id - C1WIN-27960]

    Till you can export according to your workaround.

    Best Regards,
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels