RE: 0.92beta source code
I am very new on this and can't understand why the page mentioned only has directory listing and not a zipped file/solution to download. It seems to be the history of all fop changes up to the minute of the download. What I think I need is the code behind fop 0.9.2b (with all the java classes) to incorporate in my current solution. Thanks . -Original Message- From: Manuel Mall [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 3 de Julho de 2006 13:42 To: fop-users@xmlgraphics.apache.org Subject: Re: 0.92beta source code On Monday 03 July 2006 16:22, Andreia Oliveira wrote: Hi. I have a working C# solution for generating pdf files based on data from a database,xsd and xslt (for the transformation step using fop). This solution includes a project that has the sources of fop 0.20.5. As it is not meeting all my needs in terms of page breaks, svg images,... I would like to migrate to the latest fop version (0.92b). Where can I download the source code to incorporate in the Visual Studio C# project and what are the main steps and risks I should take into account when performing this task? I have JRE 1.5.0 installed in my machine. For access to the source code see: http://xmlgraphics.apache.org/repo.html For example, will the new fop version handle my xslt files or will I have to change them for compliance? Depends on what you are doing. See http://xmlgraphics.apache.org/fop/trunk/upgrading.html Is anywhere a demo on how to perform these operations? See http://xmlgraphics.apache.org/fop/trunk/embedding.html or http://xmlgraphics.apache.org/fop/trunk/running.html Thanks in advance, -- Andreia Oliveira [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] --- Manuel - 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: 0.92beta source code
Andreia, For ZIP files go to ths URL http://www.apache.org/dyn/closer.cgi/xmlgraphics/fop Regards, Fabrizio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible memory leak
Andreas, Thanks for your comments. Looks like for sure there are FOP references hanging around that GC could not clear up, which eventually kills the process. Below is a higher-level layout of the xsl. Let me know if you see anything to improve. The below xsl is applied to XML's having 500 documents(DOCUMENT/DOCUMENT each in a loop(below is the XML layout). 1 XML of 500 documents produces 1 PDF. DATA DOCUMENT/DOCUMENT DOCUMENT/DOCUMENT DOCUMENT/DOCUMENT DOCUMENT/DOCUMENT DOCUMENT/DOCUMENT DOCUMENT/DOCUMENT . . . DOCUMENT/DOCUMENT /DATA I create a page-sequence for each DOCUMENT and page-citation is contained within each of these page-sequence. My expectation was that the FOP references would clear out after each PDF is created(which isn't happening). xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set !-- first page -- fo:simple-page-master master-name=firstPage page-height=11in page-width=8.5in margin-left=0.75in margin-right=0.5in margin-top=0.6in margin-bottom=0.3in fo:region-body margin-top=1in margin-bottom=1in /fo:region-body fo:region-before extent=0.6in precedence=true /fo:region-before fo:region-after extent=1in region-name=show-footer precedence=true /fo:region-after fo:region-end region-name=omr-content-first-page extent=1in precedence=true /fo:region-end /fo:simple-page-master !-- rest pages -- fo:simple-page-master master-name=restPage page-height=11in page-width=8.5in margin-left=0.75in margin-right=0.5in margin-top=0.6in margin-bottom=0.3in fo:region-body margin-top=1in margin-bottom=1in /fo:region-body fo:region-before extent=0.6in precedence=true /fo:region-before fo:region-after extent=1in region-name=show-footer precedence=true /fo:region-after fo:region-end region-name=omr-content-rest-page extent=0.0in precedence=true /fo:region-end /fo:simple-page-master !-- last Page -- fo:simple-page-master master-name=lastPage page-height=11in page-width=8.5in margin-left=0.75in margin-right=0.5in margin-top=0.6in margin-bottom=0.3in fo:region-body margin-top=1in margin-bottom=1in /fo:region-body fo:region-before extent=0.6in precedence=true /fo:region-before fo:region-after extent=1in region-name=show-footer precedence=true /fo:region-after fo:region-end region-name=omr-content-last-page extent=1in precedence=true/ /fo:simple-page-master fo:simple-page-master master-name=pageWithoutFooter page-height=11in page-width=8.5in margin-left=0.75in margin-right=1in margin-top=1.0in margin-bottom=1.0in fo:region-body margin-top=1.6in margin-bottom=0pt/ fo:region-before extent=1in/ fo:region-after extent=0pt region-name=no-footer/ /fo:simple-page-master fo:page-sequence-master master-name=simpleDoc fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-reference=firstPage page-position=first/ fo:conditional-page-master-reference master-reference=lastPage page-position=last/ fo:conditional-page-master-reference master-reference=restPage page-position=rest/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set !-- For each DOCUMENT, call template -- xsl:for-each select=DOCUMENT xsl:call-template name=DOCUMENT /xsl:call-template /xsl:for-each /fo:root /xsl:template !-- DOCUMENT template-- xsl:template name=DOCUMENT fo:page-sequence master-reference=simpleDoc initial-page-number=1 !--header-- fo:static-content flow-name=xsl-region-before fo:block fo:external-graphic src=file:C:\img.jpg content-height=55px content-width=240px/ /fo:block /fo:static-content !--footer-- fo:static-content flow-name=show-footer fo:block fo:leader leader-length=100% leader-pattern=rule rule-thickness=.5pt / /fo:block /fo:static-content fo:static-content flow-name=no-footer fo:block/ /fo:static-content fo:flow flow-name=xsl-region-body xsl:apply-templates/ !--last page reference -- fo:block id={generate-id(.)}/ /fo:flow /fo:page-sequence /xsl:template .. Let me know if you see some red flags. Thank youvery much! -Karthik
FOP inserting white space into SVG images
Hello everyone. I'm having issues with rendering an instream-foreign-object in FOP 0.92beta. No matter what properties I set, whether it be width, height, content-width or content-height, nothing will generate the required size for the image. Basically, FOP is adding blank spacing to the image, and it will ignore some parameters. For example, if I setcontent-width="100%",content-height is ignored...and vice versa. With the sample document below, content-width is completely ignored. Try setting it to 5mm, and you'll see what I mean. All I want to do is remove the "white space" from the image...as this really screws up the formatting of the document...and to get FOP to resize the image correctly. Any help would be greatly appreciated! Thanks! Sincerely, Joseph Coutcher ?xml version="1.0" encoding="UTF-8"?fo:root initial-page-number="1" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" fo:layout-master-set fo:simple-page-master master-name="letter_landscape" page-height="8.5in" page-width="11in" fo:region-body margin-top="1in" margin-bottom="1in" margin-left="1in" margin-right="1in" / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference="letter_landscape" fo:flow flow-name="xsl-region-body" fo:block fo:instream-foreign-object content-width="180.8mm" content-height="30.0mm" background-color="red" svg:svg viewBox="0 0 180 30" svg:rect x="0" y="0" width="180" height="30" fill="none" stroke="black" / /svg:svg /fo:instream-foreign-object /fo:block /fo:flow /fo:page-sequence/fo:root
Re: FOP 0.92b Logger
Heinzer David heinzer.david at wanadoo.fr writes: Thanks a lot everybody for your help ! :) Now, with all your advises, I will try to resolve my problem... :) It's right log4j is very powerful, I made some examples to understand its use, it's relatively easy. But if I understand well, with FOP, the only thing to do is to configure the ouput display with configuration of Jakarta, the abstract layer between FOP and , by example, log4j. Arturo, if you always agree, I will be interesting for your code. I thank you in advance. Best regards Heinzer David heinzer.david AT wanadoo.fr Here's what I do: // this part goes just before you start the FOP rendering process Logger fopLogger = Logger.getLogger(org.apache.fop); NullOutputStream errorOutput = new NullOutputStream(); Appender errorAppender = new WriterAppender(new ActionErrorLayout(errors, infoMsgs), errorOutput); fopLogger.addAppender(errorAppender); // this class converts the LoggingEvent into Struts ActionMessage. class ActionErrorLayout extends Layout { ActionErrors errors; ActionMessages messages; public ActionErrorLayout(ActionErrors errors, ActionMessages infoMsgs) { this.errors = errors; this.messages = infoMsgs; } public String format(LoggingEvent arg0) { if (arg0.getLevel() == org.apache.log4j.Level.ERROR) { ActionError nextError = new ActionError(error.SAXErrorWrapper, arg0.getMessage()); errors.add(ActionErrors.GLOBAL_ERROR, nextError); } else { ActionMessage nextMsg = new ActionMessage(error.SAXErrorWrapper, arg0.getMessage()); messages.add(ActionMessages.GLOBAL_MESSAGE, nextMsg); } return ; } public boolean ignoresThrowable() { return true; } public void activateOptions() { } } HTH, arturo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP inserting white space into SVG images
On Wednesday 05 July 2006 22:36, Coutcher, Joseph James wrote: Hello everyone. I'm having issues with rendering an instream-foreign-object in FOP 0.92beta. No matter what properties I set, whether it be width, height, content-width or content-height, nothing will generate the required size for the image. Basically, FOP is adding blank spacing to the image, and it will ignore some parameters. What do you mean by adding white space to the image? Do you mean there is some white space above and below the image (which can't be really seen with your fo sample)? If that is your problem try and set the property line-height=0 on the enclosing block. This will stop any white space being created at the top and bottom (usually referred to as the 'half-leading') of all lines within the block. If this is not your problem, that is I misunderstood what your are asking, please try again to explain your problem with respect to the additional white space. Manuel For example, if I set content-width=100%, content-height is ignored...and vice versa. With the sample document below, content-width is completely ignored. Try setting it to 5mm, and you'll see what I mean. All I want to do is remove the white space from the image...as this really screws up the formatting of the document...and to get FOP to resize the image correctly. Any help would be greatly appreciated! Thanks! Sincerely, Joseph Coutcher ?xml version=1.0 encoding=UTF-8? fo:root initial-page-number=1 xmlns:fo= http://www.w3.org/1999/XSL/Format http://www.w3.org/1999/XSL/Format; xmlns:svg= http://www.w3.org/2000/svg http://www.w3.org/2000/svg; fo:layout-master-set fo:simple-page-master master-name=letter_landscape page-height=8.5in page-width=11in fo:region-body margin-top=1in margin-bottom=1in margin-left=1in margin-right=1in / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=letter_landscape fo:flow flow-name=xsl-region-body fo:block fo:instream-foreign-object content-width=180.8mm content-height=30.0mm background-color=red svg:svg viewBox=0 0 180 30 svg:rect x=0 y=0 width=180 height=30 fill=none stroke=black / /svg:svg /fo:instream-foreign-object /fo:block /fo:flow /fo:page-sequence /fo:root - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]