aspose-pdf / Aspose.PDF-for-Java

Aspose.PDF for Java examples, plugins and showcases
https://products.aspose.com/pdf/java
MIT License
127 stars 133 forks source link

Aspose Pdf to Word #20

Open wenky opened 8 years ago

wenky commented 8 years ago

Hi, We are trying to convert a PDF to Word Document using aspose api. But the word document we get after conversion is loosing the whitespace characters and the text in the word document are wrapped one on another.

Could you please provide some sample code for PDF to Doc Conversion or any customizations in the conversion to be good. we are using Aspose PDF 11.0.0.jar Please see the below image for reference. (there are no spaces in between the words) image

codewarior commented 8 years ago

Hi,

The problem appears to be related to input document. Can you please upload the document to some free file sharer and share the link, so that we can test the scenario in our environment. We apologize for this inconvenience.

wenky commented 8 years ago

Hi CodeWarrior, Thanks for a quick response Please find the input pdf and let us know how to resolve. Your help is highly appreciated. Thanks, Wenky. input.pdf

codewarior commented 8 years ago

Hi Wenky,

Thanks for sharing the resource file.

I have tested the PDF to DOC conversion and as per my observations, the space between words is being removed. For the sake of correction, I have logged it as PDFNEWJAVA-35854 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

wenky commented 8 years ago

Hi , Could you please share the ETA for this issue. We are waiting for this fix as it is critical to our business.

codewarior commented 8 years ago

Hi Wenky,

Thanks for your patience.

The product team has started investigating earlier reported issue but due to some technical limitations in API, they are not yet resolved. However as soon as we have some definite updates, we will let you know.

wenky commented 8 years ago

Hi CodeWarior, Could you please share the technical difficulty or any work around for this. I'm a developer by myself . So I can try a work around for time beeing.

codewarior commented 8 years ago

Hi Wenky,

Thanks for your patience.

The product team has started the investigation of earlier reported issue but I am afraid due to some technical limitations in our API, the issue is not yet resolved. However I have inquired latest updates and have requested the product team to share any possible workaround. As soon as we have some further updates, we will let you know.

wenky commented 8 years ago

Hi Code Warrior, Could you please let us know the issue can be fixed. Or please let us know the technical difficulty in this PDF.We will try to generate a Latest Version of PDF if required.

Please let us know the exact TECHNICAL DIFFICULTY , we would like to solve from our end.

codewarior commented 8 years ago

Hi Wenky,

Thanks for your patience.

Until or unless we have investigated the issue in details, we may not be able to share the exact reasons causing this problem. However as soon as we have some definite updates, we will let you know.

wenky commented 8 years ago

Hi CodeWarrior, Any update on this. :)

codewarior commented 8 years ago

Hi Wenky, Thanks for your patience. The product team has started investigating earlier reported issue but due to some technical limitations in API, its not yet resolved. However we plan to get it resolved in Aspose.Pdf for Java 12.0.0 which is scheduled to release in Q4-2016. As soon as we have some definite updates, we will let you know.

wenky commented 8 years ago

Thanks CodeWarior. That's a great news for us. Just if it is possible,Could you please share the converted word document prior to the release(in a near time now). So that we can wait for the release.

codewarior commented 8 years ago

Hi Wenky, Once the product team has made some progress and we have some better output, we will share the result file for your reference. Your patience and comprehension is greatly appreciated in this regard.

In case of any further query, please feel free to contact.

wenky commented 8 years ago

Hi Codewarrior, Any update on this.we are waiting for this fix.

codewarior commented 8 years ago

Hi Wenky,

Thanks for your patience. The product team has completed an initial investigating and I am in coordination with product team to get possible ETA. As soon as we have some definite updates, we will let you know.

We are sorry for this delay and inconvenience.

wenky commented 8 years ago

Hi CodeWarrior, Thanks for the fix. We have verified with the above mentioned release. We are getting the spaces between the words..But still the PDF is not looking good for the user perspective. The fonts/text are not looking good. Is this anything that can be changed programatically in aspose

image

wenky commented 7 years ago

Hi CodeWarrior, Any Update on this?

codewarior commented 7 years ago

Hi Wenky,

Thanks for sharing the feedback and sorry for the delayed response.

I have tested the scenario using latest release of Aspose.Pdf for Java 16.10.0 and I am unable to notice any issue. Can you please try using the latest release and share your findings. Please take a look over image shared over this link.

wenky commented 7 years ago

Hi CodeWarior, The link you showed did a really good conversion,May it is not finding any fonts required for the conversion on our machines.

Could you please share as any extra fonts that need to be added to get the output in the link. Is there a way you can help us in finding the fonts required for the conversion.

codewarior commented 7 years ago

Hi Wenky,

In order to perform proper conversion, you need to have all fonts used in your PDF file, available on your system. In case the fonts are missing, the conversion may encounter issues.

wenky commented 7 years ago

Hi CodeWarrior, Can you please guide us in finding the required fonts. We are doing the conversion on a linux machine.we have copied the fonts from our windows machine to linux, But still the same problem exists.

codewarior commented 7 years ago

Hi Wenky,

In order to determine the required fonts, please check Fonts tab under Document properties section. Furthermore, please note that for non-Windows OS's, you need to set font folder path according to your system before start any processing. You can use following methods to get system folder of fonts or set font path to font folders. Hopefully it will help you to fix the issue.

Document.getLocalFontPath () - shows the system folder in which project will look for fonts. Document.setLocalFontPath (String) - Setting font path to custom folder

//adding a new font path String path = "c:\fonts\"; com.aspose.pdf.Document.addLocalFontPath(path); .... ....

Moreover please also check following code snippet to set font path if there are more than one font path.

//getting the list for standard font directories in different OS java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();

//setting the user list for standard font directories list.add("c:\fonts2\"); list.add("c:\fonts3\"); com.aspose.pdf.Document.setLocalFontPaths(list);

LemjidMohamed commented 5 years ago

Hello, When talking about the pdf file, I got a bad word with the Aspose library:

image

Our client does not accept blocks, he sees a word document like that of the original office. Do you have an idea please?

asadalikhan90 commented 2 years ago

@LemjidMohamed

Please use Aspose.PDF for Java 22.4 for PDF to Word Conversion as we have improved this feature lately. Furthermore, please create a post in our official support forum in case you notice any issues. We will further proceed to assist you accordingly.