Free Support Forum - aspose.com

Aspose.Pdf.Kit & PDF/A

Hello!


Does you library Aspose.Pdf.Kit for Java supports creating PDF/A files?

Is it possible to convert existing PDF to PDF/A?

Regards,
Primoz Prislan.

Hi Primoz,


Thanks for your interest in our products.

The current release versions of Aspose.Pdf.Kit for Java does not support the feature to convert PDF files to PDF/A format. However are are working on porting the current version of Aspose.Pdf for .NET (which supports the conversion of PDF to PDF/A) to Java platform and as soon as this new release version becomes available, we would be more than happy to update you with the status of correction.

Please be patient and spare us little time. We are sorry for this inconvenience.

When do you plan to release version which will support this and when the version which will support HTML-to-PDF conversion.


Regards,
Primoz Prislan.

Hi Primoz,


In order to convert HTML file to PDF format, please try using Aspose.Pdf for Java. The following code snippet demonstrates on how to render HTML file to PDF. Please note that only simple HTML is supported. In case you encounter any issue, please feel free to contact.

[Java]

StringBuffer sb = new
StringBuffer(1024);<o:p></o:p>

// read the contents of HTML file

BufferedReader reader = new BufferedReader(new FileReader("c:/pdftest/source.html"));

int ch = -1;

while ((ch = reader.read()) > -1)

{

sb.append((char)ch);

}

reader.close();

//Instantiate Pdf pbject by calling its empty constructor

Pdf pdf1 = new Pdf();

//Create a new section in the Pdf object

Section sec1 = pdf1.getSections().add();

//Create a new text paragraph and pass the text to its constructor as argument

Text text1 = new Text(sec1, sb.toString());

// render HTML tags rather then just displaying them

text1.setIsHtmlTagSupported(true);

// add text to paragraphs collection of section

sec1.getParagraphs().add(text1);

// save the output file

pdf1.save(“c:/pdftest/Text_File_to_PDF.pdf”);



Hi Primoz,


Thanks for your patience.

I am pleased to share that an autoported MergedAPI release version of Aspose.Pdf for Java 4.0.0 has been released. Please try using the latest release version and in case you encounter any issue or you have any related query, please feel free to contact.