Re: [JAVA2D] How to print a multipage PDF or PostScript?
Val, You might take a look at iText and perhaps the Flying Saucer project: http://www.lowagie.com/iText/ http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html Good luck! Rob jav...@javadesktop.org wrote: > Hi, (please pardon my english i'm coming from France) > > I'm working on a method which will allow me to produce PDF or PostScript > files which contain multiple images (jpeg or png). > I would like to one image per page in one document. I succeeded in printing > one image one page, but i can't add new pages in the same document. > > How could i do that? > > I use the following properties with my PrintRequestAttributeSet object: > > [i]MediaSizeName.ISO_A4 > > MultipleDocumentHandling.SINGLE_DOCUMENT_NEW_SHEET > > Finishings.STAPLE[/i] > > > And about the code: > > Doc doc = new SimpleDoc(fis, flavor, null); // fis: my file input stream > pj.print(doc, aset); // aset: my > PrintRequestAttributeSet object > > > Do i need to create a new PrinterJob? > > Thank you, > > Val > [Message sent by forum member 'mofx71' (mofx71)] > > http://forums.java.net/jive/thread.jspa?messageID=322771 > > === > To unsubscribe, send email to lists...@java.sun.com and include in the body > of the message "signoff JAVA2D-INTEREST". For general help, send email to > lists...@java.sun.com and include in the body of the message "help". > === To unsubscribe, send email to lists...@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to lists...@java.sun.com and include in the body of the message "help".
Re: [JAVA2D] How to print a multipage PDF or PostScript?
jav...@javadesktop.org wrote: Hi, (please pardon my english i'm coming from France) I'm working on a method which will allow me to produce PDF or PostScript files which contain multiple images (jpeg or png). Whilst we caa generate PS directly, PDF will only be possible if you have a driver that does it. I would like to one image per page in one document. I succeeded in printing one image one page, but i can't add new pages in the same document. How could i do that? You will need to create a PrinterJob, load the images using javax.imageio.ImageIO into a java.awt.image.BufferedImage, and then print from a java.awt.print.Printable, rendering the images using Graphics2d.drawImage(..) exactly where you want on the page. I use the following properties with my PrintRequestAttributeSet object: [i]MediaSizeName.ISO_A4 MultipleDocumentHandling.SINGLE_DOCUMENT_NEW_SHEET Finishings.STAPLE[/i] Neither of these lasst two are supported in the Sun implementations. Its possible Finishings may be supported by CUPS, if you have a printer that does it, but we don't have IPP on windows. -phil. And about the code: Doc doc = new SimpleDoc(fis, flavor, null); // fis: my file input stream pj.print(doc, aset); // aset: my PrintRequestAttributeSet object Do i need to create a new PrinterJob? Thank you, Val [Message sent by forum member 'mofx71' (mofx71)] http://forums.java.net/jive/thread.jspa?messageID=322771 === To unsubscribe, send email to lists...@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to lists...@java.sun.com and include in the body of the message "help". === To unsubscribe, send email to lists...@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to lists...@java.sun.com and include in the body of the message "help".
[JAVA2D] How to print a multipage PDF or PostScript?
Hi, (please pardon my english i'm coming from France) I'm working on a method which will allow me to produce PDF or PostScript files which contain multiple images (jpeg or png). I would like to one image per page in one document. I succeeded in printing one image one page, but i can't add new pages in the same document. How could i do that? I use the following properties with my PrintRequestAttributeSet object: [i]MediaSizeName.ISO_A4 MultipleDocumentHandling.SINGLE_DOCUMENT_NEW_SHEET Finishings.STAPLE[/i] And about the code: Doc doc = new SimpleDoc(fis, flavor, null); // fis: my file input stream pj.print(doc, aset); // aset: my PrintRequestAttributeSet object Do i need to create a new PrinterJob? Thank you, Val [Message sent by forum member 'mofx71' (mofx71)] http://forums.java.net/jive/thread.jspa?messageID=322771 === To unsubscribe, send email to lists...@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to lists...@java.sun.com and include in the body of the message "help".
[JAVA2D] How to print a multipage PDF or PostScript?
Hi, (please pardon my english i'm coming from France) I'm working on a method which will allow me to produce PDF or PostScript files which contain multiple images (jpeg or png). I would like to one image per page in one document. I succeeded in printing one image one page, but i can't add new pages in the same document. How could i do that? I use the following properties with my PrintRequestAttributeSet object: [i]MediaSizeName.ISO_A4 MultipleDocumentHandling.SINGLE_DOCUMENT_NEW_SHEET Finishings.STAPLE[/i] And about the code: Doc doc = new SimpleDoc(fis, flavor, null); // fis: my file input stream pj.print(doc, aset); // aset: my PrintRequestAttributeSet object Do i need to create a new PrinterJob? Thank you, Val [Message sent by forum member 'mofx71' (mofx71)] http://forums.java.net/jive/thread.jspa?messageID=322770 === To unsubscribe, send email to lists...@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to lists...@java.sun.com and include in the body of the message "help".