Hi,
Not sure if i am doing something wrong but the quality of Pdf Kit image conversion seems to be really bad.
I tried several random PDFs and they all had color problems, kerning problems etc.
Here is a screenshot of adobe reader displaying the PDF followed by what PDF kit outputs.
http://img827.imageshack.us/img827/704/adbrder.jpg
http://img821.imageshack.us/img821/180/page1ew.jpg
Is my trial license not getting applied perhaps and its applying some limitations? Thanks for any help.
Code is:
License license = new License();
FileInputStream licenseStream = new FileInputStream(“Aspose.Total.Java.lic”);
license.setLicense(licenseStream);
File dir = new File(“D:\Temp\pdf\”);
String[] files = dir.list();
for(String file : files){
if(file.endsWith(".pdf")){
File outputDir = new File(“D:\Temp\pdf\output.” + file);
outputDir.mkdir();
PdfConverter converter = new PdfConverter();
converter.bindPdf(“D:\Temp\pdf\” + file);
converter.doConvert();
String prefix = “D:\Temp\pdf\output.” + file + “\page-”;
String suffix = “.bmp”;
int imageCount = 1;
while (converter.hasNextImage())
{
converter.getNextImage(prefix + imageCount + suffix, ImageType.BMP);
imageCount++;
}
}
}
}catch(Exception ex){
ex.printStackTrace();
}