Re: Send a document directly to a printer
Gorka Echevarría Vélez wrote: Can anybody say me how can I send a document directly to a printer? I have tried the following code to render the document to a printer using Driver.RENDER_PCL, but it doesn´t work (i get the exception file.io.FileNotFoundException) String printer =ntsrv_200//prn1; Jens Thieler wrote: And do try backslahes. Christian Beer wrote: P.S: DON'T USE BACKSLASHES - PLEASE!!! It's a windows thing!!! Use slashes in filenames for java !! Jens Thieler wrote: rubbish You may (and in this case: should) use slashes on windows machines, but don't overdo it. It's either //ntsrv_200/prn1 or ntsrv_200\\prn1. Jens Thieler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Reading a .img file
-Original Message- From: NagarajaRao [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 17 October 2001 12:43 pm Hi, How can include .img file in pdf. ApacheFOP doesn't support it. Is there a way around? thanks regards Nagaraja Rao What is an .img file? There are quite a few exotic file formats that are branded img. In case your refer to the IMG image file format, once defined by Digital Research for the GEM windowing system of the ATARI (my favorite computer then - some 15 years ago), well ... isn't it extinct? Anyhow, I would suggest you to write a org.apache.fop.image.ImgImage decoder class (or extend JAI or JIMI http://java.sun.com/products/jimi/) and register it with the org.apache.fop.image.FopImageFactory. (At least that would have been the hinge, last time I checked.) That shouldn't be too hard whith the ATARI IMG format, because it is fairly simple. (Take a look at imgtoppm.c from the PBMPLUS package.) Jens Thieler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: getting an external-graphic from xml in pdf
I suppose this question to be OT even in fop-user. Anyhow, study the appended code and above all study some XSLT tutorials. ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=/ fo:root xsl:apply-templates / /fo:root /xsl:template xsl:template match=//PICTURE fo:block fo:external-graphic xsl:attribute name=src xsl:textfile:/xsl:text xsl:value-of select=@source / /xsl:attribute /fo:external-graphic /fo:block /xsl:template xsl:template match=//PUNCTURE xsl:variable name=source xsl:value-of select=@source / /xsl:variable fo:block fo:external-graphic src=file:{$source} / /fo:block /xsl:template /xsl:stylesheet -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 19. Juli 2001 16:19 An: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] ... But what do I do to make the transformation to pdf with fo possible since the recommendation says to use src:file:... like this The file formula.gif is only embedded in the xml file and should not just be in the xsl file. Now I want to add the attribute which would be no problem without the file: thing. It should look somehow like this, but I don´t know how to add this in the quotation marks. xsl:template match=//PICTURE fo:block fo:external-graphic text-align=center xsl:attribute name=src xsl:value-of select=//PICTURE/@source/ /xsl:attribute /fo:external-graphic /fo:block /xsl:template This of course doesn´t work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: is there something like internal-graphic ?
-Ursprüngliche Nachricht- Von: Heiko Barthel [mailto:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 12. Juli 2001 18:33 Betreff: is there something like internal-graphic ? I use FOP currently with external graphics, but I want to add directly binary data of an element like: bmp BDGADUGADUGFSZFDSSJDGSGDSDSDSDTSDGSICXSGDSD(S /bmp Does anybody know a way to include this directly in the FO or do I have to create a file with the data of bmp and use fo:external-graphic ? Well, I ran into a similar problem when imbedding Batik generated SVG with FOP 0.18. Batik's default handling of raster images is: image width=112 height=60 x=20 y=20 xlink:href=data:image/png;base64,iVBORw0KGgoNSUhEUgAAAHA8CAYAAAC+ej 5cAAACeElEQVR42u2cgW7D IAxES9cPb7+cKZqiViyADTaB9J1UqUsMrbicOQPr7QaWRmAIehCjEy3wch6B27X9 +uf7NL7WVoY7JMykHn1bCDRV45F6JKTolQeBFwEEDkmnXmYHApd3rxC4jME5xoNB 9SJnU5mUsHZiUeBU6VHflop/krmsVZEokDICQCCAQAgEEAjGg0L+tELfpgyBwKGE lWLYTlqMvKM2HKUYjH0j1npFRt4fKdRVcSUiamqTLYYj2W6l9JqTWvsyiRDoQmqv itM+8iRCoIn6LOfArU/54ShcaLfKPAyMPC2jwGEpsiWd1pWICz3NqUoehFw6feOH gW1V3za4z2edgNfr75Viv37Ux2d8en/7+32fOXB4baiNK9+HwKY5znrJS9vf+ztC oIt5aV0L1QMTI7LwFkTIi3ONmUGB/wY4p7Te3YIWF1oHBB66y1yMdw3I/wdOMLi9 OxAQ6GhOevr0UTAmRq3CnQh7NTEHTqtIv3QOgc2DNwfRmhS6f+FQuV+KSePSWO2g hMZ2H23rC8Yt9dmosuKuJE86WPE7VNhSH6bxEnOTL3M8TUy8XXq/MSWtdsbz3IO9 QZBCPUgMHXFR3k+aCqVLanubEpm+tejDYTAv5EY1xbtFoa+PfyiU1ErmIqm0x5CU 0qaVWz33UNMipsZ6wdm/vZeJCUakRcHnfDU8FRhQoZX68vMrKzGK+WY28rzrwKNU GjtVfJKpyZULXg+N/PNGKDBcS4nWx+hzKzmyh2XUdpKVqTmZxNqxC4vUrDuXw35g V61onVL1D8ZIAltUOGEZkVvzbPm1Qn7kYCLkjlH4liWjCVx4LhyXFgEAq+AXJ4X6 j6rc7F0ASUVORK5CYILz / FOP 0.18 wouldn't support this voluntarily, so I had to hack (as far as I remember) FopImageFactory and AbstractFopImage in package org.apache.fop.image. It did work for instream SVG. It should have worked for fo:external-graphic as well, but I didn't verify this. FOP 0.19 uses Batik to render SVG. So you could try to fool FOP with something like: fo:instream-foreign-object svg width=80 height=80 image width=80 height=80 x=0 y=0 xlink:href=data:image/png;base64,... / /svg /fo:instream-foreign-object (I haven't testet this either.) Jens Thieler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
svg/PDFGraphics2D.java between version 1.7 and 1.8
Hi, I'm a great fan of org.apache.svg.PDFTranscoder or rather org.apache.svg.PDFDocumentGraphics2D. PDFDocumentGraphics2D initializes with super(textAsShapes) So the FontState in the superclass PDFGraphics2D is not initialized. After the augmentation of method PDFGraphics2D.drawString(...) on June 26 we're now bound for a NPE in line 710: fontState = new FontState(fontState.getFontInfo(), name, style, weight, size * 1000, 0); Keiron, please make me smile again. Jens Thieler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]