Printing PDF with background image
I wanted to print a PDF that contains a background image. The print process needs no user intervention. The example outlined in FopPrintServlet could not render the image, I'm guessing because of AWTRenderer?. Is there anyway I could do accomplish what I want? FYI. The same PDF with no background image prints without any problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing PDF with background image
Jeremias, Thanks for taking the interest. Ok I'm looking for a quick solution at this point without me going into the nitty gritty of implementing a method (crunch time :-( ). I've got the actual PDF's rendered somewhere on the server side and wanted to route it straight to a network printer. Please advise. Jeremias Maerki wrote: You're not printing PDFs if you use the AWTRenderer, strictly speaking. The formatted document is painted on a Graphics2D object. The problem you have, as you guessed, lies within AWTRenderer which does not implement drawImageClipped and drawImageScaled. If you implement these methods the background images will appear. On 17.02.2005 01:04:16 Neil Guinto wrote: I wanted to print a PDF that contains a background image. The print process needs no user intervention. The example outlined in FopPrintServlet could not render the image, I'm guessing because of AWTRenderer?. Is there anyway I could do accomplish what I want? FYI. The same PDF with no background image prints without any problem. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using image as background
How do you go about using an image (say TIFF) and superimposing your text data in it? Is that even possible in FOP? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Faxing
I wan't to get some ideas from this list how you handle faxing of PDF documents? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LPI and CPI vs line-height and font-size
Are they ever the same in meaning? Because I based my presumption on it, otherwise my calculation based on having a similar effect will be wrong then. LPI: 8 = 1/8 in and CPI: 10 = 1/10 in. I verified the result by measuring the printed output on paper. It was printed on a Lexmark Optra S 1250 laser printer. It didn't come out exactly as I expect. I tried it on the following renderers: PDF, PCL, AWT. They all have the same result. I'm using version FOP 0.20.5. Here's a sample of my FO file: ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=0.5in margin-left=0.5in margin-bottom=0.0in margin-top=0.0in page-width=11in page-height=8.5in master-name=US Letter Landscape fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence line-height=0.125in font-size=0.1in font-family=Courier master-reference=US Letter Landscape fo:flow flow-name=xsl-region-body fo:block /fo:block fo:block /fo:block fo:block JTRP006 - QPRINT Override w/ Printer File Page: 1/fo:block fo:block /fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block fo:block This will print LPI(8) amp; CPI(10)./fo:block /fo:flow /fo:page-sequence /fo:root - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: printing on dot matrix printer
Chris Bowditch wrote: Neil Guinto wrote: Ver: FOP 0.20.5 I need to print a report using a dot matrix printer. The paper size that I'll be using is 8.5in x 14.875in. I initially test it on our laser printer using a letter size paper. The output looks good. On a dot matrix printer (Lexmark 2381+) the font size and line height is totally wrong and its printed sideways. You don't say which renderer you are using? As a guess I would say you are trying to use Text Renderer, which has a very poor quality of output. I am using the PrintRenderer. I find TXTRenderer don't preserve the white space on my report which is critical for me for proper positioning and alignment. This report will be generated by a batch program. In most cases it will be sent to the printer without user intervention. (this part I have a handle by following the servlet example). Other reports will have to use pre-printed forms. I would appreciate it if anybody could respond to this problem and point out some best practice concerning the use of dot matrix printer on FOP. My old dot matrix used to support PCL. Have you tried generating PCL output and sending that instead of plain Text? It may also be useful if posted a snippet of the code you use to send the generated output to the printer. snip/ protected void render(Source src, Transformer transformer) throws FOPException, TransformerException, PrinterException, IOException { PrinterJob pj = PrinterJob.getPrinterJob(); pj.setCopies(1); pj.setPrintService(getPrintService()); PrintRenderer renderer = new PrintRenderer(pj); //Setup FOP Driver driver = new Driver(); driver.setRenderer(renderer); //Setup output ByteArrayOutputStream out = new ByteArrayOutputStream(); driver.setOutputStream(out); //Make sure the XSL transformation's result is piped through to FOP Result res = new SAXResult(driver.getContentHandler()); //Start the transformation and rendering process transformer.transform(src, res); out.close(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: printing on dot matrix printer
I am using the PrintRenderer. I find TXTRenderer don't preserve the white space on my report which is critical for me for proper positioning and alignment. Correction I just realized that I am using an inner class that extends the AWTRenderer. So what I'm really using is AWTRenderer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
printing on dot matrix printer
Ver: FOP 0.20.5 I need to print a report using a dot matrix printer. The paper size that I'll be using is 8.5in x 14.875in. I initially test it on our laser printer using a letter size paper. The output looks good. On a dot matrix printer (Lexmark 2381+) the font size and line height is totally wrong and its printed sideways. This report will be generated by a batch program. In most cases it will be sent to the printer without user intervention. (this part I have a handle by following the servlet example). Other reports will have to use pre-printed forms. I would appreciate it if anybody could respond to this problem and point out some best practice concerning the use of dot matrix printer on FOP. The following is a sample FO file of my report. ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=0.5in margin-left=0.5in margin-bottom=0.0in margin-top=0.0in page-width=14.875in page-height=8.5in master-name=Continuous-Form-Wide fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence line-height=8pt font-size=10pt font-family=Courier master-reference=Continuous-Form-Wide fo:flow flow-name=xsl-region-body fo:block space-after.optimum=3pt /fo:block fo:block space-after.optimum=3pt /fo:block fo:block space-after.optimum=3ptJTRP006 - QPRINT Override w/ Printer File Page: 1 /fo:block fo:block space-after.optimum=3pt /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block fo:block space-after.optimum=3ptThis will print LPI(8) amp; CPI(12). /fo:block /fo:flow /fo:page-sequence /fo:root - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with inline using japanese font msmincho ttc
Anybody know of such Japanese fixed width font that have glyphs in bold or italics? Preferably free, sorry we're cheap. -Original Message- From: Rodolfo M. Raya [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 3:46 PM To: [EMAIL PROTECTED] Subject: Re: problem with inline using japanese font msmincho ttc Most CJK (Chinese-Japanese-Korean) fonts don't have glyphs in bold or italics. MSMincho doesn't have bold/italics. What you can do is use 2 different fonts in your reports. Use one font for normal text and a different one for emphasised text. Using 2 fonts that are different enough your readers will be able to tell that you wanted to add emphasis in some portions of your report. I use Kochi-Mincho and Kochi-Gothic in my documents. Hope this helps, Rodolfo -- Rodolfo M. Raya [EMAIL PROTECTED] Heartsome Holdings Pte. Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with inline using japanese font msmincho ttc
FOP v0.20.5rc2 (B (BI created my report using a Japanese font (MSMincho True type (Bcollection). It looks good so far. I have a requirement to use the (Battribute fo:inline font-weight="bold" $BE%^%9%?!
RE: problem with inline using japanese font msmincho ttc
Please tell me what I did wrong. I created another font metrics for the other variant it looks like I have two from the ttc. Here is the added font: font metrics-file=mspminch.xml embed-file=C:\Jenasys2\solpac\properties\msmincho.ttc kerning=yes font-triplet name=MSPMincho style=normal weight=normal/ font-triplet name=MSPMincho style=normal weight=bold/ font-triplet name=MSPMincho style=italic weight=normal/ font-triplet name=MSPMincho style=italic weight=bold/ /font This time added the 'font-family' attribute... fo:inline font-family=MSMincho font-weight=bold some jap char/fo:inline Characters don't appear to be bold still. -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 2:21 PM To: [EMAIL PROTECTED] Subject: Re: problem with inline using japanese font msmincho ttc You have to create a separate XML font metric file for every variant of the font. See http://xml.apache.org/fop/fonts.html#truetype-collections I hope that helps. On 20.06.2003 21:11:39 Neil Guinto wrote: FOP v0.20.5rc2 I created my report using a Japanese font (MSMincho True type collection). It looks good so far. I have a requirement to use the attribute fo:inline font-weight=bold [EMAIL PROTECTED] /fo:inline but it don't seem to have no effect, meaning the characters are not bold. Here is a portion of the font element on my userconfig.xml: font metrics-file=msminch.xml embed-file=C:\Jenasys2\solpac\properties\msmincho.ttc kerning=yes font-triplet name=MSMincho style=normal weight=normal/ font-triplet name=MSMincho style=normal weight=bold/ font-triplet name=MSMincho style=italic weight=normal/ font-triplet name=MSMincho style=italic weight=bold/ /font I'm thinking there must be some configuration step that I missed. I tested it under Win2K/jdk1.4.1 Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]