Don't use postscript. I tried it and it got ugly, particularly on specifying a font. How are you calling FOP? command line? embedded code? Here's what I'm doing (with embedded code) which works really cool. I use the MIME-PDF to create a renderer to assign to the UserAgent. Then I use the MIME_FOP_PRINT to create an FOP object using the factory and pass it a ByteArrayOutputStream. Then on my transform I get a PDF, but instead of a physical file I get a byte stream. I use this byte stream to create a PDDocument object from the pdfbox project. This gives me a pageable object I can pass in to java.awt.print.PrinterJob. I get a SEVICE_FORMATTED.PAGEABLE type javax.print.PrintService to assign to the PrinterJob. Then use PrinterJob.print, and between the attributes of the PrintService and the PrinterJob you should be able to select the options (print tray, duplex,etc). If you can print it to a PDF you can use this method to print it to the printer. I haven't tested this transparency you mention, but I have printed everything from variable size fonts and lines to SVG pictures even on a dot matrix printer.
________________________________ From: Martin Edge [mailto:[email protected]] Sent: Wednesday, June 30, 2010 9:59 AM To: [email protected] Subject: transparency in images Hey Guys, Quick question - if I use a PNG as an image, is it's transparency properties taken into account? I am attempting to insert a PDF file as in within my document, however using the PDF plugin, means it doesn't seem to happily output on postscript, so I have had to convert the file to a JPG and use that. I generate barcodes and other information that sites on the outside of the document, so if I use the image for the full page, it blanks out the barcode and other text, and by shrinking the form it looks a little silly. So, I was thinking, if transparency works, would I be able to see the barcode, given it's in theory underneath the image? Thanks Martin
