Free Support Forum - aspose.com

Save as PDF causes problems with fonts- spacing

Hi,
We're having lots of problems with saving docs as PDF. The saved PDFs really mess up the fonts and spacing.

Our process is that we build a document up in Word, appending pages one at a time to various lengths, depending on the document bundle we are generating. Then we take the resulting Word doc and save it as PDF and that's when the problems show up in the PDF. Here's the code we're using to save as PDF, I've tried numerous approaches, using files, streams, etc. All methods result in the same problems.

Document doc = new Document(@"C:\temp\PS102817.doc");
doc.Save(@"C:\temp\PS102817.pdf", SaveFormat.Pdf);

Attached are the two docs. Here are some of the problems:

Page 2 - Font problems with "WELCOME" text
Page 4 - Spacing problems
Page 5 - Font problems in the paragraph text

Hi Rich,


Thanks for your inquiry. I have converted the shared Doc to Pdf file and have faced text rendering issue while using latest version of Aspose.Words for .NET. Please use the latest version of Aspose.Words for .NET. The document’s text is not correctly rendered in output PDF file. I have logged this issue as WORDSNET-7081 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thanks for looking into this. Is there anything in the mean time that I can be doing to help speed this fix along? Is there something specific in the Word doc that is causing this? I can note, that if I use a desktop addition of Adobe Acrobat, it creates the PDFs fine.


Hi Rich,

Aspose.Words saves the provided document to the PDF incorrectly because incomplete font subsets are embedded to the document. MS Words opens this document correctly because it loads corresponding full fonts from system in this case. Aspose.Words currently doesn’t handles this case. We will fix this problem in the next release. However if you try to use this document on the system where corresponding full fonts are not installed then even MS Word will not open this document as expected.

As far as I understand the font subsets are built and embedded to the initial document when you save it in MS Word. It means that font subsets contains only characters which are used in the initial document. Aspose.Words doesn’t update the embedded font subsets when editing the document. So when you append additional pages to the initial document the embedded font subsets become incomplete.

As a workaround you could either embed full fonts to the initial document instead of subsets when saving it in MS Word or not embed fonts to the document at all.

Ok, cool. That actually helps a lot. For others interested, to remove embedded fonts in Word 2007 - 2010:

  • Open up Word doc
  • Go to Office button
  • Click “Word Options” at bottom right of menu
  • Click to “Save” section on left
  • Uncheck "Embed fonts in the file"
  • Click OK, then save document.

Hi Rich,


Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

The issues you have found earlier (filed as WORDSNET-7081) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.