Error when converting pdf to docx: "Specified argument was out of the range of valid values."

using apose.pdf 9.0.0 i recieve this exception when saving the attached pdf to doc:


class com.aspose.ms.System.h: Specified argument was out of the range of valid values.
com.aspose.pdf.ADocument.saveInternal(Unknown Source)
com.aspose.pdf.Document.saveInternal(Unknown Source)
com.aspose.pdf.ADocument.save(Unknown Source)
com.aspose.pdf.Document.save(Unknown Source)


Related code:
Locale.setDefault(new Locale(“en-us”));
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(staticFile.getAbsolutePath());
doc.save(tmpFile, SaveFormat.DocX);

Hi Tor - I’m sure the aspose team will reply more accurately, but I had the same issue in January 2014 and the team reported that .docx conversion was not yet available. The post is on the last page of this thread.



torhenning:
using apose.pdf 9.0.0 i recieve this exception when saving the attached pdf to doc:

class com.aspose.ms.System.h: Specified argument was out of the range of valid values.
com.aspose.pdf.ADocument.saveInternal(Unknown Source)
com.aspose.pdf.Document.saveInternal(Unknown Source)
com.aspose.pdf.ADocument.save(Unknown Source)
com.aspose.pdf.Document.save(Unknown Source)


Related code:
Locale.setDefault(new Locale(“en-us”));
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(staticFile.getAbsolutePath());
doc.save(tmpFile, SaveFormat.DocX);
Hi Tor,

Thanks for using our API’s.

Currently Aspose.Pdf for Java provides the capability to convert PDF files to DOC format and I am afraid it does not offer the feature to convert PDF files to DOCX format. However for the sake of implementation, we have logged this requirement as PDFNEWJAVA-34192 in our issue tracking system. We will further look into the details of this requirement and will keep you posted on the status of correction. Please be patient and spare us little time.

However as a workaround, you can first convert PDF file to DOC format using Aspose.Pdf for Java and then try using Aspose.Words for Java to convert DOC file to DOCX format.

backprop:
Hi Tor - I’m sure the aspose team will reply more accurately, but I had the same issue in January 2014 and the team reported that .docx conversion was not yet available. The post is on the last page of this thread.
Hi Chris,

Thanks for your assistance. Yes you are correct. PDF to DOCX conversion is currently not supported.

Thanks!

But the same error occurs even when converting to HTML and doc, which is stated to be supported.

Hi Tor,


I have tried converting one of my sample PDF files to HTML format using Aspose.Pdf for Java 9.0.0 in Eclipse Juno application running over Windows 7 (x64) with JDK 1.7, and as per my observations, the resultant file is properly being generated.

In case you still face the same issue, please share the resource PDF files so that we can further look into this matter.

[Java]

Locale.setDefault(new Locale(“en-us”));<o:p></o:p>

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("c:/pdftest/input_Converted.PDF");

doc.save("c:/pdftest/ResultantHTML.html", SaveFormat.Html);


The issues you have found earlier (filed as PDFNEWJAVA-34192) have been fixed in this update.


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan