Hi Please let me know whether there is any update on PDF to PDF/A format convertion.
Thanks
Hi Please let me know whether there is any update on PDF to PDF/A format convertion.
Thanks
Hi Sherry,
Hi Sherry,
Thank you very much.
I am getting below error when i try to convert a pdf to PdfFormat.PDF_A_1B. Is this a known issue??
class com.aspose.ms.System.aw: Cannot access a disposed object.
Object name: 'MemoryStream'.
com.aspose.ms.System.d.m.c(Unknown Source)
com.aspose.ms.System.d.m.getLength(Unknown Source)
com.aspose.ms.a.b.e.a.available(Unknown Source)
com.aspose.pdf.ADocument.convert(Unknown Source)
com.aspose.pdf.Document.convert(Unknown Source)
Hi Sherry,
Here is the sample code. I read the PDF file to a byte[] and convert to a PDF/A. You can try any pdf with around 750 KB of size.
public static byte[] convertPDFToPdfa (byte[] inputByteArray) throws Exception {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(new ByteArrayInputStream(inputByteArray));
doc.convert(System.out, com.aspose.pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.None);
doc.save("C:\\download\\sample.pdf");
return byteStream.toByteArray();
}
Hi Sherry,
Any idea when we can expect the newer release having this issue resolved?
Hi Sherry,
Thank you very much. This new release worked for us.
I have two questions
1) Can doc.convert() method first parameter accept the general Logger like apache logger?
2) what is the difference between below two statements having the third parameter.
doc.convert(System.out, com.aspose.pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.None);
and doc.convert(System.out, com.aspose.pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
For me ConvertErrorAction.None didn't worked at all and ConvertErrorAction.Delete worked.
sherry.katz:1) Can doc.convert() method first parameter accept the general Logger like apache logger?
sherry.katz:2) what is the difference between below two statements having the third parameter.doc.convert(System.out, com.aspose.pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.None);
and doc.convert(System.out, com.aspose.pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);For me ConvertErrorAction.None didn't worked at all and ConvertErrorAction.Delete worked.
The third parameter specifies to convert the document and save errors into specified Stream/String. The action value indicates the action for objects which cannot be converted (either delete the objects which cannot be converted or take no action against objects which cannot be converted).
In the event of any further query, please feel free to contact.
Thank you very much.
Hi,
Hi Sherry,
com.aspose.pdf.Document.setLocalFontPath(path);
Please feel free to contact us for any further assistance.
Best Regards,
I tired by pointing to a local folder.
Hi Sherry,
//adding a new font path<o:p></o:p>
String path = "c:\\fonts\\";
com.aspose.pdf.Document.addLocalFontPath(path);
//geting the list for standard font directories in different OS
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
//seting the user list for standard font directories
list.add("c:\\fonts2\\");
list.add("c:\\fonts3\\");
com.aspose.pdf.Document.setLocalFontPaths(list);
//Restoring list for standard font directories by default.
com.aspose.pdf.Document.restoreLocalFontPath();
Now, I am getting below error.
[1/30/14 17:22:42:895 EST]
0000002f SystemErr R java.lang.UnsupportedOperationException
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.c.e.c.c.(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.f.a.a(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.c.e.c.aa.a(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at com.aspose.pdf.a.c.e.c.a.a.a(Unknown
Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
aspose.pdf.html.HtmlWeb.setFont(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.c.e.d.d.a(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.j.a.b.a(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.j.a.b.i(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.a.j.a.b.a(Unknown Source)
[1/30/14 17:22:42:895 EST] 0000002f SystemErr R at
com.aspose.pdf.ADocument.convert(Unknown Source)
[1/30/14 17:22:42:896 EST] 0000002f SystemErr R at
com.aspose.pdf.Document.convert(Unknown Source)
[1/30/14 17:22:42:896 EST] 0000002f SystemErr R at com.aspose.pdf.ADocument.convertInternal(Unknown
Source)
[1/30/14 17:22:42:896 EST] 0000002f SystemErr R at
com.aspose.pdf.Document.convertInternal(Unknown Source)
[1/30/14 17:22:42:896 EST] 0000002f SystemErr R at
com.aspose.pdf.ADocument.convert(Unknown Source)
[1/30/14 17:22:42:896 EST] 0000002f SystemErr R at
com.aspose.pdf.Document.convert(Unknown Source)
Hi Sherry,
We have this issue on operating system AIX, 6.1 version. JRE 1.6