PDF generation for Non English Characters from ADF

Hi
We are using below piece of code to generate pdf from ADF Managed bean. It works fine. However for non English Characters(eg. Japanese,Vietnamese,Arabic)  it puts
I got few blogs
https://blogs.oracle.com/BIDeveloper/entry/non-english_characters_appears
However we are not using BI Publisher product . We are using its API's
Can anyone tell where do we need to setup fonts within ADF or Weblogic or Server ?
Input Parameters are
a)xml Data
b)InputStream  ie rtf Template
import oracle.apps.xdo.XDOException;
import oracle.apps.xdo.template.FOProcessor;
import oracle.apps.xdo.template.RTFProcessor;
    public static byte[] genPdfRep(String pOutFileType,byte[] pXmlOut ,InputStream pTemplate)
        byte[] dataBytes = null;
        try {
            //Process RTF template to convert to XSL-FO format
            RTFProcessor rtfp = new RTFProcessor(pTemplate);
            ByteArrayOutputStream xslOutStream = new ByteArrayOutputStream();
            rtfp.setOutput(xslOutStream);
            rtfp.process();
            //Use XSL Template and Data from the VO to generate report and return the OutputStream of report
            ByteArrayInputStream xslInStream = new ByteArrayInputStream(xslOutStream.toByteArray());
            FOProcessor processor = new FOProcessor();
            ByteArrayInputStream dataStream = new ByteArrayInputStream((byte[])pXmlOut);  
            processor.setData(dataStream);
            processor.setTemplate(xslInStream);
            ByteArrayOutputStream pdfOutStream = new ByteArrayOutputStream();
            processor.setOutput(pdfOutStream);
            byte outFileTypeByte = FOProcessor.FORMAT_PDF;
            processor.setOutputFormat(outFileTypeByte); //FOProcessor.FORMAT_HTML
            processor.generate();
            dataBytes = pdfOutStream.toByteArray();
        } catch (XDOException e) {
            e.printStackTrace();
        return dataBytes;
Appreciate your help.
Thanks,
Abhijit

Fonts are defined in the template you use to generate the pdf. Your application add the data and both is processed yb the FOP processor. Now there are two possible causes of the '???' :
1. the data you sent to the template contains the '???' already
2. the template can't digest the data (the special characters) and puts '???' in the pdf.
Before going on you have to find out which one is your problem. The 2nd is the problem you better ask this in a FOP forum as you have to solve it by changing the template.
Timo

Similar Messages

  • SetMnemonic for non-english characters

    Does anybody knos how to set JButtons mnemonic for non-english characters?
    My mnemonic is loaded from a resource bundle, and in the documentation the setMnemonic(char) is only limited to english and it is written that the user should call setMnemonic(int) instead.
    So what value should this int contains in order to display the non-english char which is loaded from resource bundle?
    Thanks in advanve,
    Hanoch

    It seems that this is an issue that has popped up in various forums before, here's one example from last year:
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=490722
    This entry has some suggestions for handling mnemonics in resource bundles, and they would take care of translated mnemonics - as long as the translated values are restricted to the values contained in the VK_XXX keycodes.
    And since those values are basically the English (ASCII) character set + a bunch of function keys, it doesn't solve the original problem - how to specify mnemonics that are not part of the English character set. The more I look at this I don't really understand the reason for making setMnemonic (char mnemonic) obsolete and making setMnemonic (int mnemonic) the default. If anything this has made the method more difficult to use.
    I also don't understand the statement in the API about setMnemonic (char mnemonic):
    "This method is only designed to handle character values which fall between 'a' and 'z' or 'A' and 'Z'."
    If the type is "char", why would the character values be restricted to values between 'a' and 'z' or 'A' and 'Z'? I understand the need for the value to be restricted to one keystroke (eliminating the possibility of using ideographic characters), but why make it impossible to use all the Latin-1 and Latin-2 characters, for instance? (and is that in fact the case?) It is established practice on other platforms to be able to use characters such as '�', '�' and '�', for instance.
    And if changes were made, why not enable the simple way of specifying a mnemonic that other platforms have implemented, by adding an '&' in front of the character?
    Sorry if this disintegrated into a rant - didn't mean to... :-) I'm sure there must be good reasons for the changes, would love to understand them.

  • Problem in converting Spool to PDF file, having non-English characters

    Hi All,
            I have problem in converting Spool to PDF format.
    Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF  FM to perform conversion. But my output is having junk values( ie # ) for non-English characters. Any pointers to solve this issue will be appreciated.
    I even tried with report RSTXPDFT4 , it also gives me the same junk characters.
    Regards,
    Navin.

    Hi All,
            I have problem in converting Spool to PDF format.
    Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF  FM to perform conversion. But my output is having junk values( ie # ) for non-English characters. Any pointers to solve this issue will be appreciated.
    I even tried with report RSTXPDFT4 , it also gives me the same junk characters.
    Regards,
    Navin.

  • Removing non-English characters from data.

    Ours is global system with some data with non-English characters. We want to download file by removing this non-English characters.
    Any suggestions how we can remove these non-English characters from file..?

    The FM u said
         Replace non-standard characters with standard characters
       Functionality
         SCP_REPLACE_STRANGE_CHARS processes a text so that it only contains
         simple characters. Special characters and national characters are
         replaced in such a way that the text remains reasonably legible.
         The character set 1146 is used by default. In this case the following
         replacements are made, for example:
          Æ ==> AE        (AE)
          Â ==> A         (Acircumflex)
          Ä ==> Ae        (Adieresis)
          £ ==> L         (sterling)
         Note that the new text can be longer than the old.
    So i dont think it ll be useful for eliminating the sp. chars.
    U have to check each and every alphabet with std 26 alphabets
    Thanks & Regards
    vinsee

  • Word Replacements for Non- English Characters

    Hi
    Does anyone have an idea on implementing Word Replacements for non- english characters in TCA- DQM 11i.
    We are trying to identify, capture and cleanse common accented characters like à, â , ê
    However, the default language for replacement is American English , So even if we add these in the existing lists it will not take any effect
    Is creating a new Word replacement list for every language the solution ?? any patch recommendations???
    Thanks in advance

    It seems that this is an issue that has popped up in various forums before, here's one example from last year:
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=490722
    This entry has some suggestions for handling mnemonics in resource bundles, and they would take care of translated mnemonics - as long as the translated values are restricted to the values contained in the VK_XXX keycodes.
    And since those values are basically the English (ASCII) character set + a bunch of function keys, it doesn't solve the original problem - how to specify mnemonics that are not part of the English character set. The more I look at this I don't really understand the reason for making setMnemonic (char mnemonic) obsolete and making setMnemonic (int mnemonic) the default. If anything this has made the method more difficult to use.
    I also don't understand the statement in the API about setMnemonic (char mnemonic):
    "This method is only designed to handle character values which fall between 'a' and 'z' or 'A' and 'Z'."
    If the type is "char", why would the character values be restricted to values between 'a' and 'z' or 'A' and 'Z'? I understand the need for the value to be restricted to one keystroke (eliminating the possibility of using ideographic characters), but why make it impossible to use all the Latin-1 and Latin-2 characters, for instance? (and is that in fact the case?) It is established practice on other platforms to be able to use characters such as '�', '�' and '�', for instance.
    And if changes were made, why not enable the simple way of specifying a mnemonic that other platforms have implemented, by adding an '&' in front of the character?
    Sorry if this disintegrated into a rant - didn't mean to... :-) I'm sure there must be good reasons for the changes, would love to understand them.

  • How to retrieve non-english characters from a query

    Hello,
    My apologies if this post is not in its proper place, but I was a bit confused where to add it.
    I'm running a query using SQL Developer on a table which contains several companies names from many different countries, and one of the checks I need to make to ensure data consistency is to search for all rows which the name of company contains special or non-english characters (like ç, ã, ä as example).
    I don't know what can I use to do this. I tried to collate using NLS_SORT but it didn't work.
    Is there someway to select only the rows that contain these special or non-english characters, excluding from the results the rows that only have english characters? Please have in mind that we have many languages in this table.
    The field I would like to make the conditions on is VARCHAR2.
    Please let me know if there is any extra information I should provide you so that you can help me.
    Thank you in advance for the help.
    Regards,
    Luís

    Hi Luis,
    My apologies if this post is not in its proper place, but I was a bit confused where to add it.This is the Forum for the SQL Developer Data Modeler product.
    I suggest you try using the SQL and PL/SQL Forum: PL/SQL
    David

  • Support issue for non-English characters (in html forms)

    Hi group!
    I just want to post an issue here and see if anyone else has the same problem. First off, Im running Windows XP MCE but the French version (not the english version). This may help find out where the problem really is.
    Second, I know a bit of html and such, and I'm referring to HTML Character entities for this thread, there's a quite complete list here for reference: http://www.faqs.org/docs/htmltut/characterentitiesfamsupp69.html
    I noticed that some, not all, non-English characters written in a textarea (which is, basically, a multi-lined input box) doesnt pass well or at all to the server when sending the form from Safari. Most of the time, the content of the text area is reduced to the beginning and ends where the first accentued character is met.
    The most used French accents (é, à) are usually well interpreted (but may, once in a while, produce that bug too) by safari, but ô and î doesnt do that well.
    Oddly, this bug doesnt happen all the time and doesnt "crash" in the same manner everytime.
    So I started a thread just to see if there's anyone else having issues with any non-english characters mostly in forms. Probably flash/shockwave does work, but I'm not sure- I have not tested yet.
    Acer Aspire 5044   Windows XP   Turion 1.8GHz, 1Gb SDRam, ATI 200M xpress

    Yes, it is a known issue. I also noticed that it sometimes works, but most of the time it does not. It will hopefully be solved in the future. According to http://www.apple.com/safari/download/ changes that will come include:
    # Support for International users
    # International text input methods
    # Advanced text (contextual forms, international scripts)
    Sony Vaio   Windows XP  

  • Parsing Non English characters from OPEN DATASET

    Hi Team,
    I'm try to download the .txt file using the OPEN DATASET in the windows environment from application server, system language is set up for English.
    The problem is, in the .txt file some times I will be getting the non-English characters (Spanish). When I try to download the data into SAP it's not downloading properly eg: ñ when it downloaded into sap it took something like A+_.
    My goal is I need to download the Spanish characters properly into sap.
    Please advice how to solve this problem.
    Thanks,
    Selvaraj

    Hi Selvaraj!
    I haven't checked the situation for 4.5B, nor can I predict exact behavior, but you can give following statement a try:
    SET LOCALE LANGUAGE lg.
    This should even change content of sy-lange for whole role area (internal session), so change the value back afterwards.
    Regards,
    Christian

  • Formula to show non english characters from clob in crystal report

    Hi
    I am using the database Oracle 11g with a field clob in one of the table that i want to show in the crystal report
    But the problem is when i put the clob field in crystal report it is outputting the results perfectly for English characters but not for the Arabic ones and returning the string like (¿¿¿¿ ¿¿¿¿ ¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿¿ ¿ ¿¿¿¿¿ ¿¿¿)
    so is there any way to show the arabic (non english) characters perfectly on crystal report with clob field

    Hi Azeem,
    Make sure the arabic font should install in your system.
    Try this:
    Create a text field in your Crystal Report (a label).
    Place Arabic characters into that field (just by typing them into it on the report definition).
    Run the report. If they display correctly then its probably not Crystal, but rather would point to an issue in the data retrieval and supply to Crystal via your dataset (or whatever datasource you are using).
    If they don't display - then its definitely Crystal.

  • Question marks in PDF for non-english characters.

    I'm get report from APEX 3.0.1 (Default Report Layout) with BI Publisher 10.1.3.3.1 Base.
    In Adobe Reader 7.0.8 instead of non-english(cyrillic) characters see question marks.
    How to tune BI Publisher?

    After installation BI Publisher 10.1.3.3.1 Base (standalone, OC4J) :
    Directory of F:\bip\jdk\lib\fonts
    13/10/2007 21:16 15 196 128R00.TTF
    13/10/2007 21:16 18 473 348 ALBANWTJ.ttf
    13/10/2007 21:16 18 777 132 ALBANWTK.ttf
    13/10/2007 21:16 18 676 084 ALBANWTS.ttf
    13/10/2007 21:16 18 788 600 ALBANWTT.ttf
    13/10/2007 21:16 276 384 ALBANYWT.ttf
    13/10/2007 21:16 12 860 B39R00.TTF
    13/10/2007 21:16 18 800 MICR____.TTF
    13/10/2007 21:16 6 580 UPCR00.TTF
    Directory of F:\bip\jdk\jre\lib\fonts
    01/08/2006 19:25 75 144 LucidaBrightDemiBold.ttf
    01/08/2006 19:25 75 124 LucidaBrightDemiItalic.ttf
    01/08/2006 19:25 80 856 LucidaBrightItalic.ttf
    01/08/2006 19:25 344 908 LucidaBrightRegular.ttf
    01/08/2006 19:25 317 896 LucidaSansDemiBold.ttf
    01/08/2006 19:25 698 236 LucidaSansRegular.ttf
    01/08/2006 19:25 234 068 LucidaTypewriterBold.ttf
    01/08/2006 19:25 242 700 LucidaTypewriterRegular.ttf
    Directory of F:\bip\jre\1.4.2\lib\fonts
    24/03/2004 19:12 75 144 LucidaBrightDemiBold.ttf
    24/03/2004 19:12 75 124 LucidaBrightDemiItalic.ttf
    24/03/2004 19:12 80 856 LucidaBrightItalic.ttf
    24/03/2004 19:12 344 908 LucidaBrightRegular.ttf
    24/03/2004 19:12 317 896 LucidaSansDemiBold.ttf
    24/03/2004 19:12 698 236 LucidaSansRegular.ttf
    24/03/2004 19:12 234 068 LucidaTypewriterBold.ttf
    24/03/2004 19:12 242 700 LucidaTypewriterRegular.ttf
    What is wrong?
    In Adobe Reader's Document Properties -> Fonts
    +Helvetica:
    Type: Type1
    Encoding: Ansi
    Actual Font: ArialMT
    Actual Font Type: TrueType
    I feel BIP use wrong encoding . . .

  • Removing non english characters from my string input source

    Guys,
    I have problem where I need to remove all non english (Latin) characters from a string, what should be the right API to do this?
    One I'm using right now is:
    s.replaceAll("[^\\x00-\\x7F]", "");//s is a string having chinese characters.
    I'm looking for a standard Solution for such problems, where we deal with multiple lingual characters.
    TIA
    Nitin

    Nitin_tiwari wrote:
    I have a string which has Chinese as well as Japanese characters, and I only want to remove only Chinese characters.
    What's the best way to go about it?Oh, I see!
    Well, the problem here is that Strings don't have any information on the language. What you can get out of a String (provided you have the necessary data from the Unicode standard) is the script that is used.
    A script can be used for multiple languages (for example English and German use mostly the same script, even if there are a few characters that are only used in German).
    A language can use multiple scripts (for example Japanese uses Kanji, Hiragana and Katakana).
    And if I remember correctly, then Japanese and Chinese texts share some characters on the Unicode plane (I might be wrong, 'though, since I speak/write neither of those languages).
    These two facts make these kinds of detections hard to do. In some cases they are easy (separating latin-script texts from anything else) in others it may be much tougher or even impossible (Chinese/Japanese).

  • UTL_RAW.REVERSE for non english characters

    I'm trying to reverse a non-English work like the following and it does not work ....
    SELECT '中国' Original, UTL_RAW.cast_to_varchar2(UTL_RAW.REVERSE (UTL_RAW.cast_to_raw ('中国'))) Not_correctly_Reversed FROM DUAL;
    ORIGINAL NOT_CORRECTLY_REVERSED
    中国 ���
    Any thoughts please ?
    Appreciate responses. Thanks !

    chris227 wrote:
    Works well for meNo, it does not. It will fail if table has duplicate strings of two digit length but, what is even worse, it will produce wrong results if table has small duplicate strings:
    SQL> with testdata as (
      2                    select  '19 character string' str from dual union all
      3                    select  '19 character string' str from dual
      4                   )
      5  select distinct
      6    listagg(substr(str,level,1))within group ( order by level desc) over (partition by str) r
      7  from testdata
      8  connect by
      9  level <= length(str)
    10  and str = prior str
    11  and prior sys_guid() is not null
    12  /
    from testdata
    ERROR at line 7:
    ORA-01489: result of string concatenation is too long
    Elapsed: 00:00:36.08
    SQL> with testdata as (
      2                    select  'ABC' str from dual union all
      3                    select  'ABC' str from dual
      4                   )
      5  select distinct
      6    listagg(substr(str,level,1))within group ( order by level desc) over (partition by str) r
      7  from testdata
      8  connect by
      9  level <= length(str)
    10  and str = prior str
    11  and prior sys_guid() is not null
    12  /
    R
    CCCCCCCCBBBBAA
    Elapsed: 00:00:00.00You need to identify rows uniquely. With real table it is easy - rowid. With subquery factoring we need another view with, for example, ROW_NUMBER. However here we use subquery factoring to create sample table on-the-fly and assume OP will have real table. So I'd leave your example as is, but would let OP know to use:
    select distinct
      listagg(substr(str,level,1))within group ( order by level desc) over (partition by str) r
    from testdata
    connect by
    level <= length(str)
    and rowid = prior rowid
    and prior sys_guid() is not null
    /But this still will not work. Why? Same answer - duplicates:
    SQL> create table testdata as (
      2      select  'ABC' str from dual union all
      3      select  'ABC' str from dual
      4     );
    Table created.
    Elapsed: 00:00:00.42
    SQL> select distinct
      2    listagg(substr(str,level,1))within group ( order by level desc) over (partition by str) r
      3  from testdata
      4  connect by
      5  level <= length(str)
      6  and rowid = prior rowid
      7  and prior sys_guid() is not null
      8  /
    R
    CCBBAA
    Elapsed: 00:00:00.01
    SQL>Again, partition by str doesn't identify rows uniquery. We need to partition by rowid. But even this will not help:
    SQL> select distinct
      2    listagg(substr(str,level,1))within group ( order by level desc) over (partition by rowid) r
      3  from testdata
      4  connect by
      5  level <= length(str)
      6  and rowid = prior rowid
      7  and prior sys_guid() is not null
      8  /
    R
    CBA
    Elapsed: 00:00:00.00
    SQL>We got one row back instead of two. You probably put DISTINCT trying to resolve all these issues caused by building hierarchy and partitions on a non-unique bases. So now, when we identify rows uniquely by rowid, DISTINCT is not needed and should be replaced by GROUP BY (along with using aggregate LISTAGG instead of analytic LISTAGG). So final solution would be:
    select listagg(substr(str,level,1))within group ( order by level desc) r
    from testdata
    connect by
    level <= length(str)
    and rowid = prior rowid
    and prior sys_guid() is not null
    group by rowid
    R
    CBA
    CBA
    Elapsed: 00:00:00.00
    SQL>And with 19 character string:
    SQL> insert
      2    into testdata
      3  select  '19 character string' str from dual union all
      4                    select  '19 character string' str from dual;
    2 rows created.
    Elapsed: 00:00:00.00
    SQL> select listagg(substr(str,level,1))within group ( order by level desc) r
      2  from testdata
      3  connect by
      4  level <= length(str)
      5  and rowid = prior rowid
      6  and prior sys_guid() is not null
      7  group by rowid
      8  /
    R
    CBA
    CBA
    gnirts retcarahc 91
    gnirts retcarahc 91
    Elapsed: 00:00:00.00
    SQL>SY.

  • Download none-English characters from tables

    Hi guys,
    I use apex 4.1.1 multilingual - with oracle xe 11g R2.. with listener 1.1.3 deployed on Glassfish 3.1.1
    I have Arabic data stored in my tables. if I go to Object Browser and try to download it, I get question marks instead of the letters....
    I have the same problem if I want to download the data of IR...
    Can you help please ??
    Regards,
    Fateh

    The FM u said
         Replace non-standard characters with standard characters
       Functionality
         SCP_REPLACE_STRANGE_CHARS processes a text so that it only contains
         simple characters. Special characters and national characters are
         replaced in such a way that the text remains reasonably legible.
         The character set 1146 is used by default. In this case the following
         replacements are made, for example:
          Æ ==> AE        (AE)
          Â ==> A         (Acircumflex)
          Ä ==> Ae        (Adieresis)
          £ ==> L         (sterling)
         Note that the new text can be longer than the old.
    So i dont think it ll be useful for eliminating the sp. chars.
    U have to check each and every alphabet with std 26 alphabets
    Thanks & Regards
    vinsee

  • Support for non-English characters in Safari?

    When I browse Japanese and Chinese websites, Safari only shows blank lines and empty blocks, it seems Safari doesn't support non-English encoding or UTF-8?
      Windows XP Pro  

    It (usually) works if you use an English version of Windows. Not if you use a Chinese or Japanese version.

  • Removing non-english characters

    Hi,
    I'm trying to define a regular expression that helps me to replace non-english characters from a string.
    For example:
    BESANÇON
    and I need to get something like: BESANCON, or BESAN*ON.
    Could any one give me some hints?
    Max A.

    You can use the convert function:
    SELECT CONVERT('BESANÇON','US7ASCII')
    FROM dual;
    CONVERT(
    BESANCON
    1 row selected.

Maybe you are looking for

  • How to Redirect Customer to a Account Page

    I am trying to set up a user log in page where after the user logs in using their user name and password they are then redirected to a User Page where they can update their profile. How do I get the submit button to redirect to a new page? Thanks!

  • CPU Usage - Generating Word Docs from RoboHelp X5

    If you have generated a fair-sized document through RoboHelp, and you are having problems with your CPU usage pegging out around 100%, bouncing up and down between 50% and 100%, the page repainting as you scroll through the document, etc., this solut

  • How to see all standard report in sap pm

    hi urgent can somebody tail me how to see all standard report in sap pm

  • Server cannot be connected over ssl

    Installed self-signed certificate on the Messaging Server. And started up the messaing server with ssl. "netstat " shows port 993 is idle. But seems cannot connect to it . The messaing server was running on a standalone machine, not network connectiv

  • Not able to disable my trackpad when I connected external mouse

    Hi, Before I upgrade to Snow Leopard, I remember that I had a setting somewhere to disable the Trackpad automatically when I'm connecting my bluetooth mouse. After I upgraded to SL, I lost this function and I can't find this setting option anywhere.