Re: FOP 1.1 - Japanese 4-byte characters are rendering as '?' in pdf

2015-05-22 Thread mrunal28
Thanks for reply. This ensures that Katakana is BMP encoded and FOP 1.1
supports it.

But I am stuck in while generating pdf using FOP 1.1.
Here are some more queries to get it work.

1. The XML which I am using to convert into Pdf, contains encoding UTF-8 as
you suggested.
sample1.xml
http://apache-fop.1065347.n5.nabble.com/file/n42183/sample1.xml  
?xml version=1.0 encoding=UTF-8?
data
fieldFirst Name  ??/field
data-enteredJock/data-entered
/data

2. The XSL contains font family for blocks in which those will be rendered.
-  sample1.xsl
http://apache-fop.1065347.n5.nabble.com/file/n42183/sample1.xsl  
Question:
1) Should I specify the font in XSL for Japanese language?

3. Java code contains the main steps to convert XML into pdf. - 
ExampleXML2PDF.java
http://apache-fop.1065347.n5.nabble.com/file/n42183/ExampleXML2PDF.java  
// configure fopFactory
final FopFactory fopFactory = FopFactory.newInstance();

// FOP configuration -  fop_allfonts.xconf
http://apache-fop.1065347.n5.nabble.com/file/n42183/fop_allfonts.xconf  
fopFactory.setUserConfig(fop_allfonts.xconf);

// configure foUserAgent
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

// Construct fop with Pdf output format
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);

// Setup XSLT
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new
StreamSource(xsltfile));
// Start XSLT transformation and FOP processing
transformer.transform(src, res);

Question:
1) Do I need to specify fonts which will get used while rendering pdf?
(for example) fopFactory.getFontManager().setFontBaseURL(C:/fonts);
2) I have converted XSL file directly into Pdf. Is it required to convert
XSL into FO first and then from FO to 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-tp42117p42183.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



Re: FOP 1.1 - Japanese 4-byte characters are rendering as '?' in pdf

2015-05-20 Thread mrunal28
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 - Japanese 4-byte characters are rendering as '?' in pdf

2015-05-18 Thread mrunal28
Hi,

I am using FOP 1.1 and trying to convert xml to pdf. My XML file contains
japanese 4-byte characters(/カサタナハ) whose font is japanese katakana.

But my generated PDF contains '?' instead of original japanese characters.

I have font file for example katakana.ttf and made corresponding entry in
FOP config file as below:

fop
  renderers
  renderer mime=application/pdf
 fonts 

   font-triplet name=katakana style=normal
weight=normal/
  
  /fonts
  /renderer
  /renderers
/fop

Can anyone please tell me if FOP 1.1 supports japanese 4-byte characters and
if so what extra configuration is required?

I look out for same but none of FOP documentation clearly mentions that.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/FOP-1-1-Japanese-4-byte-characters-are-rendering-as-in-pdf-tp42117.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