Hi,
i am currently evaluating Aspose.Total and I have to convert legacy PDF-Files to PDF-A1B-Files. Therefore I use Aspose.PDF and followed the how-tos available. I tried a lot, but I keep getting the following exception:
Exception in thread "main" java.lang.RuntimeException: Font name :Arial is not found , PdfConformance.PdfA currently only support TrueType Font .
at aspose.pdf.pdftext.Acb.a(SourceFile:636)
at aspose.pdf.xml.Abp.b(SourceFile:270)
at aspose.pdf.xml.Acm.a(SourceFile:479)
at aspose.pdf.xml.Aaq.a(SourceFile:157)
at aspose.pdf.Section.addParagraph(SourceFile:475)
at aspose.pdf.Pdf.close(SourceFile:672)
As Input I used various PDFs, created with Acrobat X Pro, PDFs converted with Aspose.Words (that actually are already PDF-A1B), PDFs from scanner, etc. All PDFs do NOT contain any Arial-Text, I also tried using PDFs that only contain image-data, but nothing worked.
I use the following code to do the conversion
//Method receives data of PDF-file as byte-array
public byte[] convert2PDFA(byte[] in) {
Pdf p = new Pdf(new BinaryFileStream(in));
p.setConformance(PdfConformance.PdfA1B);
p.close();
byte[] buffer = p.getBuffer();
return buffer;
}
I am working on Windows Vista-Plattform.
Could you please advice on how to get the conversion up and running?
Thanks in advance
Ole