xsl-fo

FOP XSL-FO Anchor in an external destination

十年热恋 提交于 2019-12-04 03:22:56
With XSL-FO (Fop), I succeeded in creating a link to an external PDF : <fo:basic-link show-destination="new"> <xsl:attribute name="external-destination">foo.pdf</xsl:attribute> </fo:basic-link> But now, I would like to reach an anchor in this external PDF. So I tried to build something like that : <fo:basic-link show-destination="new"> <xsl:attribute name="external-destination">foo.pdf#anchorId</xsl:attribute> </fo:basic-link> Unfortunately, when I click on the generated link, I get an error. It tries to open the document foo.pdf%23anchorId . In my .fo file, the link is correct with a # but

ASP .net current physical location

旧时模样 提交于 2019-12-04 02:06:15
Hi I am developing an ASP.net web application. I need to find the current location (physical) of the web site (or the bin directory containing the assemblies). I have tried using Directory.GetCurrentDirectory() and that returns me the ASP .net temporary directory. I really don't like the idea of include an application setting for the absolute path in my config file (eww!) Any help would be much appreciated! :) Conclusion: I should have given some context as to Why I would like the physical file path. Thanks guys for your prompt responses to the question :) I am using XSL-FO for .net (the FO

Rounded corners in XSL-FO

浪尽此生 提交于 2019-12-04 01:24:28
问题 Our client's request is to have tables in PDF with rounded corner. I only have Apache FOP processor at my disposal and it doesn't support the rounded corner attribute. It also doesn't support floats, so floating rounded images to left and to right cannot be done. Do you have any suggestions on how to do this? 回答1: You can create the table as a Scalable Vector Graphics(SVG) object, and include that as an external-image in your XSL-FO document. SVG supports rounded corners, and FOP supports SVG

Converting between document formats in C#

◇◆丶佛笑我妖孽 提交于 2019-12-03 23:07:08
问题 What is the best way to convert between HTML, XML, and XSL-FO in C#? I already have the HTML (piped in from FCKEditor) and I'd like to print a PDF (I have an XSL->PDF converter). I just can't seem to find a library that will convert from HTML into anything XSL friendly. 回答1: A year or two back, I had to generate pdfs from a C++/C# program. In the end I settled on launching Apache's Java FOP as a separate process to do the conversion. The experience with xsl-fo was not a pleasant one. At the

How to print source XML into a PDF using XSL-FO?

佐手、 提交于 2019-12-03 20:25:36
Good day! I need to write a xsl-fo template but I don't have access to the source XML. Is there a way how top print the source XML into a PDF so that I can copy it from the PDF then and paste into a file? It should have the same structure as the source xml including attributes. Please how to do it? Thank you in advance! Vojtech Edited: I have a web interface where I can paste my template and a PDF is generated. But I don't exactly know what is the structure of the XML used as data source. So I need to write another template which will read input XML (elements, attributes, structure) and write

Is there something “like” CSS built into XSL-FO?

我的梦境 提交于 2019-12-03 17:30:18
问题 I know that XSLT itself has attribute-sets, but that forces me to use <xsl:element name="fo:something"> every time I want to output an <fo:something> tag. Is there anything in the XSL-FO spec that would allow me to specify (let's say) a default set of attributes (margin, padding, etc.) for all Tables in the FO output? Essentially I'm looking for the functionality of CSS, but for FO output instead of HTML. 回答1: No, you are not required to use xsl:element, the use-attribute-sets attribute can

XSL-FO Foreign Characters (Polish) Unicode in APACHE FOP (V. 1.1)

荒凉一梦 提交于 2019-12-03 16:12:04
I have the following xsl-fo code, attempting to produce foreign characters. <?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> ... <fo:block font-size="11pt" font-family="calibri" language="pl"> Odwrotna strona tego pisma zawiera ważne informacje. jeżeli potrzebuje Pan/i pomocy, aby je zrozumieć, proszę zadzwonić pod numer X-XXX-XXX-XXXX po bezpłatne usługi językowe. </fo:block> I've tried every font-type I can think of to access the required unicode characters, but have had no success so far. Is there something wrong with my formatting? Or the

Displaying SVG using XSLFO

有些话、适合烂在心里 提交于 2019-12-03 13:27:39
First question from me; I'm currently fixing a graphing service that uses XSLFO to convert our syntax to FO, and converting it to PDF in the end. Previously we've been using PNG graphs from the web in the PDF exports, but this creates really ugly results, so we've decided to go with SVG for PDF instead. However, the SVG doesn't seem to scale into the SVG canvas properly. Here is the syntax before run into XSLFO: <img src="someimage.svg"> And here is the XSLFO I'm using: <xsl:template match="img"> <fo:block space-after="12pt"> <fo:instream-foreign-object width="20cm" height="15cm" content-width

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

怎甘沉沦 提交于 2019-12-03 11:07:50
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 table-layout="fixed" width="100%"> <fo:table-column column-width="proportional-column-width(1)"/> <fo

Is there something “like” CSS built into XSL-FO?

好久不见. 提交于 2019-12-03 06:18:44
I know that XSLT itself has attribute-sets, but that forces me to use <xsl:element name="fo:something"> every time I want to output an <fo:something> tag. Is there anything in the XSL-FO spec that would allow me to specify (let's say) a default set of attributes (margin, padding, etc.) for all Tables in the FO output? Essentially I'm looking for the functionality of CSS, but for FO output instead of HTML. No, you are not required to use xsl:element, the use-attribute-sets attribute can appear on literal result elements if you place it in the XSLT namespace, so you can use something like: <fo