Error format convert doc to pdf

                    string pathPdf = "";                

                    WordDocument wordDocument = new WordDocument(pathdoc, FormatType.Automatic);             

                    wordDocument.ChartToImageConverter = new ChartToImageConverter();                    

                    wordDocument.ChartToImageConverter.ScalingMode = ScalingMode.Normal;

                    DocToPDFConverter converter = new DocToPDFConverter();

                    pathPdf = Path + fileName + ".pdf";

                    //Converts Word document into PDF document

                    PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);

                    converter.Settings.EnableFastRendering = true;                   

                    wordDocument.Close();

                    //Releases the resources occupied by DocToPDFConverter instance

                    converter.Dispose();

                    //Saves the PDF file

                    pdfDocument.Save(pathPdf);

                    //Closes the instance of document objects

                    pdfDocument.Close(true);


Please, Help my project convert doc to pdf not fully format. So pdf lost line please see the pdf file.

Thanks


Attachment: c1e0debfd2844094800846ded79664db_eb2d463f.rar

1 Reply

AN Anto Nihil Sahaya Raj Syncfusion Team May 24, 2022 11:03 AM UTC

Hi Truong,

We are able to reproduce the reported “Line shape is not preserved in Word to PDF conversion at our end.

On further analyzing, we have found that the input Word document contains shape. Currently, DocIO doesn’t have support for shape preservation in DOC to PDF conversion. We have shape support in DOCX format to PDF conversion.

Note: As we are concentrating to add DOCX file format specific features, there is no plan for adding this feature for the DOC file format currently. So, we recommend as a workaround kindly resave the “.doc” format Word document as “.docx” using the Microsoft Word application. Then convert this DOCX format document to PDF using DocIO.

We have modified your input Word document according to this. Please find the modified document from below link:

https://www.syncfusion.com/downloads/support/directtrac/general/doc/c1e0debf-d284-4094-8008-46ded79664db_Modified120123826.docx

Regards,

Anto Nihil S


Loader.
Up arrow icon