3
Answers

Convert word documents to pdf (file size 200 mb)

bhushan jat

bhushan jat

9y
716
1
I am using interop code:-
 
 
doc = msWordDoc.Documents.Open(ref originalDocPath, ref oMissing, true,
ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing);
// msWordDoc.Documents.Close(ref oMissing, ref oMissing, ref oMissing);
if (doc != null)
{
doc.Activate();
object fileFormat = WdSaveFormat.wdFormatPDF;
//doc.ExportAsFixedFormat((string)originalDocPath, WdExportFormat.wdExportFormatPDF);
doc.SaveAs(ref pdfPath,
ref fileFormat, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing);
 
but this code has restricted me for 88 mb doc file.
Answers (3)
0
Chael Snoden

Chael Snoden

NA 2 0 9y
Do you mean by using interop that you are using Microsoft Office Document Imaging (MODI)?
I used leadtools sdk to convert my documents to PDF so I'm not an expert but if this size limitation is documented in MODI, try converting a group of pages at a time not the entire DOC file then appending to the existing PDF.

Does that work?

0
bhushan jat

bhushan jat

NA 9 1.5k 9y
I am getting below error:-

You have exceeded the maximum number of pages supported by Microsoft Word or this document may be damaged. Microsoft Word will save the document, but to repair the document, use the Open and Repair command (click Open, and then click the arrow next to the Open button)
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 9y
What error you getting?