Problem with Font Embedding with ExportAsFixedFormat


L

Laura Villa

Hi,

I'm using word automation to create server-side PDF docs from .docx files.
The word document uses a non-default font (TW Cen). The .pdf document created
has a problem with font embedding: the TW Cen font is replaced with a
similar, but different, font and the layout of the document is quite
different.
It happens even if I specify paramBitmapMissingFonts parameter = true.

If I try to export the same file using the appropriate "Save as PDF" option
in Word 2007 (on the same machine), it works.

The code I use is the following:
-------------------------------------------------------------------------
Word.WdExportFormat paramExportFormat = Word.WdExportFormat.wdExportFormatPDF;
bool paramOpenAfterExport = false;
Word.WdExportOptimizeFor paramExportOptimizeFor =
Word.WdExportOptimizeFor.wdExportOptimizeForOnScreen;
Word.WdExportRange paramExportRange = Word.WdExportRange.wdExportAllDocument;
int paramStartPage = 0;
int paramEndPage = 0;
Word.WdExportItem paramExportItem =
Word.WdExportItem.wdExportDocumentWithMarkup;
bool paramIncludeDocProps = true;
bool paramKeepIRM = true;
Word.WdExportCreateBookmarks paramCreateBookmarks =
Word.WdExportCreateBookmarks.wdExportCreateWordBookmarks;
bool paramDocStructureTags = true;
bool paramBitmapMissingFonts = true;
bool paramUseISO19005_1 = true;

oWordDoc.ExportAsFixedFormat(fileName,
paramExportFormat, paramOpenAfterExport,
paramExportOptimizeFor, paramExportRange, paramStartPage,
paramEndPage, paramExportItem, paramIncludeDocProps,
paramKeepIRM, paramCreateBookmarks, paramDocStructureTags,
paramBitmapMissingFonts, paramUseISO19005_1,
ref missing);
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top