Re: Use of FOP in COM Object
Did you take a look at the Cocoon project at www.apache.org . perhaps that would solve the problem without any hard coding work. On 2002.04.07 22:36 Ian Stacey wrote: Hi, I'll apologise in advance for potentially being ignorant to the way Apache projects work. I'm interested in using FOP in a COM object for use on a web server to allow me to dynamically generate PDF documents. I want to take database content and mark this up using XSL, generate my PDF and then return it to the client. My questions are as follows... 1. Can this be done technically? I believe a colleague of mine will be able to take the FOP source and make a COM object out of it, I'll then be able to use the COM object within my ASP to do what I want to do. 2. Is what I want to do, in accordance with licensing? If I were to do this, would I breach any copyright? Break any laws? Upset hard working individuals who produces the code? Thanks for any help any users of the list can give. Ian Ian Stacey New Media Developer E: [EMAIL PROTECTED] T: +44 (0) 161 292 1312 M: +44 (0) 7970 288010 W: http://homepage.ntlworld.com/istacey/ Portfolio Pieces: Laser Visual Software: http://www.laservisual.com/ Chester Soccer: http://www.chestersoccer.co.uk/ Bailey Instruments Ltd: http://www.baileyinstruments.co.uk/ Phil Stockford Garage Equipment Ltd: http://www.vehicle-lifts.co.uk/
Re: Use of FOP in COM Object
From: Ian Stacey [EMAIL PROTECTED] Hi, I'll apologise in advance for potentially being ignorant to the way Apache projects work. I'm interested in using FOP in a COM object for use on a web server to allow me to dynamically generate PDF documents. I want to take database content and mark this up using XSL, generate my PDF and then return it to the client. My questions are as follows... 1. Can this be done technically? I believe a colleague of mine will be able to take the FOP source and make a COM object out of it, I'll then be able to use the COM object within my ASP to do what I want to do. Technically yes, it's possible to use a Java class as a COM object. Search the web for systems that make this possible. Being in a server environment, you could make an EJB out of FOP and use that as a COM object with the Sun bridge. See www.javasoft.com for details. 2. Is what I want to do, in accordance with licensing? If I were to do this, would I breach any copyright? Break any laws? Upset hard working individuals who produces the code? RTFM: http://xml.apache.org/fop/license.html Which means: you can do what you want, just remember to give us credit and don't blame-sue us for anything that might happen with the code. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) -
Re: intercepting the euro symbol from http request
So in other words if it's encoded differently i need a table that shows the mapping between unicode and UTF-8. Does anyone know if such a table exist? Christian Mallwitz a écrit : But i can't figure out how to detect its presence within a parameter from the http request. I have tried to compare the caracters with '\u20AC' but it goes thru. I have tried to use the java.lang.Character.getNumericValue method but the euro has no numeric value. parameter on a URL are encoded using the encoding of the page containing the URL. on Windows the euro wll be encoded as 0x80 (Windows 1252) or UTF-8 (3 bytes - not sure what the correct value is) it will almost never show as '\u20AC' christian
RE: embedding fonts angst
I had the same problem with the same message, but the fonts did print out. This should be entered as FOP bug, if it isn't already. -Original Message- From: Eric Smith [mailto:[EMAIL PROTECTED] Sent: Saturday, April 06, 2002 7:45 AM To: [EMAIL PROTECTED] Subject: embedding fonts angst Hi I managed to make the font-metric files with the TTFReader. I reference this file (with URI syntax) in the userconfig.xml and of course also reference the ttf file. However, the resulting pdf causes the following bark when acrobat opens it: Unable to extract the embedded font '1E2732Arial'. Some characters may not display or print correctly. On both linux and win. And indeed these fonts do not print out. Could it be a fop/batik version issue? Any solutions? Thanx -- Eric Smith
Re: DocBook tables not appearing in PDF generated by Fop
J.Pietschmann [EMAIL PROTECTED]: Steinar Bang wrote: J.Pietschmann [EMAIL PROTECTED]: Furthermore, remove whatever produced the fo:table-and-caption in the FO file (probably specifying a title or caption for the table in DocBook). What's wrong with it? Is it an illegal FO construct? Or is it a construct unsupported by Fop? Not implemented in FOP. I think these tables are not put into the output, or at least the caption will be missing. Try it yourself. Use of fo:table-and-caption was the reason no tables appeared in the output. I have fixed it, for now, by defining a new template for table, in my local XSL style sheet for creating FO from DocBook. This local style sheet holds my local settings (A4 instead of letter, turn on saxon extensions etc.). Attached is the file with the doctored template (It's the table template from the DocBook XSL fo style sheet, with the fo:table-and-caption stuff commented out. Thanx! - Steinar ?xml version='1.0'? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version='1.0' xmlns=http://www.w3.org/TR/xhtml1/transitional; exclude-result-prefixes=#default xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:import href=http://no-video6/xml/styles/docbook-xsl-1.48/fo/docbook.xsl/ xsl:import href=local-common.xsl/ !-- Changes to defaults -- xsl:param name=paper.type select='A4' / xsl:template match=table xsl:variable name=id xsl:call-template name=object.id/ /xsl:variable xsl:variable name=prop-columns select=.//colspec[contains(@colwidth, '*')]/ fo:block xsl:attribute name=span xsl:choose xsl:when test=@pgwide=1all/xsl:when xsl:otherwisenone/xsl:otherwise /xsl:choose /xsl:attribute !-- fo:table-and-caption id={$id} xsl:use-attribute-sets=formal.object.properties keep-together.within-column=1 fo:table-caption -- fo:block xsl:use-attribute-sets=formal.title.properties xsl:apply-templates select=. mode=object.title.markup/ /fo:block !-- /fo:table-caption -- fo:table xsl:call-template name=table.frame/ xsl:if test=count($prop-columns) != 0 xsl:attribute name=table-layoutfixed/xsl:attribute /xsl:if xsl:apply-templates select=tgroup/ /fo:table !-- /fo:table-and-caption -- /fo:block /xsl:template /xsl:stylesheet
clipping external-graphic
Howdy. I am producing PDFs with external graphics. In some cases the graphic is larger than the space available for it and it should be scaled down. This sort of works (only scales if width is too large, but not height). In orther cases, the image should be clipped (not scaled down to fit into the space). For instance, one graphic is a series of dots; rather than compress the dots, the right side of the graphic should be trimmed off. According to the spec, if the external-graphic tag's overflow=hidden (or NOT visible), and clip=auto, the image should be clipped to the parent block's size (if it is specified). Has anyone else had this work? Is this a bug? Thanks. = - Mr Lauren Commons DISCLAIMER: The opinions expressed ARE in fact those of my employer. __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
Re: Question for FOP
Roland Neilands wrote: C:\fop\fop-0.20.3\docs\examples\markersfop -xsl glossary.xsl -xml glossary.xml -pdf glossary.pdf This example triggers a bug in FOP 0.20.3 It uses fo:marker, which is broken. Don't use it. J.Pietschmann
Re: clipping external-graphic
Lauren Commons wrote: Howdy. According to the spec, if the external-graphic tag's overflow=hidden (or NOT visible), and clip=auto, the image should be clipped to the parent block's size (if it is specified). I think clipping (overflow=hidden) is not implemented. You can try to work around this by using an SVG, which can be clipped at the SVG viewport. SVGs can refer to graphic files in other formats. In case of the dots, check whether you should rather use fo:leader. J.Pietschmann
Re: clipping external-graphic
--- J.Pietschmann [EMAIL PROTECTED] wrote: ... I think clipping (overflow=hidden) is not implemented. Heck. Should this be mentioned in the Limitations section of the FOP website? You can try to work around this by using an SVG, which can be clipped at the SVG viewport. SVGs can refer to graphic files in other formats. Hmmm... I'll look into that. In case of the dots, check whether you should rather use fo:leader. For the dots I could probably do that, but there are some others that I also need to do that the leader doesn't support. Thanks!! J.Pietschmann Lauren = - Mr Lauren Commons DISCLAIMER: The opinions expressed ARE in fact those of my employer. __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
external-graphic within a war file
Hi- I'm attempting to use a gif image using the fo:external-graphic tag. Both the gif file and the xsl file are located in a war file. The gif is located in a directory /images (from the war file's root) and the xsl file is located in a directory named web-inf. So far I've tried using the following: !-- GS logo box -- fo:table-cell fo:block fo:external-graphic src=/images/logo_gs.gif / /fo:block /fo:table-cell !-- GS logo box -- fo:table-cell fo:block fo:external-graphic src=file:/images/logo_gs.gif / /fo:block /fo:table-cell !-- GS logo box -- fo:table-cell fo:block fo:external-graphic src=images/logo_gs.gif / /fo:block /fo:table-cell !-- GS logo box -- fo:table-cell fo:block fo:external-graphic src=file://images/logo_gs.gif / /fo:block /fo:table-cell Each of these have given me the following error: [1Error while creating area : Invalid Image URL - error on relative URL : no protocol: null/images/logo_gs.gif What is the best way to refer to an image from within a war file? Is the war file even the issue? Thanks. Jeff Orford * Jeffrey Orford Goldman Sachs Information Technology (212)357-1306 [EMAIL PROTECTED] Plans are nothing; Planning is everything -Eisenhower *