xsl-fo

Scale down to fit an image in FOP

£可爱£侵袭症+ 提交于 2019-12-04 22:16:58
I am using FOP version 1.0 to create PDFs. In one of the pages I'd like to display an image (2552 x 4200 pixel) and scale it down if it doesn't fully fit on the page. As far as I could see on the mailing list the recommended way of doing this would be following: <fo:external-graphic inline-progression-dimension.maximum="100%" content-height="scale-down-to-fit" content-width="scale-down-to-fit" src="..."/> Unfortunately, that still doesn't display the whole image. The lower part of the image is cut off. Can anyone give me a hint on what I am potentially doing wrong? I found this page here

How to convert xsl-fo to docx (Office Open XML) in Java?

空扰寡人 提交于 2019-12-04 19:39:08
I'm looking for an open-source or commercial friendly library in Java to convert xsl-fo to docx (Office Open XML) format. I'm planing to use xsl-fo to produce pdf documents (with Apache FOP), so I thought generating Word documents ( docx ) out of the same source XML could be a good idea. UPDATE : I forgot to mention that I'm using Java. Alternatively, you could do: your source xml -> docx -> xsl-fo -> pdf. or easier perhaps: source xml -> Flat OPC XML -> xsl-fo -> pdf. Once you have a docx (or a Flat OPC XML document), transforming that to PDF via FOP is easy with docx4j (since you mention FOP

Put XSL-FO block on next page instead of splitting it across pages

柔情痞子 提交于 2019-12-04 17:37:28
问题 I created an XSL-FO template which prints a few blocks containing texts that change dynamically. Sometimes a block is split across two pages because there is not enough space on the page. Is there a way to put the block on the next page instead of splitting it across pages if it does not fit? I tried to put it into a table with keep-together="always" but then each text is on single line (no line wrapping) and overflows the right page margin where it disappears. Thank you in advance! <fo:table

How to display fixed image height and width using xsl-fo with apache fop 0.95

北城余情 提交于 2019-12-04 16:51:12
问题 I am trying to fix the height and width of image in pdf generated using fop 0.95. Here is the code used for it <fo:external-graphic src="s\image.png" height="2.00in" width="2.00in"/> Following also does not work <fo:external-graphic src="s\image.png" content-height="scale-to-fit" height="2.00in" content-width="2.00in"/> These gives us the image that is governed by width . In summary I am trying to stretch the image rather than keeping the aspect ratio using fop 0.95.Does any one have idea for

Which is the Best commercial xsl fo engine? [closed]

♀尐吖头ヾ 提交于 2019-12-04 14:39:23
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . We have been using apache's fop 0.95 as our xsl fo engine. We basically use fop 0.95 to generate pdf documents from xml files. During the run of time we have felt that it would be better by far if we could buy some other commercial xsl

How to insert line breaks in a PDF generated with XSL-FO

断了今生、忘了曾经 提交于 2019-12-04 14:03:46
I am generating a PDF using XSL-FO and XML. In a textbox, the user can enter data like "1", then he presses ENTER, then "2", ENTER, "3", etc. But in the XML and hence in the PDF, the output is "1234567". How can I preserve the line breaks? I already tried white-space-collapse , linefeed-treatment and white-space-treatment but that didn't help. My XSL looks like: <xsl:template match="AddCmt"> <fo:block keep-together="always"> Additional Comments <fo:block-container border-style="solid" height="20mm" width="170mm" space-after="5mm"> <fo:block> <xsl:attribute name="id"> <xsl:value-of select="..

How display preformatted text in a pdf generated by fop?

荒凉一梦 提交于 2019-12-04 09:41:57
Does anyone know how I can display preformatted html text like: <ol> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ol> inside a pdf generated with fop? Thanks This XSLT 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:output indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page

How to embed external pdf/txt file into another using XSL-FO?

拜拜、爱过 提交于 2019-12-04 07:44:29
Is it possible to embed an external PDF or TEXT document into a master PDF by using XSL-FO/XSLT? I have xslt stylesheet to produce PDF documents. But, the input XML contains inlined TEXT or Base64 encoded PDF documents. So what I do in my HTML version of my stylesheet I extract the TEXT or PDF and dump it on disk. Then in the xslt I have this: <xsl:when test='(n1:text/@mediaType="application/pdf") or (n1:text/@representation="B64")'> <IFRAME name='documentFrame' id='documentFrame' WIDTH='100%' HEIGHT='65%' src='{$DOC_URI}'/> </xsl:when> For HTML conversion it is working perfectly. Is it

create hyper links dynamically when transforming xml to xsl-fo using xlst?

人走茶凉 提交于 2019-12-04 07:04:49
问题 I want to create a heading in my PDF report using my xsl file. If the source file contains a hyperlink then it should render it as hyperlink, otherwise as plain text. For example, my xml looks like: <a href='http://google.com' target='_blank'>This is the heading </a>" It should display a hyperlink if there is one, otherwise display the heading as plain text. How can I do that? I am not able to use the below code under otherwise tag , please see below <xsl:choose> <xsl:when test="($RTL='true')

Any javascript (web-based) wysiwyg editor that produces xsl:fo

与世无争的帅哥 提交于 2019-12-04 04:36:03
I am having a hard time finding on OSS or commercial web-based (javascript) WYSIWYG* editor that produces XSL:FO. Would I would love to have the editor capable of doing... The user is presented with common text-editor interface, not unlike the editor I am currently typing into to submit this question to SO. The user is able to define all the structural components afforded by XSL:FO (new pages, new regions). Any "simplification" the editor can do (such as handling some of the implicit XSL:FO formatting necessary to place graphics and the like) would be helpful Ability to create inline areas,