Comments on: AS_PDF, generating a PDF-document with some plsql https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/ Friends of Oracle and Java Tue, 24 Mar 2015 17:42:36 +0000 hourly 1 http://wordpress.org/?v=4.1.1 By: Prasanna https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-7648 Mon, 05 May 2014 11:33:59 +0000 http://technology.amis.nl/blog/?p=8650#comment-7648 Im also having the same problem, did you get the solution?
Thanks

]]>
By: amy.chan https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-7506 Tue, 24 Dec 2013 16:09:48 +0000 http://technology.amis.nl/blog/?p=8650#comment-7506 Hi Anton,
I like the AS_PDF3 script.
I am trying to use the procedure SET_BK_COLOR to change the background color on some lines in my PDF document, but couldn’t get any result showed up. Could you offer any advice?

Thank you in advance.

Amy

]]>
By: Anton Scheffer https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-7453 Thu, 31 Oct 2013 15:21:10 +0000 http://technology.amis.nl/blog/?p=8650#comment-7453 Use new_page;

]]>
By: Zakaria https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-7452 Thu, 31 Oct 2013 15:16:44 +0000 http://technology.amis.nl/blog/?p=8650#comment-7452 Hi Anton,

Thank you for sharing your script.
It is working like a charm.

I have just one question:
How can we add a page break while writing into the pdf file ?

Thank you in advance & best regards,
Zakaria

]]>
By: kadi https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-7400 Mon, 09 Sep 2013 21:13:52 +0000 http://technology.amis.nl/blog/?p=8650#comment-7400 I am trying to create pdf using this and I am not able to do it. It says invalid directory path. Can any one help me out in this.
Thanks

]]>
By: Anton Scheffer https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6366 Wed, 01 Feb 2012 20:47:51 +0000 http://technology.amis.nl/blog/?p=8650#comment-6366 @Franco
As I said, “Not complete backward compatible”. I had no need for that procedure, so I didn’t included it.
But I think you can add the old show_pdf procedure yourself.

]]>
By: Franco G. https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6365 Wed, 01 Feb 2012 10:57:24 +0000 http://technology.amis.nl/blog/?p=8650#comment-6365 Anton

thank you very much for your quick reply and for having confirmed that the solution could be fine.
I download the new version of as_pdf but i didn’t see the show_pdf function. Why?
Franco

]]>
By: Anton Scheffer https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6364 Sat, 28 Jan 2012 19:33:14 +0000 http://technology.amis.nl/blog/?p=8650#comment-6364 @Franco G.
Nothing wrong with your version. It does not do exactly the same as my version, but if it works for you, use it!

]]>
By: Franco G. https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6363 Sat, 28 Jan 2012 13:29:17 +0000 http://technology.amis.nl/blog/?p=8650#comment-6363 Hi Anton
First of all tank you very much for your usefull work.
I had a problem with some browser that not recongnized the pdf file.
I solved the problem with a little modification to a “show”  procedure and i’d like to know your opinion about it.
—- original “show” function
procedure show_pdf
is
begin
finish_pdf;
owa_util.mime_header( ‘application/pdf’, false );
htp.print( ‘Content-Length: ‘ || dbms_lob.getlength( pdf_doc ) );
htp.print( ‘Content-disposition: inline’ );
htp.print( ‘Content-Description: Generated by as_xslfo2pdf’ );
owa_util.http_header_close;
wpg_docload.download_file( pdf_doc );
dbms_lob.freetemporary( pdf_doc );
end;
—— modified “show” function
procedure show_pdf (p_name in varchar2)
is
begin
finish_pdf;
owa_util.mime_header( ‘application/pdf’, false );
htp.print( ‘Content-Length: ‘ || dbms_lob.getlength( pdf_doc ) );
— modified and added line
htp.print( ‘Content-disposition: attachment; filename=”‘||p_name||'”‘ );
htp.print( ‘Content-type: application/pdf’ );
—-
htp.print( ‘Content-Description: Generated by as_xslfo2pdf’ );
owa_util.http_header_close;
wpg_docload.download_file( pdf_doc );
dbms_lob.freetemporary( pdf_doc );
end;
 

]]>
By: Anton Scheffer https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6362 Tue, 17 Jan 2012 21:41:32 +0000 http://technology.amis.nl/blog/?p=8650#comment-6362 @Mike
Not that I know of

]]>
By: Mike https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6361 Tue, 17 Jan 2012 17:42:59 +0000 http://technology.amis.nl/blog/?p=8650#comment-6361 Hi Anton,
Just came across the as_pdf  package.  Thanks very much for sharing.
Is there possibly a simply was to convert an html page to a PDF without re coding and formatting each line?
Mike
 

]]>
By: Anton Scheffer https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6360 Wed, 11 Jan 2012 21:21:51 +0000 http://technology.amis.nl/blog/?p=8650#comment-6360 @Mohammed Haris
No, I haven’t any examples for that version available.

]]>
By: Mohammed Haris https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6359 Wed, 11 Jan 2012 13:03:28 +0000 http://technology.amis.nl/blog/?p=8650#comment-6359 Anton,
Do you have any code for prototyping this new version, like you had in your previous one ?
 

]]>
By: Anton Scheffer https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6358 Wed, 11 Jan 2012 08:09:10 +0000 http://technology.amis.nl/blog/?p=8650#comment-6358 The write procedure isn’t meant for outputting text outside the page margins. You have to use put_txt for that.

]]>
By: Tom https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/#comment-6357 Wed, 11 Jan 2012 02:32:46 +0000 http://technology.amis.nl/blog/?p=8650#comment-6357 Anton,
Thank you this has resolved this problem.  Unfortunately now I am looking at one that makes no sense to me. Instead of the following lines ending up generating 1 line in the PDF they generate multiple lines on different pages.  The intent is that I output the header and footer on each page and then start outputting the body.  Any ideas on what is causing this?
— this is the page header
as_pdf2a.write(‘Output by XYZ’,p_y=>500, p_x=>350); –, p_alignment=> ‘center’);
— This is the page footer
as_pdf2a.write(‘Date: ‘||TO_CHAR(pi_as_of,’dd-MON-rr HH:MI AM’),p_y=>40, p_x=>30, p_alignment=> ‘left’);
as_pdf2a.set_font(p_family=> ‘TIMES’, p_style=> ‘N’, p_fontsize_pt=> 18);
as_pdf2a.write(‘Output by XYZ’,p_y=>40, p_x=>350, p_alignment=> ‘center’);
as_pdf2a.set_font(p_family=> ‘TIMES’, p_style=> ‘N’, p_fontsize_pt=> 10);
as_pdf2a.write(‘Page: ‘||pi_page_nbr,p_y=>40, p_x=>740, p_alignment=> ‘right’);

]]>