APEXtras

a development team dedicated to Oracle APEX

Load a PL/PDF embedded TrueType font by name

leave a comment »

CREATE OR REPLACE PROCEDURE LoadFont(p_fontname IN VARCHAR2,
                                     p_alias    IN VARCHAR2) IS
    l_ttf Plpdf_Type.t_addfont;
    l_id  NUMBER;
  BEGIN
    BEGIN
      SELECT ID INTO l_id
      FROM PLPDF.plpdf_ttf_add ttfa
      WHERE (ttfa.ADD_NAME = p_fontname);
      l_ttf := Plpdf_Ttf.GetTTF(l_id);
      Plpdf.addTTF(p_alias, NULL, l_ttf);
    EXCEPTION
      WHEN OTHERS THEN
        NULL;
        -- Call your error reporting procedure
    END;
  END;
/
Advertisements

Written by Roger

28 April, 2009 at 12:21 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: