Re: FOP 1.1 RTF Output empty
Hi, RTF support is a bit broken in 1.1, see also https://issues.apache.org/jira/browse/FOP-2182 You can workaround by not using a PageSequenceMaster, so use your simple page master's name first as master-reference on the fo:page-sequence element and it should process again without errors. Regards, Matthias On 20.05.2015 06:03, Marc Wiest wrote: I just tried to upgrade from FOP 1.0 to 1.1 and while most things work, one RTF document doesn't. It worked smoothly with the 1.0 version, but now produces an empty zero-byte OutputStream (ByteArrayOutputStream in my case). No errors in the log, nothing. The upgrade notes https://xmlgraphics.apache.org/fop/1.1/upgrading.html don't state anything about incompatibilities with RTF. Any idea? Attached are the xml, xsl and the working output from FOP 1.0. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: FOP 1.1 - Japanese 4-byte characters are rendering as '?' in pdf
Hi Glenn, I am trying to understand if Katakana japanese language is a BMP unicode as per below link: http://www.sttmedia.com/unicode-basiclingualplane http://www.sttmedia.com/unicode-basiclingualplane If I assume that Katakana is a 4-byte japanese language. As per your reply if Katakana is BMP encoded and FOP supports it, then using FOP 1.1, my code should render 4-byte japanese characters correctly in pdf. I am attaching my code which I am using to convert japanese text into pdf. Please find attached files. fop_allfonts.xconf http://apache-fop.1065347.n5.nabble.com/file/n42155/fop_allfonts.xconf ExampleXML2PDF.java http://apache-fop.1065347.n5.nabble.com/file/n42155/ExampleXML2PDF.java Please if you have suggestion on shared files. So Questions are: 1. Is Kanataka is BMP encoded? I assume it is. 2. Am I missing something in code to convert japanese 4-byte into pdf? -- View this message in context: http://apache-fop.1065347.n5.nabble.com/FOP-1-1-Japanese-4-byte-characters-are-rendering-as-in-pdf-tp42117p42155.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
FOP 1.1 RTF Output empty
I just tried to upgrade from FOP 1.0 to 1.1 and while most things work, one RTF document doesn't. It worked smoothly with the 1.0 version, but now produces an empty zero-byte OutputStream (ByteArrayOutputStream in my case). No errors in the log, nothing. The upgrade notes https://xmlgraphics.apache.org/fop/1.1/upgrading.html don't state anything about incompatibilities with RTF. Any idea? Attached are the xml, xsl and the working output from FOP 1.0. ?xml version=1.0 encoding=UTF-8? 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:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; !-- defines page layout -- fo:layout-master-set fo:simple-page-master master-name=first page-height=29.7cm page-width=21cm margin-top=2.54cm margin-bottom=2.54cm margin-left=3.17cm margin-right=3.17cm fo:region-body margin-top=0cm / fo:region-before extent=0cm / fo:region-after extent=0cm / /fo:simple-page-master fo:page-sequence-master master-name=psmA fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-reference=first / /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-reference=psmA xsl:variable name=title select=/getabstract/header/title / fo:flow flow-name=xsl-region-body fo:block font-size=11pt font-family=Times, ArialUni fo:block font-size=14pt font-family=Times, ArialUni font-weight=bold color=#FF Book Information /fo:block fo:block Title: xsl:value-of select=/getabstract/header/title / /fo:block fo:block Subtitle: xsl:value-of select=/getabstract/header/subtitle / /fo:block fo:block Author: xsl:value-of select=/getabstract/header/authors / /fo:block fo:block Copyright: xsl:value-of select=/getabstract/header/copyright / /fo:block fo:block Year: xsl:value-of select=/getabstract/header/year / /fo:block fo:block Pages: xsl:value-of select=/getabstract/header/pages / /fo:block fo:block ISBN-13: xsl:value-of select=/getabstract/header/isbn / /fo:block xsl:if test=/getabstract/langRights fo:block xsl:value-of select=/getabstract/langRights / /fo:block /xsl:if xsl:if test=/getabstract/formatsLine fo:block xsl:value-of select=/getabstract/formatsLine / /fo:block /xsl:if fo:block#xA0;/fo:block fo:block Teaser: /fo:block fo:block xsl:value-of select=/getabstract/editorialinfo/emailsentence / /fo:block fo:block#xA0;/fo:block fo:block Email text: /fo:block fo:block xsl:value-of select=/getabstract/editorialinfo/emailsentenceweekly / /fo:block fo:block#xA0;/fo:block fo:block Key Words: /fo:block fo:block xsl:value-of select=/getabstract/editorialinfo/keywords / /fo:block fo:block#xA0;/fo:block /fo:block fo:block font-size=11pt font-family=Times, ArialUni fo:block font-size=14pt font-family=Times, ArialUni font-weight=bold color=#FF getAbstract Ratings /fo:block
Re: FOP 1.1 - Japanese 4-byte characters are rendering as '?' in pdf
Firstly, I suggest you avoid using the term 4-byte Japanese characters, since that has no meaning except in the context of some encoding, like UTF-8, UTF-16, UTF-32, etc. In Java, all String objects are encoded in UTF-16 as 16-bit code units. So BMP characters use one 16-bit code unit, and non-BMP characters use two 16-bit code units, i.e., an upper and lower surrogate. Hiragana characters are encoded in the BMP in the range U+3040 to U+309F [1], Katakana in U+30A0 to U+30FF [2], and CJK Ideographs starting at U+4E00. [1] http://www.unicode.org/charts/PDF/U3040.pdf [2] http://www.unicode.org/charts/PDF/U30A0.pdf [3] http://www.unicode.org/charts/PDF/U4E00.pdf For external FO files, or XML files you will translate to FO via XSLT, you should use the UTF-8 encoding of Unicode, and ensure that you provide a correct XML declaration at the beginning of your file: ?xml version=1.0 encoding=utf-8? I also suggest that you ensure the presence of the UTF-8 encoding of the BOM [4] at the beginning of the file: 0xEF 0xBB 0xBF. [4] http://en.wikipedia.org/wiki/Byte_order_mark On Wed, May 20, 2015 at 3:20 AM, mrunal28 loha...@gmail.com wrote: Hi Glenn, I am trying to understand if Katakana japanese language is a BMP unicode as per below link: http://www.sttmedia.com/unicode-basiclingualplane http://www.sttmedia.com/unicode-basiclingualplane If I assume that Katakana is a 4-byte japanese language. As per your reply if Katakana is BMP encoded and FOP supports it, then using FOP 1.1, my code should render 4-byte japanese characters correctly in pdf. I am attaching my code which I am using to convert japanese text into pdf. Please find attached files. fop_allfonts.xconf http://apache-fop.1065347.n5.nabble.com/file/n42155/fop_allfonts.xconf ExampleXML2PDF.java http://apache-fop.1065347.n5.nabble.com/file/n42155/ExampleXML2PDF.java Please if you have suggestion on shared files. So Questions are: 1. Is Kanataka is BMP encoded? I assume it is. 2. Am I missing something in code to convert japanese 4-byte into pdf? -- View this message in context: http://apache-fop.1065347.n5.nabble.com/FOP-1-1-Japanese-4-byte-characters-are-rendering-as-in-pdf-tp42117p42155.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org