This content has been marked as final. Show 27 replies
brian.mcginity wrote:I've noticed this as well, and I've commented out this line as well. The package seems to work fine without it.
I am also working with pl_fpdf. If anyone else is testing this, one word of caution.
There is a function p_dochecks which does:
execute immediate 'alter session set NLS_NUMERIC_CHARACTERS = '',.'''
In a web environment with pooling, this caused other sessions to randomly throw Character to Numeric conversion errors. The solution is to comment this line.
You can go to the Issues page, create a new issue, and add your code as an attachment to the issue:
Then I will try to merge the fixes from different contributors together.
I've uploaded my version of the Package. It's attached to "Issue 1".
I've uploaded my changes: http://code.google.com/p/plsql-utils/issues/detail?id=2
I am also usig PL_FPDF with some problems...
one is (or was?) multiple links on one page.
I saw you solved it! Can you give me a download of the solution, please?
Anonther problem I encounter is when texts become larger than 2000 char.
(and they sometimes do)
MultiCell uses a variable of type "txt" which is varchar2(2000)
How to proceed if the text in the (multi)cell is longer?
Do you have any suggestions?
Henk Op den Brouw
(but I am already happy with the download :)
I just started looking at multiCell and ran into the same error due to txt being only 2000. I just changed it to: txt varchar2(32000) and this fixed the problem for me, see if this works.
I need to create a table of multiCells and will see if I can get a variation of this working: http://www.fpdf.org/en/script/script3.php
Morten is keeping a copy of the coloration of the updates, go to his site to get a copy:
Look at PDFGEN_PKG in the "extras" folder.
Edited by: brian.mcginity on Aug 11, 2011 11:05 PM
I’ve done a bit more work on the pdf functions. I converted the NbLines function so that multicell tables will page break correctly. Also I’ve created custom th and td functions with style capabilities.
Also I needed the pdf retuned as a blob, so I overloaded the Output function. I’ve uploaded the changes in the Issue section: http://code.google.com/p/plsql-utils/issues/detail?id=5
Found another bug in the fpdf library. The Cell function cannot display “(“ or “)“ characters. Here’s how to fix:
In the Cell procedure, comment out these lines:
Add this line under the above line:
--myTXT2 := str_replace('\\','\\\\',ptxt); --myS := myS || 'BT '||tochar((x+myDX)*myK,2)||' '||tochar((h-(y+.5*ph+.3*fontsize))*myK,2)||' Td ('||myTXT2||') Tj ET';
myS := myS || 'BT '||tochar((x+myDX)*myK,2)||' '||tochar((h-(y+.5*ph+.3*fontsize))*myK,2)||' Td ('||p_escape(ptxt)||') Tj ET';
I know that probably no one is following this thread anymore, but I've been trying to find a way to just pass a PNG blob to the current page. There is AS_MINI package that does great work of adding (PNG,IMG,JPG) and nice way of saving things but lacks some features I'm already using.
I've seen the alexandria project by Morten, which is awesome, and I was wondering if any had thought to merge the image functionality into the PL_FPDF. My lack of programming experience has brought me to a stand still.
Where can one make this merge request?
I've seen the alexandria project by Morten, which is awesome, and I was wondering if any had thought to merge the image functionality into the PL_FPDF. My lack of programming experience has brought me to a stand still.Hi Jan,
Where can one make this merge request?
you can add your request to the issue list here:
And by the way, which features of PL_FPDF are you using that are not in the AS_MINI package (included as PDF_BUILDER_PKG in the Alexandria Library) ? It might be as easy to port features the other way, depending on what you need.
Actually I'm using quite a few features, such as:
- Auto page break --> Just makes life easier then having to calculate the y position
- Header, footer --> Most people require this and would be awesome to have it with an image
- Page number --> I don't rememebr the last time I read a document without a page numbers
- Title , Subject, Author
- Set X, Set Y --> Realy nice when you are dealing with complex layouts
- Table/Grids --> Far far simpler in pdfgen espcially when you have multiple tables (no fussing around with rectangles etc
I would like to emphasize that I also followed your tutorial, and I truely find that dealing with a table/grid from "select" is far far simpler in the pl_pdf. Especially when you have more then one table in your form. Page positioning is also simpler I find.
I will certainly add the enhancements to the alexandria project. I do not know how to use the jsAutoPrint but that woudl be nice to know.
I’ve been slowly changing FPDF to suit my application. At Jan’s request, I just got image processing working for Oracle XE by merging Anton Scheffer’s AS_PDF image functions along with a few fixes.
The code is available here: http://databaseknowledge.com/services.htm The package is called WPDF (most of my libraries start with W)
List of fixes and enhancements:
- Each page is stored as a clob for unlimited page sizes
- Ability to retrieve the pdf as a blob for storage or email attachment
- Multi-cell functionality with intelligent page breaking
- TH/TD functions for creating tables
- TH/TD Styles for align:left; align:right ;align:center; font-family, font-size, colspan, line-height
- Standardized page header
- .jpg and .png image processing compatible with Oracle XE
- Images can be passed in as blob, base64 clobs or varchar2
I’ve been using the code in production for more than a year and it’s been reliable. There is still a document size limitation (I’ve yet to reach it) because the pdf’s table of contents structure is stored as a varchar2 32k. I'm guessing somehwere in the 1000s of pages. Also not all images are compatible. I have no idea why a browser can accept and display all sorts of images where as Adobe’s PDF accepts only two: .jpg and raw. So most images need to undergo a transformation to be converted to raw. Presently, WPDF can handle .jpg and basic .png images.
Hope this helps...
I've been changing as_pdf too, see http://technology.amis.nl/?p=17718
Now also support for gif-images, but also ttf-fonts and other character sets and much more.
I’ve added a few more functions and capabilities to WPdf and fixed a few more problems with varchar2(32000) limitations. Also I added a version number to keep track of the changes.
The code is here: http://www.databaseknowledge.com/services.htm and the current version is 1.4.2a
Also I found a security issue. The way the custom headers and footers are generated is by passing the name of the procedure you wish to execute. The code will then execute this functoin with each new page. A hacker with a hefty amount of skill might be able to construct a url which could execute any procedure in scope.
I’ve adjusted code in v1.4.2.a which will prevent access to SetHeaderProc() and SetFooterProc() from the url.
Even still, in production environments, anyone using WPdf, PL_FPDF or any variant of the code should not make this code accessible directly from the url.
To do this make sure you implement: PlsqlRequestValidationFunction or or add more rules to PlsqlExclusionList, or use the AUTHORIZE function (Custom OWA is nice).
For further instruction of how to do this read: http://docs.oracle.com/cd/E15523_01/portal.1111/e12041/secure.htm
Edited by: brian.mcginity on Jun 4, 2012 8:28 AM