Convert pdf to xml


#1

hi,

i want to convert a pdf file to xml. there are some table in the pdf file. the table data will dislocation when using excel2007 to open the xml.for example:
some data have two line in the table’s cell of pdf. but the second line data will move to next row.some data in a cell will word wrap. please refer to the source file in the attachment. i am using aspose pdf for java 11.7 version

Best Regard!

Eric

#2
Hi Eric,

Thanks for using our API's.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFJAVA-36063 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.

#3

Dear Team,
Conversion from Pdf to Xml format still having issues, I already went through all the reference provided by your team and still unable to fix it… kindly resolve the above issue as soon as possible.

Attached sample input for your reference.

Sample input
Testxlsx.zip (522.0 KB)

Thank you in advance.


#4

@resh05

We tried to convert your PDF into XLSX using following code snippet and Aspose.PDF for Java 19.6.

try {
  Document doc = new Document(dataDir + "Testxlsx.pdf");
  ExcelSaveOptions ex = new ExcelSaveOptions();
  ex.setFormat(ExcelSaveOptions.ExcelFormat.XLSX);
  doc.save(dataDir + "Testxlsx.xlsx", ex);
} catch (Exception ex){
  ex.printStackTrace();
}

We were able to reproduce the issue that output file did not contain any images as well as formatting was also not correct. Therefore, an issue has been logged in our issue tracking system as PDFJAVA-38702. We will definitely look into details of the issue and keep you posted with its rectification status. Please spare us little time.

We are sorry for the inconvenience.