We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF converted to docx doesn't not format correctly

Hello,

I have a pdf file that will not preserve formatting or convert properly using this code:

 tmpDoc.OptimizeResources(new Aspose.Pdf.Document.OptimizationOptions()
                    {
                        LinkDuplcateStreams = false,
                        RemoveUnusedObjects = true,
                        RemoveUnusedStreams = false,
                        CompressImages=false,
                        ImageQuality=50
                    });

                    tmpDoc.Save(tmpStream, new Aspose.Pdf.DocSaveOptions(){
                        Format = Aspose.Pdf.DocSaveOptions.DocFormat.DocX,
                        Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Textbox
                    });

i am linking the PDF below
Sovern SampleResume.pdf (54.5 KB)

@shayan.ahmad,
We have tested your PDF document and code snippet with the latest version 17.7 of Aspose.Pdf for .NET API and the output DOCX fileOutputDOCX.zip (48.9 KB) looks fine. Kindly highlight the formatting issues with the help of a snapshot (if any). We will investigate and share our findings with you.

Best Regards,
Imran Rafique

Hello, can you try and convert that converted resume to SVG format using:

var options = new Aspose.Words.Saving.SvgSaveOptions()
{
ExportEmbeddedImages = true,
TextOutputMode = Aspose.Words.Saving.SvgTextOutputMode.UsePlacedGlyphs,
ShowPageBorder = false
};

                    doc.Save(outputStream,options); 

it doesnt format correctly.

@shayan.ahmad

Thanks for your feedback. We have tested the scenario with Aspose.Words for .NET 17.7 and noticed text is missing in resultant SVG. We have logged a ticket WORDSNET-15710 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

@shayan.ahmad,

The issues you have found earlier (filed as WORDSNET-15710) have been fixed in this Aspose.Words for .NET 17.9 update and this Aspose.Words for Java 17.9 update.