apache-fop

How to embed font in PDF created from HTML with iText and Flying Saucer?

烈酒焚心 提交于 2020-07-17 09:52:23
问题 I have problem with embedding Polish fonts into PDF converted from HTML. My HTML code have style in body: <BODY style="font-family: Tahoma, Arial, sans-serif;font-size : 8pt;"> I tried 2 ways of converting such HTML into PDF: FOP with htmlcleaner iText with flying-saucer For FOP I can add all used fonts into its config file and then created PDF have those fonts embedded (if font is used in HTML). In resulting PDF I have Tahoma font in Identity-H encoding. It looks good -- all Polish letters

Can Apache FOP be used to convert an arbitary HTML to PDF?

一笑奈何 提交于 2020-06-23 07:38:11
问题 I have tried to use Apache FOP to convert HTML to PDF. ( HTML -->XHTML--> XSL-FO --> PDF). I used the xhtml2fo.xsl from Antenna House for the xhtml --> XSL-FO conversion. It works for simple html files. It does not work for html files with styling ( via embedded css or by style attribute). A PDF is created but completely unformatted. I am trying to convert HTML file where I do not have much control over the styling/content. Creating an xslt for each html is not practical in my use-case.

Need instream-foreign-object and text to both align to the bottom in XSL-FO

折月煮酒 提交于 2020-02-25 11:53:22
问题 I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have: <xsl:template match="barcode">

Need instream-foreign-object and text to both align to the bottom in XSL-FO

≡放荡痞女 提交于 2020-02-25 11:53:21
问题 I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have: <xsl:template match="barcode">

Need instream-foreign-object and text to both align to the bottom in XSL-FO

别说谁变了你拦得住时间么 提交于 2020-02-25 11:53:13
问题 I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have: <xsl:template match="barcode">

Apache FOP - Table component getting misaligned from second page onwards

风流意气都作罢 提交于 2020-01-17 05:34:26
问题 I am using FOP version 2.0. My template has some text paragraphs on first page after which there is a dynamic table with n number of rows. The issue is that The table layout is perfect till the rows on first page of the generated PDF file. But when it continues on the 2nd page, the columns are shifted to the right by some margin and the last column becomes invisible. Any insight on this what may be the reason? Below is he relevant portion of FO template with page masters and initial table

How to resolve “DisplayDocTitle key is not set to true” error generated by PAC tool in a pdf generated using apache FOP

懵懂的女人 提交于 2020-01-15 09:56:10
问题 I am trying to generate pdf using ApacheFOP and making it accessible. When I am running PAC tool to find out the accessibility errors we are getting the error “DisplayDocTitle key is not set to true”.Below is the xsl: <pdf:dictionary type="Catalog" xmlns:pdf="http://xmlgraphics.apache/org/fop/extensions/pdf"> <pdf:entry key="PageMode" type="name">FullScreen</pdf:entry> <pdf:entry key="PageLayout" type="name">SinglePage</pdf:entry> <pdf:dictionary type="normal" key="ViewerPreferences"> <pdf

How to detect the last page of the document?

本秂侑毒 提交于 2020-01-10 04:31:05
问题 I create pdf files from xml files with FOP. I would like to display something on the last page of the pdf. The thing is I can not know how many pages are needed to display the content so how can I know I am on the actual last page? (each page-sequence can generate 1+ document pages according to the size of the content) Thanks. 回答1: You can specify conditional page masters for general page layout and headers and footers (fo:static-content): http://www.w3.org/TR/xsl/#page-position Usage: 1.) In

Embedded font don't work in Apache FOP

为君一笑 提交于 2020-01-07 03:52:23
问题 I am using FOP to tranform xml to pdf, and I need to use Chinese characters.I did do something to use Chinese font,but it seems don't work at all. I create the font xml file. and registered in the fop.xconf <font metrics-url="/home/zhufree/Tools/fop-2.1/conf/simkai.xml" kerning="yes" embed-url="/home/zhufree/Tools/fop-2.1/conf/kaiti.ttf"> <font-triplet name="simkai" style="normal" weight="normal" /> <font-triplet name="simkai" style="normal" weight="bold" /> <font-triplet name="simkai" style=

Grouping by column row values in xsl:fo table

别等时光非礼了梦想. 提交于 2020-01-06 05:23:08
问题 I am trying to group values of individual column in xsl fo:table, some values not grouped as expected, it get grouped according to previous column's grouped value, i need individual grouping in columns, check with my xsl and xml file, i am using these files to generate PDF file using apache FOP. My XSL File <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL