Fonts used in HTML rendered components not displayed

Hi all,
I have a problem using fonts in components with text that is being rendered by the HTML renderer.
It's the exact same problem as described in this topic;
http://forum.java.sun.com/thread.jspa?forumID=257&threadID=222691
but no solution found...
When I do this, my font isn't displayed (only the default SansSerif font is used at this point);
JLabel label = new JLabel("<html>a text</html>");
InputStream fontStream = getClass().getResourceAsStream("SystemVIO.ttf");
Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
label.setFont(font.deriveFont((float)12));SystemVIO is placed in a JAR-file (loaded in my classpath).
And when I do this, it is displayed correctly;
InputStream fontStream = getClass().getResourceAsStream("SystemVIO.ttf");
Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
JLabel label = new JLabel("<html>a text</html>");
label.setFont(font.deriveFont((float)12));But the real problem here is, if one component is made with a HTML renderer, none of the other components can use a font if it's loaded after the FIRST component with HTML renderering is constructed.
So, for some reason, the fonts aren't reloaded in the HTML renderer (is the html renderer native?) whenever I use createFont().

Hi Sundar,
if I understand your post properly, what your are doing in your BSP is executing a procedure to create an Adobe document, and then placing that document into the HTTP response.
If you have built this code by following some of the blogs in SDN, you probably do something like...
response->set_header_field( name  = 'content-type'
                            value = 'application/pdf' ).
l_pdf_len = XSTRLEN( l_pdf_xstring ).
response->set_data( data   = l_pdf_xstring
                    length = l_pdf_len ).
navigation->response_complete( ).
What this code does is change the type of the HTTP response to 'application/pdf', set the content of the HTTP repsonse to the PDF data stream, and finally signal the HTTP runtime that processing has completed.
Once processing has been completed control is returned to the HTTP runtime. This means any further 'down-stream' code in your BSP will not be executed. This includes the Layout section of your BSP.
It is not possible to send two responses, PDF data and HTML data, to a single HTTP request. If you want to show both on the same web page you need to embed the Adobe document into the HTML page using frames or some other method.
Cheers
Graham Robbo

