Hello,
We are evaluating Aspose.pdf/kit (we already license Aspose.Words for Java for a long time now). The primary thing we're interested in is converting PDF docs to HTML format (text only).
I downloaded aspose-pdf-kit-4.6.1-java and gave it a try. The resulting HTML doc contains the text very nicely formatted, but there are numerous places where the end of one phrase overlaps the beginning of the next phrase. The original PDF doc and the resulting HTML doc are attached. You can see the occurrences starting at the top of the HTML doc with the phone number overlapping the following word 'Email', and then the first bullet under Summary has 'Java' and 'J2EE' overlapping, etc. Looking at the HTML source it seems that the absolute left positioning of the phrases may not be correct in some cases.
Will this problem be fixed?
When will it be fixed?
My test code is below.
Thanks in advance-
Becky McElroy
______________________
public static void main(String[] args)
{
if (args.length < 1)
{
System.out.println("Enter arg: path to pdf file");
System.exit(1);
}
try
{
// /create PdfExtractor object
PdfExtractor extractor = new PdfExtractor();
// bind input pDF file
File f = new File(args[0]);
extractor.bindPdf(new FileInputStream(f));
// extract text
extractor.extractText();
// save extracted text as HTML
extractor.extractTextAsHTML(args[0].substring(0, args[0].length() - 3) + "html");
// close PdfExtractor object
extractor.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}