Hi -
iText has the ability to write directly to a pdf graphics context which makes it easy to write swing components to a pdf. Does Aspose PDF have this ability?
Example from iText:
final PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(pdfFile));
final PdfContentByte pdfContentByte = writer.getDirectContent();
final PdfTemplate pdfTemplate = pdfContentByte.createTemplate(width, height);
// create graphics
g2 = pdfTemplate.createGraphics(width, height, fontMapper);
// print to graphics
print(g2, pageFormat, i);
// dispose
g2.dispose();
// add to pdf document
pdfContentByte.addTemplate(pdfTemplate, 0, 0);
–
Dave
Hello Dave,
(java.io.OutputStream stream) overloaded methods to save the resultant file into Stream object.
Hi -
I want to directly save Swings object to Pdf file.
–
Dave
Hello Dave,
The issues you have found earlier (filed as PDFJAVA-33131) have been fixed in Aspose.Pdf for Java 3.2.0.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.