0

I am using word.ExportAsFixedFormat in my .net code to convert word document into PDF. After building the code in Visual Studio 2017 the .exe it is generating is working fine in my local system but in server it is not working same as local system. PDF it is generating in server is not having some images which were present in word document. Both my local system and server are Windows 10, 64-bit systems.

The arguments are as follows:

void ExportAsFixedFormat(string OutputFileName, WdExportFormat ExportFormat, bool OpenAfterExport = false, WdExportOptimizeFor OptimizeFor = WdExportOptimizeFor.wdExportOptimizeForPrint, WdExportRange Range = WdExportRange.wdExportAllDocument, int From = 1, int To = 1, WdExportItem Item = WdExportItem.wdExportDocumentContent, bool IncludeDocProps = false, bool KeepIRM = true, WdExportCreateBookmarks CreateBookmarks = WdExportCreateBookmarks.wdExportCreateNoBookmarks, bool DocStructureTags = true, bool BitmapMissingFonts = true, bool UseISO19005_1 = false, ref object FixedFormatExtClassPtr);

I am passing only OutputFileNameand ExportFormat. Other parameters are default as above.

Atanu Roy
  • 1,384
  • 2
  • 17
  • 29
  • Same as this? Running Interop serverside is not supported. https://stackoverflow.com/a/16780278/7937272 – Boeryepes Jul 24 '20 at 17:59
  • Is one version of Word 32bit and the other 64bit? Perhaps running out of memory? Are the two Word versions identical? What happens if you manually open and choose SaveAs PDF on the problematic instance? – Ryan Jul 29 '20 at 19:03

0 Answers0