C1PdfDocumentSource with export is losing content

Posted by: john.burke on 24 October 2018, 1:49 pm EST

    • Post Options:
    • Link

    Posted 24 October 2018, 1:49 pm EST - Updated 4 October 2022, 2:02 am EST

    Code is very simple.

    I Load a .PDF into the C1PdfDocumentSource, Iterate over the Pages, and save each Page as a .tif file. This works great.

    I have a situation where one PDF loses content when exported to .tif. It is like disappearing ink.

    Here is the psudo code:

                    C1PdfDocumentSource.LoadFromFile(Invoice.FilePath)
                    Invoice.FilePages = C1PdfDocumentSource.PageCount
    
                        For IndexPage As Integer = 1 To Invoice.FilePages
                                FilePath = System.IO.Path.Combine(Invoice.FilePath & "." & IndexPage.ToString("000") & ".tif")
    
                                    TiffFilter = New C1.Win.C1Document.Export.TiffFilter()
                                    TiffFilter.FileName = FilePath
                                    TiffFilter.Range = New C1.Win.C1Document.OutputRange(IndexPage.ToString)
                                    C1PdfDocumentSource.Export(TiffFilter)
                                    TiffFilter = Nothing
    

    I have attached the original PDF, the exported .tif pages and a screen shot of the 2 areas that are being lost.

    Please help!

    John

    10110776.zip[img]https://gccontent.blob.core.windows.net/forum-uploads/file-fd964d06-2e63-47da-9c1c-9cf426f7a3e0.tif[/img]

  • Posted 25 October 2018, 10:28 am EST

    I was able to narrow it down to the displaying the document in the viewer as well. C1PdfDocumentSource must be the culprit. Here is a snip of that same area of the document in the Viewer.

  • Posted 25 October 2018, 10:29 am EST - Updated 4 October 2022, 2:02 am EST

  • Posted 25 October 2018, 11:51 pm EST

    Hello John,

    As I see in the document properties, the PDF includes Type3 fonts. However, PDFDocumentSource does not support these fonts. This has been mentioned under the limitations in the documentation: http://help.grapecity.com/componentone/NetHelp/C1Document/webframe.html#PDFDocumentSource-Key-Features.html

    Please try changing the font in your PDF. In case the issue persists, kindly share the document and I’ll assist you further.

    Best Regards,

    Esha

  • Posted 26 October 2018, 8:56 am EST

    Thanks for the reply. The document is SHARED in the first post (1011076.ZIP).

    Please let me know if there is anything I can do with the fonts to fix this issue.

    John

  • Posted 29 October 2018, 1:09 am EST - Updated 4 October 2022, 2:03 am EST

    Hello John,

    I referred the pdf in “1011076.zip” and hence, observed that the PDF includes Type3 fonts. However, PDFDocumentSource does not support these fonts. Please change the fonts shown below to some other fonts (other than Type3), and then preview the pdf in C1FlexViewer.

    If the content is lost after this, kindly share the modified pdf.

    Regards,

    Esha

Need extra support?

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

Learn More

Forum Channels