Re: Hair ripping time
The xslt is used to transform from your source format to the FO format used by FOP. If you already have a formatting object file, you can pass it to fop immediately without transformation. xsl can be a bit tricky to get started on, some like O'reilly's Java and XSLT book is probably a good place to start. FOP itself seems to produce reasonable messages. -- John Burgess Risk Decisions Limited Whichford House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: john.burg...@riskdecisions.com W: http://www.riskdecisions.com On 03/06/2011 15:30, Theresa Jayne Forster wrote: Ok I cannot see what is wrong here, A test app does this Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,useragent,out); TransformerFactory factory = TransformerFactory.newInstance(); Source xslt = new StreamSource(new File(C:/sample.xsl)); Transformer transformer = factory.newTransformer(xslt); And works fine, The app I am working on does this Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,useragent,out); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(inputFO)); And it immediately jumps out when it hits the newTransformer() line In the first it's an xslt, in the second it's a FO file, do I have to do something different for that? WTF aren't these the same, and why does so much of FOP jump out without even trying to give debug output? Or is there a way of doing that? Kindest regards Theresa Forster Senior Software Developer
Re: What is the status of fop ?
You could try running the transform separately to produce the .fo file, then feed that into fop afterwards. -- John Burgess Risk Decisions Limited Whichford House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: john.burg...@riskdecisions.com W: http://www.riskdecisions.com Mathieu Malaterre wrote: Hi there, I am currently trying to check if my group can start using docbook for writing high quality documentation. As far as I understand there are three competitors dblatex, xmlroff and fop. dblatex is a strange beast as it 'just works', but you cannot control anything (PNG file are degraded). I am now trying fop on my debian system: $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -pdf article.pdf -xml in.xml which returns the following error (*). The input example was simply: $ cat in.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd; article articleinfo titletitle/title author firstnameauthor/firstname surnameauthor2/surname affiliation orgnamebla/orgname /affiliation /author pubdate2001/pubdate /articleinfo section titlesection 1/title paratext section 1/para figure titlefirst/title mediaobject imageobject imagedata fileref=graphics2.png/ /imageobject /mediaobject /figure /section /article Could someone please confirm whether including PNG file is supported or not ? Thanks, - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: PDF Problem
I think this sounds like a problem we encountered here. The solution was to embed the entire font into the pdf document. As I remember it, fop will normally only embed the glyphs that are actually used but a bug in many (all?) versions of pdf reader means that it then messes up copying and searching. Our solution (for fop 0.25 - I don't know about 0.9x ) was: In your userconfig file in the fonts section add an embed-file entry for each font that you use. I attach a small section of our userconfig as example. font metrics-file=fonts/metrics/DxRg.xml kerning=yes embed-file=fonts/daxfontsnew/DxRg.ttf font-triplet name=Dax style=normal weight=normal/ font-triplet name=Dax Regular style=normal weight=normal/ /font Hope this helps. -- Best wishes John Burgess Risk Decisions Limited Buchan House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: [EMAIL PROTECTED] W: http://www.riskdecisions.com - Original Message - *From:* Kai Mütz [EMAIL PROTECTED] *To:* fop-users@xmlgraphics.apache.org *Sent:* 13/06/2007 10:08:08 AM +0100 *Subject:* PDF Problem If you are using cusom fonts this is a known issue. You have to update to fop 0.93 which is solving this problem. There are many mailings in mailing archive about this issue. Kai [EMAIL PROTECTED] wrote: Hello there, i have a little problem with PDFs created with FOP. It seems to be that you can't search inside the PDF (using CTRL+F) and when you copy something out of the PDF the pasted Text will look corrupt. Are there any known issues about that and a way to solve it? Viele Grüße/ Best Regards Christian Loock Software Engineer Viele Grüße/ Best Regards Christian Loock Software Engineer ___ telephone: +49 (0) 28 21 . 9 78 56.21 telefax: +49 (0) 28 21 . 9 78 56.77 [EMAIL PROTECTED] www.db-central.com Main office db-central gmbh, Hoffmannallee 41-51, D-47533 Kleve Subsidiary db-central gmbh, Königsallee 43, D-71638 Ludwigsburg db-central gmbh, Adalbertstr. 110, D-80798 München Managing Directors Dirk Rosomm, Benno van Aerssen Registered office Kleve - Germany, Amtsgericht Kleve, HRB 2746 ___ - 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]
Re: [Poll] Expectations regarding side-floats
Vincent We currently produce software documentation with very wide margins and put the section headings in these margins. This currently requires a lot of fairly complicated work with tables. I could imagine side-floats being useful for simplifying this, providing that the side floats are always kept with the text they are associated with. -- Best wishes John Burgess Risk Decisions Limited Buchan House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: [EMAIL PROTECTED] W: http://www.riskdecisions.com Vincent Hennebert wrote: Dear Fop users, I'm currently thinking about the implementation of side-floats (fo:float float=start/end) into Fop. It turns out that there is a choice to make between several design decisions which imply different behaviors regarding the placement of floats on the page. To help me make a decision, I'd like to know which usage you would make of side-floats: on a general manner, what sort of typographic material would you typeset using side-floats? Particular things of which we don't think in the first place? More specifically, as the XSL-FO recommendation allows some freedom in these areas: - would you expect a side-float being placed on another page than its anchor? Would you prefer the whole chunk of text to be deferred on the following page? - would you expect a side-float being split on several pages? - would you expect different layouts, depending on whether a set of side-floats would be placed on the middle of a page or at the bottom (thus, with some of them on the current page and the others on the following page)? Any comments, remarks, hints of all sort would be welcome. Thanks, Vincent - 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]
Re: FOP-PDF not opening
I seem to remember us having this problem with a version of acrobat reader. Upgrading acrobat reader on the affected machines fixed it. I'd try and find out what versions of acrobat are being used. Best wishes John Burgess Risk Decisions Limited Buchan House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: [EMAIL PROTECTED] W: http://www.riskdecisions.com [EMAIL PROTECTED] wrote: Hi, We have used FOP for generation of PDF reports in our application. PDF reports opens in IE browser. The reports are working fine in our environment but at our client site PDF does not open. Screen hangs and all system resources are used by AcroRd32.exe*.* Please help. Is there any setting which is creating problem. Regards, Vishwas Dubey Tata Consultancy Services Limited Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: region-before falls between region-start and region-end
I believe that what you get is the correct default behaviour. precedence = true on region-before and after should give what you want, but I believe false is the default. I append the relevant section of the spec. 7.25.16 precedence XSL Definition: Value: true | false | inherit Initial:false Applies to: fo:region-before, fo:region-after Inherited: no Percentages:N/A Media: visual Values have the following meanings: false A value of false specifies that this region does not extend up to the start-edge and end-edge of the content-rectangle of the page-reference-area, but has its inline-progression-dimension reduced by the incursions of the adjacent regions. true A value of true specifies that the inline-progression-dimension of this region extends up to the start-edge and end-edge of the content-rectangle of the page-reference-area. Specifies which region (i.e., region-before, region-after, region-start, or region-end) takes precedence in terms of which may extend into the corners of the simple-page-master. Best wishes John Burgess Risk Decisions Limited Buchan House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: [EMAIL PROTECTED] W: http://www.riskdecisions.com Karl Roberts wrote: Hi FOP Users, I'm using FOP Version 0.91beta to generate pdf from xsl-fo I think that I'm right in saying that region-before should position like the lintle of a door on top of region-body, region-start and region-end i.e. like so: (as described http://www.w3schools.com/xslfo/xslfo_pages.asp ) ___ | | |region-before | |___| | | | | | region- | | region- | | start | region-body | end | | | | | | | | | | | | | |_|__|__| | | | region-after| |___| However my PDF ends up like: ___ | | | | | | region-before | | | |__| | | | | | | region- | | region- | | start | region-body | end | | | | | | | | | | | | | | |__| | | | | | | | region-after| | |_|__|__| Is that correct? My xsl-fo file looks like: ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:xhtml=http://www.w3.org/1999/xhtml; xmlns:xdt=http://www.w3.org/2004/07/xpath-datatypes; xmlns:fn=http://www.w3.org/2004/07/xpath-functions; xmlns:xs=http://www.w3.org/2001/XMLSchema; fo:layout-master-set fo:simple-page-master margin-right=1cm margin-left=1cm margin-bottom=1cm margin-top=1cm page-width=21cm page-height=29.7cm master-name=mastertest fo:region-body margin-right=2cm margin-left=2cm margin-bottom=2.5cm margin-top=4cm region-name=xsl-region-body/ fo:region-before background-color=red extent=3.5cm region-name=xsl-region-before/ fo:region-after background-color=yellow extent=2cm region-name=xsl-region-after/ fo:region-start background-color=green extent=1.5cm region-name=xsl-region-start/ fo:region-end background-color=blue extent=1.5cm region-name=xsl-region-end/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=mastertest fo:flow flow-name=xsl-region-body fo:block content stuff /fo:block /fo:flow /fo:page-sequence /fo:root Am I misunderstanding this or is there a bug in the pdf Renderer? Cheers Karl NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e
Re: MS Excel 2 FO -- PDF
Your best bet might be to use OpenOffice. This has an export to PDF option on the file menu. Otherwise, take a look at POI for an open source java toolkit for reading and writing MS Office files. Best wishes John Burgess Risk Decisions Limited Buchan House Parkway Court Oxford Business Park South OX4 2JY T: 01865 718666 F: 01865 718600 M: 07984 863890 E: [EMAIL PROTECTED] W: http://www.riskdecisions.com Braumüller wrote: Hello, enclosed a short newbie question. Context: I have some excel-sheet templates, that i shall convert to PDF for reporting purposes. Question: My question is belonging to that, if there are somewhere in www, a tool or source-code, to convert these excel-sheet to FO-Templates, which would get the dynamic xml, to generate PDF. Thanks, Hans Braumüller http://braumueller.crosses.net/plus_malerei - 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]
Re: pdf file on left of home page
Have a look at the fox extensions. In the documentation installed with fop 0.20.5 Extensions is at the bottom of the Features section on the left. or see http://xmlgraphics.apache.org/fop/extensions.html madhavi gadireddy wrote: Hi, I want to generate a pdf file with book marks as on the pdf file on the home page of FOP. Even different views of the file are also ok. Right now the document I generate is a plain pdf file. How can I add book marks to it or create different views of the document? Any help will be appreciated. Thank you, Madhu. - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. Don't forget to register for the Risk Decisions User Conference '05, 3rd November 2005 at the Oxford Hotel, Oxford, go to www.riskdecisons.com for full details or contact Risk Decisions on +44 (0)1865 718666. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with size(width height) on using fo:external-graphic
- # I've been successful setting width and/or height on the external-graphic element. The snippet below shows the relevant bit of our xslt -- if the source img tag has a width attribute then use it as is (it's assumed to be in inches). Otherwise imgsize references a java class I wrote to extract the size in pixels of the image. This is then divided by a global variable giving the desired dots per inch for the output device (150 in our case, as a classic 300 dpi setting made the images too small, and anyway I think our colour laser actually produces 600 dpi). fo:external-graphic scaling-method=*integer-pixels* src=*{$ifile}* - # xsl:attribute name=*width* - # xsl:choose - # xsl:when test=[EMAIL PROTECTED] xsl:value-of select=[EMAIL PROTECTED] / /xsl:when - # xsl:otherwise xsl:variable name=*imgt* select=*imgsize:new($ifile)* / xsl:variable name=*img_width* select=*imgsize:getWidth( $imgt )* / xsl:value-of select=*$img_width div $dpi* / in /xsl:otherwise /xsl:choose /xsl:attribute /fo:external-graphic Matthias Wessendorf wrote: Jörg and others, thanks for your emails, but since content-width and content-height aren't supported by FOP using content-width = .5in (for example) has no desired result. In http://xml.apache.org/fop/graphics.html#resolution I saw using inch. But I guess I'm still missing something to ensure that my image is 100 x 30 size. Any idea? -Matthias -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 10:32 PM To: fop-users@xmlgraphics.apache.org Subject: Re: problem with size(width height) on using fo:external-graphic Matthias Wessendorf wrote: I have an external graphic that I load from WWW like: fo:external-graphic src=url('http://www.foo.com/bar.gif') / The file(graphic) is visible inside of my PDF file, but the size is not correct. This is a FAQ http://xml.apache.org/fop/faq.html#graphic-resolution So I added width=100px height=30px attributes, but the same result. Do *not* use pixels as measurement unless you render the FO to a bitmap image. J.Pietschmann - 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] -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.1 - Release Date: 13/06/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with FOP
You probably need to look at dave pawson's pages (http://www.dpawson.co.uk/xsl/), and maybe read a book on xslt. Variables can be created and set with xsl:varioable but you can't alter the value. Rather like a functional programming language. Otavio wrote: ok, but how I set a variable in XSLT and pass a value for it ? thanks OBG - Original Message - From: John Burgess [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Tuesday, April 05, 2005 11:27 AM Subject: Re: Trouble with FOP For the page count, put a marker on the last page and get the page number for the marker. The following is from the FOP FAQ (distributed with FOP) Total Document Pages It is frequently desirable to know the total number of pages in a document and to use that number within the document. For example, you might wish to show the page number on the first page as being page 1 of 12. To accomplish this, place an empty block with an id at the end of the flow: fo:flow ... ... fo:block id=last-page/ /fo:flow Get the number of the last page as follows: fo:page-number-citation ref-id=last-page/ This does not work in certain situations: multiple page sequences, an initial page number other than 1, or forcing a certain page count, thereby producing blank pages at the end. Warning There is no reliable way to get the real total page count with FO mechanisms. You can only get /page numbers/. Rymasz Jacky wrote: i/use the tag fo:external-graphic/ see: http://www.w3.org/TR/xsl/slice6.html#fo_external-graphic and http://xml.apache.org/fop/fo.html#external-resources ii/ here is FOP answer to your question: http://xml.apache.org/fop/fo.html#fo-total-pages Jack *De :* Otavio [mailto:[EMAIL PROTECTED] *Envoyé :* mardi 5 avril 2005 15:22 *À :* fop-users@xmlgraphics.apache.org *Objet :* Trouble with FOP Hi, I´m new with FOP... I have some question, that not found it´s answers on internet: i) How I set an image on my report ??? that is, not a static image, I want pass the a image to report. How I do that ? ii) How I set the page count to my report ??? I´m try many things, but not have sucess in none. I´m doing tests both FOP and Jasper, but my preference, is FOP ... but I´m have this trouble described above. Thanks ! OBG - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]