This content has been marked as final. Show 13 replies
You can accomplish this using rtf files and APEX or using BI Publisher and APEX.. What is your preference?
There is an existing example from a while back that used substitution variables and an RTF file stored in a table to accomplish this.. Or ou could take you Word doc and using BI Publisher create a template to use in APEX..
Is there available OBE, demo, tutorial for this task?Nope. This is something I developed on my own -- not a 'Code by Google' special. It wasn't a cakewalk to build, but not extraordinarily difficult either. PDFTK uses FDF files to fill forms. FDF files are text-based, and so can be manipulated by PL/SQL. They contain the field name (i.e. 'FIRST_NAME'), and the value to be placed into that field. I create an FDF 'template' with the fields filled in with formatted replacement text (i.e. '#FIRST_NAME#'). This, along with the unfilled PDF form are saved to a directory accessible to Oracle. The actual 'code' process performs the following steps:
1. My PDF 'printing' package will load the template FDF into a VARCHAR2 variable.
2. It replaces all of the form-field variables (i.e. REPLACE '#FIRST_NAME#' with 'Matthew')
3. The result is saved to a 'Filled' FDF file in the same directory.
4. I call PDFTK via a host call to combine the blank PDF with the filled FDF into a 'filled' PDF.
5. I then mail the filled PDF to the person calling the package.
All of the files use a naming convention to make the process generic based on a parameter passed to the package with the report name.
Here is the link to the application.. Be aware it is from the HTML-DB version of APEX and you MIGHT want to spruce it up... Along wit the fact there is a limit of so many characters with RTF..
Is the download site and file still available? I got error "500 - Internal Server Error" when I download it :(
Is the link given by Tony same process you have done? or which of the two is easier and better? effective & efficient ? :)
Can you try it here please....
Thanks a lot,
Wow, talk about a trip down memory lane. I created the solution that Tony referenced back when I was working at Oracle round 2003-4 or so. I would not recommend using it today, even if the link did work, as it was based on a specific version of WordPad that was only available with Windows XP.
One low-cost alternative to have a look at is PL/PDF. You can upload any form as a template, and then use PL/PDF to fill in the blanks, so to speak. It takes a little getting used to it, but once you understand how it works, it can be quite a powerful tool. Have a look here: http://www.plpdf.com
- Scott -
Is the link given by Tony same process you have done?Nope. Completely different animals.
...or which of the two is easier and better? effective & efficient ?Of the options listed in this thread, PL/PDF is probably easiest and most flexible. The only thing my method has to offer is that is it completely free since PDFTK is freeware. Since you have to write the interface on your own to use it, making use of PDFTK will be harder to implement. Filling in PDF forms is very much a minor (albeit handy) feature of my apps. It automates some functionality that used to be performed manually by our billing team. I wasn't sure when I started that I would be able to get PDFTK to do what I wanted... but I like challenges. :)