Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 1038

Doc is missing formatting after being converted from PDF

$
0
0

Hi,

I am using aspose-pdf-10.1.0.jar for converting PDF to Doc. The source PDF has tables but the text and tables are not aligned in converted Doc file.  

Please see the input PDF and converted Doc.

As you notice, tables in pdf are not rendering correctly and text is all over the place 

Below is the code I am using - 

            String filePath = "C:/PDF/source.pdf";

            //Instantiate the Document object

          com.aspose.pdf.Document document = new com.aspose.pdf.Document(filePath); 

          //Create DocSaveOptions object

          com.aspose.pdf.DocSaveOptions saveOptions = new com.aspose.pdf.DocSaveOptions(); 

          //Set the recognition mode as Flow

          saveOptions.setMode(DocSaveOptions.RecognitionMode.Flow );  

            //PS - I have tried TextBox mode too but no luck. 

        //Set the Horizontal proximity as 2.5 

     saveOptions.setRelativeHorizontalProximity(2.5F); 

          //Enable the value to recognize bullets during conversion process

          saveOptions.setRecognizeBullets(true);       

          saveOptions.setFormat(DocSaveOptions.DocFormat.Doc);

          //Save the resultant DOC file

          document.save("c:/PDF/Resultx.doc", saveOptions);

 

Any idea what is causing the issue? is there something missing in the above code? 


 Please suggest.


Thanks

Jogendra

 


Viewing all articles
Browse latest Browse all 1038

Trending Articles