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’);
By: Tom
By: Anton Scheffer
The write procedure isn’t meant for outputting text outside the page margins. You have to use put_txt for that.
By: Mohammed Haris
Anton,
Do you have any code for prototyping this new version, like you had in your previous one ?
Â
By: Anton Scheffer
@Mohammed Haris
No, I haven’t any examples for that version available.
By: Mike
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
@Mike
Not that I know of
By: Franco G.
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
@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.
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
@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: Anton Scheffer
I would say, upgrade to version 2a, http://technology.amis.nl/blog/wp-content/images/as_pdf2a.txt
Not complete backward compatible, but much better
By: kadi
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: Zakaria
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: Anton Scheffer
Use new_page;
By: amy.chan
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: Prasanna
Im also having the same problem, did you get the solution?
Thanks