Giter Site home page Giter Site logo

gen_pdf's Introduction

GEN_PDF

Demo

A demo application is available on apex.oracle.com
https://apex.oracle.com/pls/apex/f?p=89938

Changelog

V 1.0.

  • Release date : 14/10/2015

About

GEN_PDF is PL/SQL based generator for PDF.

GEN_PDF is mix of WPDF(1.4.8b) and AS_PDF3.

Why ?

  • WPDF is great for setting position of custom tables, colors, borders ...
  • AS_PDF3 is great for importing fonts into PDF

GEN_PDF is set to work on apex. Fonts and images are stored in WWV_FLOW_FILES or CUSTOM table, so there is no need to use UTL.FILE package (like in AS_PDF3) and there is also no need for "ordsys.ordImage" (like in PL_FPDF which don't work on XE db).

You can find more info inside "GEN_PDF.pks"

How to use it

Inside package are few samples which demonstrate almost all functionality of GEN_PDF tool.

List of samples inside package :

  • procedure emp_demo
  • procedure fonts_demo
  • procedure barcode_demo
  • procedure rotate_demo
  • procedure images_demo
  • procedure testHeader
  • procedure chart_demo

Run sample:

Add apex Non-Modal dialog page and before header in process add PL/SQL code

BEGIN
  gen_pdf.emp_demo();
  apex_application.stop_apex_engine;
END;

Needed Rights

For last sample "chart_demo" to work you need :

  1. Grant on UTL_HTTP
  GRANT EXECUTE ON UTL_HTTP TO <USER>;
  1. ACL permissions to get Google chart and QR code
     BEGIN
        DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
            acl          => 'chart.xml',
            description  => 'Permissions to get chart image',
            principal    => 'APEX_050000', -- APEX_SCHEMA depands on APEX version
            is_grant     => TRUE,
            privilege    => 'connect');
        COMMIT;
     END;
     /
     BEGIN
        DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
            acl          => 'chart.xml',
            host         => 'chart.googleapis.com');
        COMMIT;
        END;
     /
     BEGIN
        DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
            acl          => 'chart.xml',
            host         => 'zxing.org');
        COMMIT;
     END;
     /

In case you need to save file on server you can enable procedure "save_pdf".

If you need reed file from server "font or pdf" than enable function "file2blob".

For this to work you need grant on UTL_FILE.

  GRANT EXECUTE ON UTL_FILE TO <USER>;

About me

Andrej Grlica
Iโ€™m a oracle apex developer since 2008.
Work email : [email protected]
Private email : [email protected]
Twitter : @AndrejGrlica
Linked-in : Link
Slack (#orclapex) PM:@grlicaa

gen_pdf's People

Contributors

grlicaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.