Issues in PDF to files conversions


#1

Hello team
I am facing some issues in PDF to files conversion.
issues are below:-

PDF to Doc conversion source -

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("pdfFilePath.pdf");
com.aspose.pdf.DocSaveOptions saveOptions = new com.aspose.pdf.DocSaveOptions();
saveOptions.setFormat(com.aspose.pdf.DocSaveOptions.DocFormat.Doc);
doc.save("docFilePath.doc", saveOptions);
//saveOptions.setFormat(com.aspose.pdf.DocSaveOptions.DocFormat.DocX);
//doc.save("docFilePath.docx", saveOptions);

PDF to Doc conversion issue while saving doc files -

class com.aspose.pdf.internal.ms.System.ArgumentException: Save a document to a doc format is not supported.
com.aspose.pdf.ADocument.m1(Unknown Source:74)
com.aspose.pdf.Document.m1(Unknown Source:0)
com.aspose.pdf.ADocument.save(Unknown Source:38)
com.aspose.pdf.Document.save(Unknown Source:0)
com.pdfeditor.ui.dashboard.aspose.pdf.PdfOperationModel$13.subscribe(PdfOperationModel.java:1149)
io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
io.reactivex.Observable.subscribe(Observable.java:12030)
io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
java.lang.Thread.run(Thread.java:764)

PDF to PPTX conversion source -

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("pdfFilePath.pdf");
com.aspose.pdf.PptxSaveOptions pptx_save = new com.aspose.pdf.PptxSaveOptions(); // Not found in com.aspose.pdf package & issue occur without this line
doc.save("pptxFilePath.pptx", SaveFormat.Pptx);

PDF to PPTX conversion issue -

class com.aspose.pdf.internal.ms.System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
com.aspose.pdf.ADocument.saveInternal(Unknown Source:36)
com.aspose.pdf.Document.saveInternal(Unknown Source:0)
com.aspose.pdf.ADocument.save(Unknown Source:78)
com.aspose.pdf.Document.save(Unknown Source:0)
com.pdfeditor.ui.dashboard.aspose.pdf.PdfOperationModel$14.subscribe(PdfOperationModel.java:1207)
io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
io.reactivex.Observable.subscribe(Observable.java:12030)
io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
java.lang.Thread.run(Thread.java:764)

PDF to xls conversion source -

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("pdfFilePath.pdf");
com.aspose.pdf.ExcelSaveOptions options = new com.aspose.pdf.ExcelSaveOptions();
doc.save("xlsFilePath.xls", options);

PDF to xls conversion issue -

Conversion has been done but unable to open the document

NOTE: PDF to Xlsx conversion work perfectly :slight_smile:

PDF to XPS conversion source -

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("pdfFilePath.pdf");
com.aspose.pdf.XpsSaveOptions options = new com.aspose.pdf.XpsSaveOptions();
doc.save("xpsFilePath.xps",options);

PDF to XPS conversion issue -

Save  to  XPS is not implemented

PDF to HTML conversion source -

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("pdfFilePath.pdf");
com.aspose.pdf.HtmlSaveOptions options = new com.aspose.pdf.HtmlSaveOptions();
doc.save("htmlFilePath.html",options);

PDF to HTML conversion issue -

Save in HTML format is not supported

I am using Aspose.PDF version 19.3 android via java for above operations
You can try any PDF file as an input.

Hope you understand all above issues.
Thanks


#2

@MathiasT

Thank you for contacting support.

Would you please also share generated XLS file along with the source document for our reference. We will investigate all of these scenarios then and will proceed accordingly. Moreover, please always create separate topics for each problem, for future references; because it allows us to assist you efficiently and will be more helpful for other community members.


#3

demo.zip (13.1 KB)
input PDF & output XLS has attached above and also I would like to tell you that the generated file is opening in WPS office but it is not opening in google drive & Sheets app in android devices.
Maybe there is something wrong with the conversion formating.
Regarding the separate topics, I got your point and from the next time, I’ll make sure to create separate tickets for every issue/topic.
Thank you


#4

@MathiasT

Thank you for contacting support.

We have logged below tickets in our issue management system for further investigations and resolution.

PDFANDROID-565: Problem converting PDF to Word files
PDFANDROID-570: Problem converting PDF to XLS files
PDFANDROID-571: Problem converting PDF to XPS files
PDFANDROID-572: Problem converting PDF to HTML files

Moreover, Aspose.PDF for Android via Java currently does not support conversion to PPTX format so the feature request has been logged as PDFANDROID-569. We will let you know as soon as any update will be available.