PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Embedding all fonts in a document
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3608
Page 1 of 1

Author:  osaiz [ Tue Jun 20, 2017 1:35 pm ]
Post subject:  Embedding all fonts in a document

Hello.

I'm merging different PDF files. I'm doing it following the examples:
1.- creating a new document (newdoc)
2.- opening each doc to be merged in import mode.
3.- for each page of each document opened in 2, newdoc.AddPage(page)
4.- save the newdoc newdoc.Close()

After finishing I'm running Ghostcript to embed all the used fonts in the merged document.
It works ok, but it is quite slow.

I wonder if there is a way to get rid of the Ghoscript step, i.e. embedding the used fonts when I merge the PDF files with pdfsharp. I've seen examples of embedding fonts in pdfsharp but it is always explicitely done (Font by Font).
In my case I'd like ALL the used fonts to be embedded.

Any clue will be appreciated.

Thanks in advance

Oskar

Author:  Thomas Hoevel [ Wed Jun 21, 2017 8:08 am ]
Post subject:  Re: Embedding all fonts in a document

Hi!
osaiz wrote:
After finishing I'm running Ghostcript to embed all the used fonts in the merged document.
It works ok, but it is quite slow.
AFAIK fonts that are embedded before the merge will still be embedded after the merge.
PDFsharp cannot embed fonts for existing PDF documents that use non-embedded fonts, so a third-party tool is needed for this.
No extra step is needed if all fonts are already embedded.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/