• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem printing multi page with Jpanel  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to print a multi page document.
Each document is a JPanel wich extends printable.
In the print dialog there is eg 4 pages, but when I click ok to send the job to the printer, only the first page will be printed.
If I replace the Jpanel to a normal text site, it works well.
Does anybody have experience in printing JPanel's ?
Here is the Code of the print routine:
Book book = new Book();
for (int i = 0; i < 4; i++)
Paper paper = new Paper();
paper.setSize(595, 842); // A4 (in Point)
paper.setImageableArea(0, 0, 595, 842); // ganze Seite f�r Druck nutzen
PageFormat pf = new PageFormat();

ImagePanelPrint myImgPanel = new ImagePanelPrint(i,pf);
//SPecial printable JPanel
book.append(myImgPanel, pf);
if (printer.printDialog())
catch (Exception PrintException)
On the JPanel is a view of some SVG Shapes from my own SVG viewer.
Thanks a lot for help
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!