consolidate the fonts between merges pdfs itextsharp C#

前端 未结 2 1875
暖寄归人
暖寄归人 2021-01-24 19:17

I need to merge multiple pdfs together. I am using itextsharp to create all the pdfs. I need to reduce the size of the pdfs to the lowest possible size. I know the fonts are

相关标签:
2条回答
  • 2021-01-24 19:59

    You could rename subsets.

    As if you had

    Helvetica (subset)

    and

    Helvetica (subset)

    you would create

    Helvetica-1 (subset)

    and

    Helvetiva-2 (subset)

    once they were different implementations (binary stream compare)

    0 讨论(0)
  • 2021-01-24 20:07

    My answer consists of two parts:

    1. You're not telling us how you're merging the PDFs. Let's hope you've read the official documentation and that you're using PdfSmartCopy. If not, you're doing it wrong. PdfSmartCopy examines the content of the different PDFs and reuses possibly redundant objects (such as reused images, XObjects, fonts). Note that there were some bugs in earlier versions of PdfSmartCopy so please make sure you're using the latest version.
    2. If the different PDFs use different subsets of the same font, you're out of luck. iText doesn't merge font subsets. Merging different font subsets would involve rewriting content streams, creating new fonts if we're talking about simple font sets that require more than 256 characters if the subsets are merged, etc...
    0 讨论(0)
提交回复
热议问题