Home » PLSQL » Create PDF Files with PLSQL in Oracle

Create PDF Files with PLSQL in Oracle

There is very good package available on Google code to create pdf files with plsql in Oracle, but some time people get confused because there are to too much links and example are there. That's why I am simply providing the code content to create pdf files with plsql. 

Click here to download Pdf_Builder_Pkg.Sql

Install this sql script to your schema and create the directory object that schema with the name MY_DIR, see the example below:
Create or Replace directory MY_DIR as 'D:AnyDirPath';
The below link I am providing for examples to how to use Pdf_Builder_Pkg for creating pdf files. The file contains plsql examples.

Click here to download Pdf_Builder_Pkg_Demo.Sql

4 thoughts on “Create PDF Files with PLSQL in Oracle”

  1. mr. Kapoor
    Congratulations for a beautiful job.
    I'd like to know if package has some mecanism to controle new pages add . I'm having problems with pdf_builder_pkg when my reports diaplay many data of many queries.

    1. There is a procedure in this package new_page, which you can use to add a new page.

      You can check for the full example in the demo.sql I shared above. Below is a small example:

      loop
            if t_y <= pdf_builder_pkg.get_settings().margin_bottom + t_padding / 2
            then
              if t_y != -12345
              then
                pdf_builder_pkg.new_page;
              end if;
      

      The above if condition determining the page end using the margins and then adding a new page.

      Actually, all these third party PL/SQL libraries are not that easy to use. You can even find more new libraries on GitHub and you may find some easy to code.

Comments are closed.