Hi,

I want to print a JPanel in a PDF document.
Structure will be: a title, some arbitrary text, the JPanel, some
tables, more arbitrary text.

The examples I found that print images use either a PDFContentByte or
are some HTML, XML processing stuff using IText Image.

When using a template and PDFContentByte, one needs to know the position
of the last written text to place the graphic below, and then one must
place the next elements (the tables and more text) after that. I didn't
find out how to achieve these 2 things, nor how to convert a JPanel
graphic to a IText Image for the other approach.

Any hints?


Btw, when using Substance LAF printing to the template Graphics2D raises
an exeption:

Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: null incompatible with Text-specific
antialiasing enable key
        at java.awt.RenderingHints.put(RenderingHints.java:1057)
        at java.awt.RenderingHints.putAll(RenderingHints.java:1124)
        at com.lowagie.text.pdf.PdfGraphics2D.addRenderingHints(Unknown Source)
        at
org.jvnet.substance.SubstancePanelUI.__org__jvnet__substance__SubstancePanelUI__container__update(SubstancePanelUI.java)
        at org.jvnet.substance.SubstancePanelUI.update(SubstancePanelUI.java)
        at javax.swing.JComponent.paintComponent(JComponent.java:751)
        at javax.swing.JComponent.printComponent(JComponent.java:1181)
        at javax.swing.JComponent.paint(JComponent.java:1021)
        at javax.swing.JComponent.print(JComponent.java:1163)

The internet told me this error (or a similar one) has been removed
around 2007. I did work around it by setting a javax.swing.plaf.basic
LAF renderer. Just for your information.


Regards,

    Michael




------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to