Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: PDF EXPORT encoding problem

  1. #1
    Join Date
    Jul 2008
    Posts
    4

    Post PDF EXPORT encoding problem

    Hi

    Firstly sorry my english.

    I use pentaho-reporting-engine-classic-0.8.10 and simple report definition format. I would be need ISO 8859-2 (Latin 2) I put the following code in to my definition:

    <configuration>
    <property name="org.jfree.report.modules.output.pageable.pdf.Encoding">Identity-H</property>
    <property name="org.jfree.report.modules.output.pageable.pdf.EmbedFonts">true</property>
    <property name="org.jfree.report.targets.table.TableWriter.SheetNameFunction">sheetNameExpression</property>
    </configuration>

    I also tried it in java code. It is not work. My generadted pdf is filled with question marks.

    if I view the pdf properties i see ArialMt and Arail-BoldMt is embeded (subset?) font type is TrueType and encoding is individual.

    What is the problem and what I should do? Sorry if the question has already acted in another place, i read several post in this forum but i not found operating solution for me.

  2. #2
    Join Date
    Jul 2008
    Posts
    4

    Unhappy somebody???

    please help, I run off time and I do not find solution

  3. #3
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Your configuration looks fine. So assuming that your text-elements use a true-type font (and not one of the built-in fonts ["Serif", "SansSerif", "Dialog" or "Monospaced"]) then your fonts should be perfectly embedded.

    Encoding issues can also come from layers below the reporting engine. Some databases are known to show similar behavior, where the JDBC driver does not properly encode the text and editing XML-files without using a encoding-aware editor can mess up your labels. To find out which layer is wrong, add a label with some ISO-8859-2 characters (this ignores the database) and try to export the report as HTML (this shows whether your problem is PDF specific (font problems then)).
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4
    Join Date
    Jul 2008
    Posts
    4

    Default re

    Thanks the answer. I set all of my xml root elements: fontname="Arial"

    example:

    <groupheader height="20" fontname="Arial" fontstyle="plain" fontsize="10">

    <items fontname="Arial" fontsize="12">

    etc...

    I generated a HTML. This is: http://www.nnpapp.extra.hu/1.html

    It is perfect but the PDF isnt.: http://www.nnpapp.extra.hu/sample.pdf

    This is the report definition xml: http://www.nnpapp.extra.hu/default.xml

    I not use database data source. I use a TableModel.



    Quote Originally Posted by Taqua View Post
    Your configuration looks fine. So assuming that your text-elements use a true-type font (and not one of the built-in fonts ["Serif", "SansSerif", "Dialog" or "Monospaced"]) then your fonts should be perfectly embedded.

    Encoding issues can also come from layers below the reporting engine. Some databases are known to show similar behavior, where the JDBC driver does not properly encode the text and editing XML-files without using a encoding-aware editor can mess up your labels. To find out which layer is wrong, add a label with some ISO-8859-2 characters (this ignores the database) and try to export the report as HTML (this shows whether your problem is PDF specific (font problems then)).

  5. #5
    Join Date
    Jul 2008
    Posts
    4

    Default

    And my other problem. The report definition xml cannot find when i export my program to a jar. I try 2-3 different way:

    URL:
    None of the selected factories was able to handle the given data: ResourceKey{schema=org.jfree.resourceloader.loader.URLResourceLoader, identifier=file:/C:/NAP/template/default.xml, factoryParameters={}, parent=null} at hu.nap.ajanlat.report.ArajanlatRiportHelper.showPreview(ArajanlatRiportHelper.java:147)
    org.jfree.resourceloader.ContentNotRecognizedException: None of the selected factories was able to handle the given data: ResourceKey{schema=org.jfree.resourceloader.loader.URLResourceLoader, identifier=file:/C:/NAP/template/default.xml, factoryParameters={}, parent=null}

    FILE:
    None of the selected factories was able to handle the given data: ResourceKey{schema=org.jfree.resourceloader.loader.file.FileResourceLoader, identifier=c:\NAP\template\default.xml, factoryParameters={}, parent=null} at hu.nap.ajanlat.report.ArajanlatRiportHelper.showPreview(ArajanlatRiportHelper.java:185)
    org.jfree.resourceloader.ContentNotRecognizedException: None of the selected factories was able to handle the given data: ResourceKey{schema=org.jfree.resourceloader.loader.file.FileResourceLoader, identifier=c:\NAP\template\default.xml, factoryParameters={}, parent=null}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.