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

Free Support Forum - aspose.com

Pdf to docx issue

Hi,

while converting pdf to docx, aspose is converting every line to a para.

but as per our requirement it has to mimic of pdf

so ,can you please help us on this

PFB code :

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("C:\\Input.pdf");
pdfDocument.save("C:output.doc", com.aspose.pdf.SaveFormat.DocX);

System.out.println("convertion PDF To DOC is done");


Thanks,
Rajesh

Hi Rajesh,


Thanks for your inquiry. Please note AddReturntoLineEnd property controls the break, by default it is set to line break. You may set property to false for paragraph break as following. It will help you to accomplish the task.

// Load source PDF file<o:p></o:p>

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("Input.pdf");

// Instantiate Doc SaveOptions instance

DocSaveOptions saveOptions = new DocSaveOptions();

saveOptions.setAddReturnToLineEnd(false);

// Set output file format as DOCX

saveOptions.setFormat(DocSaveOptions.DocFormat.DocX);

// Save resultant DOCX file

doc.save("resultant.docx", saveOptions);


Please feel free to contact us for any further assistance.

Best Regards,

Hi ahmad,


Thanks for your reply.

After using this code “saveOptions.setAddReturnToLineEnd(false);”, still we are facing some issues while converting pdf to docx when the text is in the fotnote.

Can you please help us on this

PFA

Thanks,
Rajesh

Hi Rajesh,


Thanks for your inquriy. I have tested the scenario with Aspose.Pdf for Java 11.6.0 and unable to notice any issue. We will appreciate it if you please download and try latest version of Aspose.Pdf for Java, it will resolve the issue. However if the issue persist then please share your sample code and environment detail as well, so we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Hi Ahmad,


Thank you for your reply.

Still we are facing issue.

which you have shared the output doc is also having the issue.

The below paragraph is having only one paragraph. so, the paragraph symbol has to come at the end of it but here it was coming at first line end.i have attached the snippet for more info

Thanks,
Rajesh






Hi Rajesh,



Kusumanchi.Rajesh:

Still we are facing issue.

which you have shared the output doc is also having the issue.

The below paragraph is having only one paragraph. so, the paragraph symbol has to come at the end of it but here it was coming at first line end.i have attached the snippet for more info



I am sorry for the confusion. Actually text was missing in your shared output DOCX file so I thought you are facing missing text in footnote. However I have noticed the paragraph break issue in footnote text as well and logged a ticket PDFJAVA-35924 for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

Hi Ahmad,


Thanks for your reply.

Could you please provide me the status of the ticket PDFJAVA-35924.

Thanks,
Rajesh


Hi Rajesh,


We are sorry for the inconvenience. Your above reported issue is still not fixed, as product team is busy in resolving other issues in the queue. We will notify you as soon as we made some significant progress towards your issue resolution.

Thanks for your patience and cooperation.

Best Regards,

The issues you have found earlier (filed as PDFJAVA-35924) have been fixed in Aspose.Pdf for Java 16.11.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(2)