I haven't see any different after I set EmbedFullFonts

Hi,
What does EmbedFullFonts mean? I set PdfSaveOptions.EmbedFullFonts. But I have’t see any different in size and effect of the resulted PDF file. Can you tell me the difference or give me a example?
Hope to hear from you soon.

Hi,

Thanks for your query. PdfSaveOptions.EmbedFullFonts Property Controls how fonts are embedded into the resulting PDF documents.

When this value is set to true, a complete font file is embedded into PDF without subsetting. This will result in larger output files, but can be a useful option when you want to edit the resulting PDF later (e.g. add more text).

Please convert your document to PDF by using following code snippet. If you still face problem, please share your document for investigation purposes.

// Load the document to render.
Document doc = new Document(MyDir + "in.docx");
// Aspose.Words embeds full fonts by default when EmbedFullFonts is set to true. The property below can be changed
// each time a document is rendered.
PdfSaveOptions options = new PdfSaveOptions(); 
options.EmbedFullFonts = true; 
// The output PDF will be embedded with all fonts found in the document.
doc.Save(MyDir + "Rendering.EmbedFullFonts Out.pdf", options);

Please let us know if you have any more queries.

Thanks for your reply!
But the problem is that whether I set EmbedFullFonts to be true, the converted PDF always embed fonts. I don’t know why.

Hi,

Thanks for sharing the details. Please use both PdfSaveOptions.EmbedStandardWindowsFonts and PdfSaveOptions.*EmbedFullFonts** properties in your code as shown in following code snippet.

// Load the document to render.
Document doc = new Document(MyDir + "in.doc");
// Aspose.Words embeds full fonts by default when EmbedFullFonts is set to true. The property below can be changed
// each time a document is rendered.
PdfSaveOptions options = new PdfSaveOptions();
options.EmbedFullFonts = false;
options.EmbedStandardWindowsFonts = false;
// The output PDF will be embedded with all fonts found in the document.
doc.Save(MyDir + "Rendering.EmbedFullFonts Out.pdf", options);

If you still face problem, please share your document for investigation purposes.

Thanks for your reply.
I have find it successfully. But I find that your algorithom is that if I choose not to embed fonts, you will not embed the font file completely, but will embed the subset that is used in the PDF. But if I just want to use the system default font to show if the system didn’t have the font, what should I do? That is to say, if I did not want to embed font at all, what can I do to set?

Hope to hear from you soon.

Hi,

Thanks for your query.

PdfSaveOptions.EmbedStandardWindowsFonts

The default value is true. When this value is set to false Arial and Times New Roman fonts are not be embedded into PDF. Only Arial and Times New Roman fonts are affected by this setting because MS Word doesn’t embed only these fonts when saving document to the PDF.

This setting works only for the text in ANSI (Windows-1252) encoding. If the document contains non-ANSI text then corresponding fonts will be embedded regardless of this setting.

Note that when saving to PDF/A this option must be set to true as all fonts must be embedded in the PDF file.

PdfSaveOptions.EmbedFullFonts

The default value is false, which means the fonts are subsetted before embedding. Subsetting is useful if you want to keep the output file size smaller. Subsetting removes all unused glyphs from a font. When this value is set to true, a complete font file is embedded into PDF without subsetting. This will result in larger output files, but can be a useful option when you want to edit the resulting PDF later (e.g. add more text).

Some fonts are large (several megabytes) and embedding them without subsetting will result in large output documents.

Please let us know if you have any more queries.