Re: Problem with page content overflowing the footer.
Hello Vincent, 2008/12/5 Vincent Hennebert [EMAIL PROTECTED]: Can you please provide a sample FO file showing the problem, so that we can confirm? Okay, I have now simplified the file a bit. I attached it to this email together with the pdf produced. In order not to overflow the footer, the page should be broken before point 25 but it broken after it. All the best, Chris test.fo Description: Binary data test.pdf Description: Adobe PDF document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PDF Image extension and encryption don't go together?
It appears this is not so simple. Depending on which approach I try I end up missing functionality in either the PDFBox or FOP PDF library APIs to cover that requirement: If I work with the decoded stream but get a PDF with JPEG images I get a warning from PDFBox: Warning: DCTFilter.decode is not implemented yet, skipping this stream. And the resulting PDF is corrupt. I would need the ability to ignore the DCT filter which is currently not possible. On the other side, if I want to try to just encrypt the undecoded stream AbstractPDFStream currently lacks finer control over the applied filters. So I either have to modify PDFBox or the FOP PDF library for which I don't currently have enough time. It also creates a dependency on a new version of either package. So for now, that means: no support for encrypting PDFs when PDF images are used. If you want to try yourself, feel free. On 07.12.2008 21:56:12 Jeremias Maerki wrote: As a performance measure, I have copied the undecoded stream content over to the target document which, if encryption is enabled, obviously won't work. I'm working on a fix and will get back to you. On 05.12.2008 16:02:40 Peter Coppens wrote: Fop fans, I have the impression that when using e.g. the -noprint fop command line option while pdf rendering an fo that referers to a pdf as external-graphic, the pdf is either not included or not included correctly. E.g. this fo document reproduces the problem fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=pm page-height=25cm page-width=20cm fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=pm fo:flow flow-name=xsl-region-body fo:block-container absolute-position=fixed fo:block fo:external-graphic src=url(http://xmlgraphics.apache.org/fop/0.95/pdfencryption.pdf#1) content-height=scale-to-fit content-width=scale-to-fit/ /fo:block /fo:block-container /fo:flow /fo:page-sequence /fo:root Thanks Peter -- View this message in context: http://www.nabble.com/PDF-Image-extension-and-encryption-don%27t-go-together--tp20855649p20855649.html Sent from the FOP - Users mailing list archive at Nabble.com. Jeremias Maerki Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: keep-together.within-column
Hi Sandra, sandraB wrote: I'm using a xsl stylesheet to transform an xml file to FO file. I don't know exactly in which cells I can get the classnames. So that means that you don’t have a special markup for classnames? In which case it’s only a guess game indeed. Maybe you can use a regexp attempting at identifying classnames; something like [a-zA-Z]+\(\.[a-zA-Z]+\)* As to implement that in XSLT... I use a template to search '.' and replace it by '\u200B' but I'm facing another problem with the invalid character (\). I'll update this topic when I will have the solution, but feel free to comment my solution. You can use the XML entity: #x200B; Just put it like this in your XSLT stylesheet, and the XSLT processor should process it correctly. Georg Datterl wrote: Hi Sandra, Basically depends how you get your data and where you manipulate it. I think, in the end the class name should look like com.\u200Bx.\u200Bxxx.\u200Bxxx.\u200Bx.\u200BGenericDecoder (in case Outlook is killing that: after each period is a unicode 200B). That should do the trick. Possibly more elegant readers can provide more elegant solutions. HTH, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: keep-together.within-column
Hi, I'm facing another issue. I keep my solution but with yours it will be the same problem: I transform the text() node by replacing the '.' with '\u200B'. But how can I call the xsl:apply-templates on the result (I can have some bold text text or italic text text in a table cell) ? My templates xsl:template match=td fo:table-cell overflow=visible keep-together.within-column=always fo:block padding=0cm white-space-collapse=false xsl:call-template name=addZeroWidthSpace xsl:with-param name=str select=text() / /xsl:call-template /fo:block /fo:table-cell /xsl:template xsl:template name=addZeroWidthSpace xsl:param name=str / xsl:variable name=hyphenation-character#x200B;/xsl:variable xsl:choose xsl:when test='.' and contains($str, '.') !-- I need to apply another templates on substring-before($str, '.') -- xsl:value-of select=substring-before($str, '.') /.xsl:value-of select=$hyphenation-character / xsl:call-template name=addZeroWidthSpace xsl:with-param name=str select=substring-after($str, '.') / /xsl:call-template /xsl:when xsl:otherwise !-- I need to apply another templates here -- xsl:value-of select=$str / /xsl:otherwise /xsl:choose /xsl:template Vincent Hennebert-2 wrote: Hi Sandra, sandraB wrote: I'm using a xsl stylesheet to transform an xml file to FO file. I don't know exactly in which cells I can get the classnames. So that means that you don’t have a special markup for classnames? In which case it’s only a guess game indeed. Maybe you can use a regexp attempting at identifying classnames; something like [a-zA-Z]+\(\.[a-zA-Z]+\)* As to implement that in XSLT... I use a template to search '.' and replace it by '\u200B' but I'm facing another problem with the invalid character (\). I'll update this topic when I will have the solution, but feel free to comment my solution. You can use the XML entity: #x200B; Just put it like this in your XSLT stylesheet, and the XSLT processor should process it correctly. Georg Datterl wrote: Hi Sandra, Basically depends how you get your data and where you manipulate it. I think, in the end the class name should look like com.\u200Bx.\u200Bxxx.\u200Bxxx.\u200Bx.\u200BGenericDecoder (in case Outlook is killing that: after each period is a unicode 200B). That should do the trick. Possibly more elegant readers can provide more elegant solutions. HTH, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/keep-together.within-column-tp20854422p20895180.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with page content overflowing the footer.
Hi Chris, Chris Dams wrote: Hello Vincent, 2008/12/5 Vincent Hennebert: Can you please provide a sample FO file showing the problem, so that we can confirm? Okay, I have now simplified the file a bit. I attached it to this email together with the pdf produced. In order not to overflow the footer, the page should be broken before point 25 but it broken after it. I can confirm that this is the same bug. Actually there’s no need to have a block with elastic spaces before the list, just having elastic spaces on elements inside the list is enough to trigger the bug. Can you please create a bug report and attach your sample file? https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop So that we can keep track of this. Meanwhile, as a workaround, you can use tables instead of lists and achieve a similar effect (a narrow column for the bullet, a wide one for the content). Spaces inside the table won’t shrink or stretch (they will be kept to the optimal value), but at least you won’t have overflowing of the bottom margin. Thanks, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: keep-together.within-column
I'm using a xsl stylesheet to transform an xml file to FO file. I don't know exactly in which cells I can get the classnames. I use a template to search '.' and replace it by '\u200B' but I'm facing another problem with the invalid character (\). I'll update this topic when I will have the solution, but feel free to comment my solution. Georg Datterl wrote: Hi Sandra, Basically depends how you get your data and where you manipulate it. I think, in the end the class name should look like com.\u200Bx.\u200Bxxx.\u200Bxxx.\u200Bx.\u200BGenericDecoder (in case Outlook is killing that: after each period is a unicode 200B). That should do the trick. Possibly more elegant readers can provide more elegant solutions. Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult Content GmbH: www.willmycc.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/keep-together.within-column-tp20854422p20892434.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: keep-together.within-column
Hi Sandra, sandraB wrote: Hi, I'm facing another issue. I keep my solution but with yours it will be the same problem: I transform the text() node by replacing the '.' with '\u200B'. But how can I call the xsl:apply-templates on the result (I can have some bold text text or italic text text in a table cell) ? I’m no XSLT specialist, but I’d play a bit more with XPath: “transform every text node that is a descendant of a td element”: xsl:template match=td//text() xsl:call-template name=addZeroWidthSpace select=./ /xsl:template If you have something like tdText with bbold/b fragment/td, the above template will be called 3 times: on “Text with ”, “bold” and “ fragment”. In the template matching td you can replace the call to addZeroWidthSpace with a simple xsl:apply-templates/. My templates xsl:template match=td fo:table-cell overflow=visible keep-together.within-column=always fo:block padding=0cm white-space-collapse=false xsl:call-template name=addZeroWidthSpace xsl:with-param name=str select=text() / /xsl:call-template /fo:block /fo:table-cell /xsl:template xsl:template name=addZeroWidthSpace xsl:param name=str / xsl:variable name=hyphenation-character#x200B;/xsl:variable xsl:choose xsl:when test='.' and contains($str, '.') Why are you testing for '.'? It seems to me that you can simply do xsl:when test=contains($str, '.') !-- I need to apply another templates on substring-before($str, '.') -- xsl:value-of select=substring-before($str, '.') /.xsl:value-of select=$hyphenation-character / xsl:call-template name=addZeroWidthSpace xsl:with-param name=str select=substring-after($str, '.') / /xsl:call-template /xsl:when xsl:otherwise !-- I need to apply another templates here -- xsl:value-of select=$str / /xsl:otherwise /xsl:choose /xsl:template If you still have trouble getting your stylesheet right, I suggest you to ask on the Mulberry Tech XSL list: http://www.mulberrytech.com/xsl/xsl-list/index.html You will have more chance to find XSLT specialists who will be able to help you. HTH, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Create a .PCL file instead of a .PDF
FOP-0.95 RedHat Linux Java 1.5 Creating the PDF file is not a problem. The output is perfect. Printing What: a short doc that includes one logo file (.gif) and one watermark (.jpg). The user has a requirement that the SAME data must also produce a .PCL file. My Java program (from the Apache web site) has been changed as follows: Fop fop = fopFactory.newFop(MimeConstants.MIME_PCL, foUserAgent, out); My fop.xconf has been changed as follows: renderer mime=application/vnd.hp-PCL renderingquality/rendering text-renderingbitmap/text-rendering /renderer The PCL file is produced with two problems: 1. It chooses Legal Size paper by default 2. The Logo (a .gif) shows up as a solid black rectangle 3. The watermark (a .jpg) does not print Any ideas/suggestions??? Thanks. Jeff
Re: Create a .PCL file instead of a .PDF
Jeff, From experience: Don't use transparency in gif's. Don't use oversized jpeg's expect scaling down to work in PCL, it doesn't. I convert all images to non-transparent gif they work in both PCL and PDF. PCL versions of the image are lower quality slightly shrunken, but workable. BMP etc probably work OK, but I use the same images for web stuff too. Regards, *Roland* Steffanina, Jeff wrote: FOP-0.95 RedHat Linux Java 1.5 Creating the PDF file is not a problem. The output is perfect. Printing What: a short doc that includes one logo file (.gif) and one watermark (.jpg). The user has a requirement that the SAME data must also produce a .PCL file. My Java program (from the Apache web site) has been changed as follows: Fop fop = fopFactory.newFop(MimeConstants.MIME*_PCL*, foUserAgent, out); My fop.xconf has been changed as follows: renderer mime=application/vnd.hp-PCL renderingquality/rendering text-renderingbitmap/text-rendering /renderer The PCL file is produced with two problems: 1. It chooses Legal Size paper by default 2. The Logo (a .gif) shows up as a solid black rectangle 3. The watermark (a .jpg) does not print Any ideas/suggestions??? Thanks. */Jeff/* This e-mail is solely for the use of the intended recipient and may contain information which is confidential or privileged. Any unauthorised use of its contents is prohibited. If you have received this e-mail in error, please notify the sender via return e-mail and then delete the original e-mail. This e-mail is solely for the use of the intended recipient and may contain information which is confidential or privileged. Any unauthorised use of its contents is prohibited. If you have received this e-mail in error, please notify the sender via return e-mail and then delete the original e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]