Similar Messages

  • Some HTML Emails Do Not Display Properly

    Recently, some HTML emails do not display properly in Mail. All I see is HTML. Yet, 98% of my HTML emails render properly.
    Any thoughts on why this happens with some emails? Is it a Mail issue or are these emails not coded properly?

    Hello Tony.
    Could be a combination but since Mail renders 98% of of all HTML messages properly (using Safari as the engine), this indicates it is a coding problem.
    I'm not a big fan of using HTML with email since it introduces a number of problems. If everyone used Plain Text for message composition, the majority if not all problems experienced with email would be eliminated.

  • Cannot extract the embeded font 'KDGXKF+TTF5BC9A0t00'.Some characters may not display or print correctly.

    I am currently using Adobe Reader version 9.1.3. When I open certain files, it displays the following message, "Cannot extract the embeded font 'KDGXKF+TTF5BC9A0t00'.Some characters may not display or print correctly". Some fonts are actually missing and will not display when printing. I have tried updating adobe but the problem still persists. Under file properites, the following font TTF5BC9A0t00 is recognised by Adobe as true type and custom encoding. Anyone has any suggestions for fix??
    Cheers
    RK

    RK7.10.09 wrote:
    Under file properites, the following font TTF5BC9A0t00 is recognised by Adobe as true type and custom encoding. Anyone has any suggestions for fix??
    Cheers
    RK
    BUT, does it say "embedded" or "embedded subset" next to the font name. If not, the font isn't included in the file and if you don't have it, it can't display or print it.
    The file creator will need to embed the fonts properly although "some" fonts don't allow embedding. This could be one of them.

  • Cannot extract the embedded font 'F2'. Some characters may not display or print correctly.

    This question was previously published but no answer has been found.
    Error message is :
    "Cannot extract the embedded font 'F2'. Some characters may not display or print correctly."
    Many pdf documents display this error with Adobe Reader 8.1.0. We have errors for embedded fonts 'F0','F3','F7' and so on.
    It looks like a Adobe Reader bug because :
    - All PDF files can be opened with Acrobat Reader 5.0.5, 6.x and 7.x, can't be opened with 8.1.0 version.
    - the 8.1.1 update removes only the bug for 'F0' error message (issue #1572280).
    The solution :
    - to publish a 8.1.2 update to fix this important bug
    - is there a registry parameter or tool option to disable the checking added in 8.x version of Adobe Reader ? The 8.x version catches more errors to be compliant with Adobe specification but Adobe reader must be
    compliant with all documents generated by third party products.
    This Adobe Reader bug applies to Windows Vista, XP Pro SP2, 2000.
    Thx,
    Regards

    Just to let you know, for anyone else with this problem. I had this problem occur on a MAC when you tried to do save to PDF in excel. This was all happening at the point of generation of the PDF in my case.
    The fix was to delete ALL the microsoft preferences, but perahps only the font cache needed to be deleted.
    I deleted the following areas from the local users userprofile on the mac. On windows, I would probably log in as a differnet user to try to see if the problem just exsists for one particular user.
    Here are the sections I deleted:
    Library/caches/metadata/Microsoft*
    Username/library/preferences/com.microsoft* ( and anyhting with microsoft in it)
    I did leave the entourage settings though.
    hope it helps someone with a similar issue.

  • The padlock icon shown when entering secure sites using Firefox 3.x is not displayed using Firefox 4. How can this be restored? Is it indicating another problem?

    The padlock icon shown when entering secure sites using Firefox 3.x is not displayed using Firefox 4.

    It has been changed. Please read this article:
    https://support.mozilla.com/en-US/kb/Site%20Identity%20Button
    You can use this add-on to get the classic icon back:
    https://addons.mozilla.org/en-US/firefox/addon/padlock-icon/

  • Cannot extract the embedded font 'EX_CFF_Arial_Black'. Some characters may not display or print corr

    I have been getting the error....
    Cannot extract the embedded font 'EX_CFF_Arial_Black'. Some characters may not display or print correctly.
    I have tried to look online to figure this out but I have had no luck.  If anyone has any suggestions to fix this I would love to hear them.  Thanks!

    Just to let you know, for anyone else with this problem. I had this problem occur on a MAC when you tried to do save to PDF in excel. This was all happening at the point of generation of the PDF in my case.
    The fix was to delete ALL the microsoft preferences, but perahps only the font cache needed to be deleted.
    I deleted the following areas from the local users userprofile on the mac. On windows, I would probably log in as a differnet user to try to see if the problem just exsists for one particular user.
    Here are the sections I deleted:
    Library/caches/metadata/Microsoft*
    Username/library/preferences/com.microsoft* ( and anyhting with microsoft in it)
    I did leave the entourage settings though.
    hope it helps someone with a similar issue.

  • Font used in masked component is not rendered

    Hi,
    I developed a formular using components (Button and List),
    that formular is masked and all the fonts used used by my
    components are not displayed.
    When removing the mask, the component's titles are
    displayiing properly.
    How can I render the font of my components when masked?
    Is there a trick?
    Thanks

    I found the solution :
    the form is contained in a clip called "clip", I merely had
    to set the cacheAsBitmap value to true :
    clip.cacheAsBitmap=true;

  • Hp P1102w html config is not displaying​/being interprete​d (source code only)

    As the subject heading says, I am trying to configure an HP P1102w for wifi based printing in my local network.  But the html config page is not displaying (from the MacOS printer utility.)  I have updated the firmware of the printer.  The printer shows up when I connect it to my Mac through USB.  My Mac is running OS 10.6.8.  Thanks for your help.

    Hi,
    Reboot your MAc and try again.
    If the same persists, click the Apple icon and then click on Force Quit.
    If there is any HP task running, terminate the task and try launching the HTML Config tool once again.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Fonts used in some text layers not available...

    I've been gettting the following message lately when opening Photoshop files at work: "Fonts used in some text layers are not available for activation. You will need to replace these fonts before the layers can be used for vector based output".
    But when I check my text layers, there are no indications that any fonts are missing. I double click on every text layer to see what font is being used and double check Suitcase Fusion to make sure it is activated.
    I'm using OSX Maverick 10.9.2. I'm using Suitcase Fusion 5 version 16.2.0. And I'm using Photoshop CC 14.2.1. It's more of an annoyance than anything, but would like to know why it keeps telling me fonts are not available when they are currently activated in Suitcase. Not sure if it's an Adobe issue or a Suitcase Fusion issue.
    Anyone have any ideas on this?
    Thanks!
    Steve

    DrStrik9, I opened up the file, clicked on each text layer and selected all to make sure there wasn't any character using a different font. There wasn't. I clicked on the font being used, tried changing it to a different font, then back to the font that was being used. I saved and closed the file, then reopened it, and that seemed to cure it for that file. Not an efficient way to go about it though.
    I then tried another file that was giving me the same error, clicked on each text layer, changed the font to a different one, then back to what was being used, saved, closed and reopened it, and still got the same message. So it didn't work for that one. I then tried changing the font to a system font, Times Bold true type, saved, closed, reopened, and got the message again. So not sure what is going on. The fonts used in the first file were DIN and DINEngschrift postscript font, which were loaded and active in Font Fusion.
    The 2nd file I tried was using Gotham Bold postscript font, which also was active in Font Fusion. I've run Font Doctor on the fonts and found no issues.
    Even though I'm getting the error message when I'm opening these files, none of the text layers have that Exclamation point indicating there is an issue with the layer, so it would seem the text layers are fine. Just really annoying to get that error every time I open the file.
    Another thing I tried is I created a new Photoshop file and just made some text layers using Gotham Bold. Saved, closed and reopened the file and did not get the message. So, I don't know why I would get it with one file and not another. Very confusing/frustrating. Any other ideas?
    Thanks in advance,
    Steve

  • A Components not displayed in JDialog opened from Applet.

    Hi. I have an Applet from which I am opening a JDialog, that contains a JPanel with some JTextFields. Sometimes half of textfields are not displayed. Does anybody know something about such problem?

    When you say sometimes do you mean sometimes or do
    you mean all the time?sometimes.
    In general when you have a condition that only
    sometimes occurs this is the result of a race
    condition. Assuming that this is something you see
    only sometimes, my guess is that you are displaying
    the dialog (calling setVisible(true)) before you have
    finished adding all the componentsYep. you are 100% right. found it. it was not synchronized lazy initialization called from some callbacks in different threads. ;)

  • Simple text edit html files will not display as web pages using Safari

    How does one get Text Edit files saved as HTML to display as a web page rather than showing the code as written?  It appears that somehow some sort of code generator is being invoked and causing this to happen.  I am not trying to do anything complex, just simple files like "Hello World".

    Hi ..
    Make sure you are following the instructions as noted here >  Creating a Basic Web Page
    You may need to turn off all Safari extensions.
    From your Safari menu bar click Safari > Preferences then select the Extensions tab.
    Switch to OFF.
    Then see if it reads as HTML or Hello World.

  • Displayed Properties in Collection List Renderer are not displayed

    Hello All,
    I have created one custom property and entered the value for a resource which had that property.
    Now, when I am trying to display the custom property in any layout, its not coming, even though I have added the property name in the Displayed Property of the collection list renderer.
    To check the view is taking the correct layout or not, i changed some other settings of the collection list renderer and the changes are immediately getting reflected. What could be the problem here?
    Any help, deeply appreciated
    Regards
    BP

    Hello Bobu,
    Are you using a different Namespace Alias other than 'Default' in your property definition? If so then you need to specify the property in the 'Displayed Properties' parameter of the collection renderer as <NamespaceAlias>:<propetrty ID>, e.g. rnd:displayname.
    Other than that you should check the 'Folder Validity Patterns' and 'Document Validity Patterns' to make sure they are valid for the content on which you are trying to display this property, you may have already checked this.
    Regards,
    Lorcan.

  • HTML files do not display IE Icon..

    Please, I recently bought a new PC... installed DW on it but
    none of my HTML files is displaying properly... they work... but
    they do not appear with the typical IE logo... what to do ?
    Thanx in advance...

    "Sw Jiten" <[email protected]> wrote in
    message
    news:el331c$ca1$[email protected]..
    > the only one:
    >
    > Open your Windows Explorer, then go to any place in your
    Hard Disk and you
    > will see file right ? well.. what do they display? they
    display their
    > name,
    > properties and aslo, they are very recognizable because
    ... of the logo
    > or
    > icon they have... for example, a PDF document has a
    white and red icon...
    > an
    > html has a "IE" blue icon... well... that is what I mean
    that does not
    > appear... please, help..
    >
    Method 1:
    Open IE, select Tools menu then Internet Options.
    Now select the Programs tab.
    At the bottom of the Programs tab you'll see a checkbox
    labelled 'IE should
    check to see whether it is the default browser'.
    Ensure that box is checked.
    You may need to then restart IE to restore it as your PC's
    default browser.
    Method 2:
    You can also go to Control Panel and open Folder Options.
    Select the 'File Types' tab.
    In the list of 'Registered file types' you should find both
    HTM and HTML
    filetypes associated with IE.
    If not (and you've already tried Method 1) then select HTML
    in the list,
    then click the Change button.
    In the next window that appears you should be able to find IE
    listed and
    select it, also check the box 'Alwyas use the selected
    program to open this
    kind of file'
    Repeat this process for HTM files too if necessary.
    Martin.

  • We want display image by using plsql but image is not display properly

    DECLARE
    p_dir varchar2(100):='/prd/rcms/test/bala_test/';
    p_file varchar2(100):= 'sam.png';
    dest_dir varchar2(100):='/prd/rcms/test/bala_test/';
    dest_file varchar2(100):='test_image.html';
    dest_handle UTL_FILE.file_type;
    p_clob CLOB;
    l_bfile BFILE;
    l_step PLS_INTEGER := 2074;
    v_string varchar2(4000):='';
    BEGIN
    dbms_output.put_line('Encoding starts');
    l_bfile := BFILENAME('BFILE_DIR', p_file);
    dbms_output.put_line('File is going to open');
    DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly);
    FOR i IN 0 .. TRUNC((DBMS_LOB.getlength(l_bfile) - 1 )/l_step) LOOP
    dbms_output.put_line('Inside encodeing');
    p_clob := UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(DBMS_LOB.substr(l_bfile, l_step, i * l_step + 1)));
    p_clob := p_clob||v_string;
    dbms_output.put_line(p_clob||'<------------- '||i);
    END LOOP;
    dbms_output.put_line('Base64 encoded');
    p_clob:= '<img src="data:image.png;base64,'||p_clob||'" width="32" height="32">;
    dest_handle := UTL_FILE.fopen(p_dir, dest_file, 'w', 32767);
    UTL_FILE.put(dest_handle, p_clob);
    dbms_output.put_line(p_clob);
    DBMS_LOB.fileclose(l_bfile);
    dbms_output.put_line('Encoding ends successfully');
    exception
    when others then
    dbms_output.put_line('Error : '||SQLERRM);
    end;
    /

    972021 wrote:
    DECLARE
    p_dir varchar2(100):='/prd/rcms/test/bala_test/';
    p_file varchar2(100):= 'sam.png';
    dest_dir varchar2(100):='/prd/rcms/test/bala_test/';
    dest_file varchar2(100):='test_image.html';
    dest_handle UTL_FILE.file_type;
    p_clob CLOB;
    l_bfile BFILE;
    l_step PLS_INTEGER := 2074;
    v_string varchar2(4000):='';
    BEGIN
    dbms_output.put_line('Encoding starts');
    l_bfile := BFILENAME('BFILE_DIR', p_file);
    dbms_output.put_line('File is going to open');
    DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly);
    FOR i IN 0 .. TRUNC((DBMS_LOB.getlength(l_bfile) - 1 )/l_step) LOOP
    dbms_output.put_line('Inside encodeing');
    p_clob := UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(DBMS_LOB.substr(l_bfile, l_step, i * l_step + 1)));
    p_clob := p_clob||v_string;
    dbms_output.put_line(p_clob||'<------------- '||i);
    END LOOP;
    dbms_output.put_line('Base64 encoded');
    p_clob:= '<img src="data:image.png;base64,'||p_clob||'" width="32" height="32">;
    dest_handle := UTL_FILE.fopen(p_dir, dest_file, 'w', 32767);
    UTL_FILE.put(dest_handle, p_clob);
    dbms_output.put_line(p_clob);
    DBMS_LOB.fileclose(l_bfile);
    dbms_output.put_line('Encoding ends successfully');
    exception
    when others then
    dbms_output.put_line('Error : '||SQLERRM);
    end;
    /You are trying to output a clob using UTL_FILE.PUT which takes a varchar2 parameter, and thus has a limit of 32767 bytes. That could be problematic unless you know you are outputting less than 32K, in which case you should just store your data in a varchar2 in the first place.
    You could use multiple UTL_FILE.PUT statements in a loop outputting up to 32767 bytes at a time, though you have to flush the UTL_FILE buffer to ensure you don't exceed 32K before flushing.
    Alternatively, you can output CLOB data using some other techniques such as...
    DBMS_XSLPROCESSOR.clob2file(
      cl => p_clob
    , flocation => p_dir
    , fname => dest_file
    );However, it's not even clear if that is causing you a problem, as we don't have your data
    And for gawds sake, get rid of the stupid exception handler:
    exception
    when others then
    dbms_output.put_line('Error : '||SQLERRM);

  • Images uploaded in Shared Components not displaying

    We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error.
    The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do not show on screen. An entry is available in the report on the Images page but the image itself is blank. The URL of the image is shown as : "+http://hostname:port/apex/wwv_flow_file_mgr.get_file?p_security_group_id=100000&p_flow_id=100&p_fname=Sampleimage.jpg+". The image is available in the wwv_flow_file_objects$ table and can be viewed through the BLOB_CONTENT column. But it is not visible in the front end.
    Is there a solution to this issue?
    Thanks,
    Aniket

    AniketP wrote:
    We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error.
    The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do not show on screen. An entry is available in the report on the Images page but the image itself is blank. The URL of the image is shown as : "+http://hostname:port/apex/wwv_flow_file_mgr.get_file?p_security_group_id=100000&p_flow_id=100&p_fname=Sampleimage.jpg+". The image is available in the wwv_flow_file_objects$ table and can be viewed through the BLOB_CONTENT column. But it is not visible in the front end.Is the image associated with an application (No Application Associated)? If not then consider using the #APP_IMAGES# substitution istring nstead of #WORKSPACE_IMAGES#

Maybe you are looking for