Send printer friendly page per mail

Hello everybody.
I'm very new with APEX and I couldn't find an answer to solve my problem:
I have a printer friendly page with several text elements and a report so that it nearly looks like a letter in the end.
Now I want to send this page as a "pdf-attachment" per mail when pressing a button.
I already noticed the "add_attachment"-procedure in the APEX_MAIL package, but how do i get my actual printer friendly page stored in a BLOB-column in my DB to use this procedure?
Thanks in advance
Carsten

Carsten,
There are several different version of the get_print_document function, e.g there's this one:
APEX_UTIL.GET_PRINT_DOCUMENT (
p_report_data IN CLOB,
p_report_layout IN CLOB,
p_report_layout_type IN VARCHAR2 default 'xsl-fo',
p_document_format IN VARCHAR2 default 'pdf',
p_print_server IN VARCHAR2 default NULL
) RETURN BLOB;
So you could store both the XML and XSL in a CLOB. But it might be easier to get started referencing actual report queries and report layouts, which you store under shared components and then use this API:
APEX_UTIL.GET_PRINT_DOCUMENT (
p_application_id IN NUMBER,
p_report_layout_name IN VARCHAR2,
p_report_query_name IN VARCHAR2,
p_report_layout_name IN VARCHAR2 default null,
p_report_layout_type IN VARCHAR2 default 'xsl-fo',
p_document_format IN VARCHAR2 default 'pdf',
p_print_server IN VARCHAR2 default null
) RETURN BLOB;
Using pre-defined report queries and layouts ensures that you don't run into issues with your custom XML and XSL data.
The error message "500 Internal Server Error" is a standard Java error message that doesn't tell you anything. Maybe you could find more info in one of your log files. Are you using BI Publisher? Apache FOP? Or some other rendering engine?
Regards,
Marc

Similar Messages

  • How Can I Print 2 Pages per Sheet with Bookmarks in Word 2007?

    Is there any workaround to print 2 pages per sheet (in MS Word) with bookmarks?
    I always get the following message:
    Acrobat PDFMaker has detected that 'Multiple Pages option in Page Setup' has been selected. It will not be able to create tags, links, bookmarks with this option selected...
    --Roborabbit

    The Word 2007 pdf export (the one MS has here: http://www.microsoft.com/downloads/details.aspx?FamilyID=f1fc413c-6d89-4f15-991b-63b07ba5f 2e5&displaylang=en) supports bookmarks right?

  • Printing multiple pages per sheet on Adobe Reader for Windows 8

    I cannot print multiple pages per sheet on Adobe Reader touch for windows 8.1

    What is your Reader version?  In Reader XI 11.0.07 you would click on Multiple, then specify 4 (or 2) pages per sheet:

  • Change Report Font Size for Printer Friendly Page

    I have a report using a template of 'Reports Region' and I have a link to a printer friendly page. Because the report text is so big I would like to make it smaller. I have already reduced the width of the report region but that has made 2 page reports run into 4 pages. I tried adding tags to the page to modify it but I was only able to make the text at the top of the page smaller and not the report. I tried modifying the theme_V3.css file but I could not find a place to modify text/font size in the report (This was trial and error as I am unfamiliar with css).
    I would like to only have it smaller on the printer friendly page but if I will be forced to change it all the time I would like to know if there is at least an option.
    If the only way to make this happen is to build a custom report then so be it. (But again the printer friendly page only pulls in the current page and I want it to only be small on the printer page)
    I am on V2.2.
    Thanks

    You need to use a print media stylesheet. You'll need to find class(es) or other CSS selector(s) to attach the font size rule(s) to - look at the HTML source for your page.

  • Wont print from printer friendly page

    i'm having trouble printing my printer friendly confermations from the state and goverment web sites. no problem just plain printing   when go to printer friendly page it want print

    Hi @ponzi ,
    I see by your post that you are having issues printing from a web page. I can help you, but I will need some more information.
    In the mean time, try another web browser to see if you have the same results.
    What web browser are you using?
    What is the full name and product number of your printer? There are several Laserjet 200 series. How Do I Find My Model Number or Product Number?
    What operating system are you using?
    How to Find the Windows Edition and Version on Your Computer.
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    How is the printer connected? (USB/Ethernet/Wireless)
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • PDFs are always printed 2 pages per sheet

    My system was reformatted recently and everything had to be reinstalled.
    Acrobat Reader XI (11.0.2) and Acrobat Pro 9 (9.0.0*) are now having problems when printing PDFs: every PDF is always printed at 2 pages per sheet. The resulting 4-point type printouts are not useable.
    Word prints 1 page per sheet.
    I'm not exactly sure where to even start troubleshooting this. Any suggestions would be welcome.
    Thanks in advance!
    *Yes, 9.0.0. When I accepted the last automatic update, Acrobat Pro started crashing on startup. I uninstalled and reinstalled, and am very, very wary about accepting an update right now.

    Well, that was interesting.
    After running the Acrobat Cleaner from the above link, on both Acrobat Pro 9.0 and Reader 11.0.2, it looked like everything was gone.
    However, the company uses CA's IT Client Manager, and its DSM Software Delivery Catalog thinks that Acrobat Pro is still installed. So does Add/Remove Programs.
    Six system reboots and A long call with the help desk later, my case has been escalated to the CA team and we'll see what happens now.
    Reader 11.0.2 is reinstalled, and now? It can't print AT ALL. I get this instead of a printout:
    ERROR: undefined
    OFFENDING COMMAND: Pscript_WinNT_Compat
    STACK:

  • Preview : error while printing several pages per sheet

    I have a pdf file from which I would like to get a pdf with several pages per sheet. I cannot do that using acrobat through printing into a pdf file because it tells me to save it first ! So, as I did before upgrading my OS from SL to Lion, I tried to do it with Preview. The problem is that I get the following message "Error while printing" and no more information.
    - I tried with an other pdf file and I got the same problem.
    - Printing one page per sheet is OK, either into a pdf file or to an actual printer.
    - Printing several pages per sheet from Acrobat to a printer is working fine.
    - I asked to a colleague who is still using SL to do the same procedure with my file and it worked fine.
    My conclusion is that there is something fishy with Preview under Lion.
    Does anyone get into the same trouble than me ? Is there a solution even an alternative one ?

    In the printing configuration window, I selected Layout and then 2 pages per sheet, save in Pdf, select a directory and name then save. At the end of the process, I got the printing error message. Looking at the /var/log/system.log, I got an error message concerning PMSessionEndDocumentNoDialog() returning 1282.
    I am using past because I do not have the problem anymore. My MBP is a bit funny since the Lion upgrade. It looks like windows : from time to time, I get the black screen telling me that I should press the switch on button (like the famous blue screen).
    I am suspecting that XQuartz (last update) is messing-up somehow my laptop (system crashes happened when it was launched or even when it was starting).
    Thanks anyway.

  • Printing many pages per sheets

    Hi!
    I have some kind of report to print. I want to be able to print up to 6 on a single page. I always have the same infos to print.
    They are as this:
    P.O. #: 000-001
    By: Employee 001
    Date: 01-01-2004
    Product: 102103
    Title: THIS PRODUCT NAME
    UPC: 1234567890000
    For: M. Bobby
    Tel: 514-765-4321
    Email: [email protected]
    I don't want to spoil a whole sheet for each order. What I'd like to do with it would be something like this:
    | | |
    | order 1 | order 2 |
    |_____________|______________|
    | | |
    | order 3 | order 4 |
    |_____________|______________|
    | | |
    | order 5 | order 6 |
    |_____________|______________|
    Is there a way I could do this? I searched the whole forum and the best thing I though of would be to convert them into Graphics and print them this way.
    Any better way?
    P.S. I'd also need to be able to print only 3 if there are only that much.
    | | |
    | order 1 | order 2 |
    |_____________|______________|
    | | |
    | order 3 | |
    |_____________| |
    | |
    | |
    |____________________________|
    Thank you!
    Carl
    (sorry for the formatting... the spaces won't show up... But I guess you understand anyways...)

    do you want to print 6 pages per page, or just combine 6 results/orders on the same page? if you want to combine 6 orders, than maybe you could use some array of strings, and "format" those strings before printing them out. for example, if you have only 3 orders, you would have something like
    s[0] = "-----------------------";
    s[1] = "| order 1 | order 2 |";
    s[2] = "-----------------------";
    s[3] = "| order 3 |";
    but if you had 6 orders, they would look like:
    s[0] = "-----------------------";
    s[1] = "| order 1 | order 2 |";
    s[2] = "-----------------------";
    s[3] = "| order 3 | order 4 |";
    etc.
    i'm not sure i understood what you're trying to do though, so this might be complete BS.

  • How to do a "printer friendly page"?

    Hello,
    I have searched a lot but I didn�t find a tutorial
    that work.
    I am using ASP Vbscript.
    Any help will be very appreciated.
    Thanks

    You seem to have misunderstood the use of the print.css
    This is used on the same page as the normal css script, but
    is only seen by
    the printer.
    Read the link Murray has so kindly provided.
    http://www.alistapart.com/articles/goingtoprint/
    Henk
    "Gilson Roda" <[email protected]> wrote in message
    news:e52ivk$qik$[email protected]..
    > Thank you for prompt reply.
    > I have copied all css into print.css
    > But I didn�t follow how to do a link to other
    "printer friendly page".
    > Actualy, I have an ASP page with several dynamic data
    (with recordset
    > paging). What I want to do is a "print" link to another
    ASP page, in order
    > to print all content of my database without paging
    stuff.
    > Am I clear? Sorry my english is terrible.
    > Thanks in advance.
    >
    > "Murray *ACE*" <[email protected]>
    escreveu na mensagem
    > news:e52g93$n8s$[email protected]..
    >>
    http://www.alistapart.com/articles/goingtoprint/
    >>
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "CETEMA" <[email protected]> wrote in message
    >> news:e52ftk$mtg$[email protected]..
    >>> Hello,
    >>> I have searched a lot but I didn�t find a
    tutorial that work.
    >>> I am using ASP Vbscript.
    >>> Any help will be very appreciated.
    >>> Thanks
    >>>
    >>>
    >>
    >>
    >
    >

  • Can't print multiple pages per sheet

    Hi there - I'm a real newbie to this whole adobe reader thing and I need help!! I've been trying to print multiple pages per sheet and I just can't. I know where I can change the presets but when I'm in the print dialog presets I can't click on anything. It won't allow me. What's wrong?
    I'm using adobe reader 8.1.3 and the document i'm trying to print is a powerpoint document converted into a pdf. Is this why I can't change the settings? Or do I need the adobe reader 9 standard? i'm just so confused!
    thanks in advance!!

    Yes, it used to work, and the resize zoom bar used to work too (now its grayed out). I don't know if this is a "who's to blame for it" thing, but its not getting fixed and its pretty bad that no one seems to care enough even to respond. I found my own solution by opening it in Gimp. Just right click and select open with other ...Gimp and it will import into it. In the Gimp Print dialog, you have a scaling percentage in the "Page Setup" tab, and size settings in the "Image settings" plus loads of other stuff including multiple copies.

  • Printing 2 pages per sheet reduces size too much

    Hi,
    I'm printing a document using Reader 8.1.0.
    I print 2 pages per sheet, side-by-side. A4 documents should be reduced to A5, that is reduction to 71%.
    But the final result is reduced by more than that: 64%.
    I tried on 2 different printers with the same result.
    Is there a way to get 2 A5 pages? Is this linked anyway to the printers or to an option in Reader?
    Thanks
    Oscar

    Hi donmellado
    Welcome to the forum.
    Just go:
    +Menu > File > Print > Layout > Pages per sheet: 2+
    Don't rotate the sheet or specify a reduction size, this is not necessary, the Mac will work it all out for you.
    Peter

  • Printing two pages per sheet with equal margins

    My first post here.  I did a search but didn't see an answer to my question.
    How can I get equal margins when printing two pages per sheet?
    I print aviation approach plates 2 pages per sheet and fold the sheet of paper in half and carry with me in a knee board.  I had no problem doing this until last week after my hard drive was changed. The steps I normally take are:
    click file
    print
    print range: all
    copies: 1
    page scaling: multiple pages per sheet
    pages per sheet: 2
    page order: horizontal (for the first pass through the printer and horizontal reversed for the second pass)
    print to file: box checked
    the preview now shows a winder margin on the left side of the page than the right.
    I can't figure out any way to even the margins.  Anyone have any ideas?
    John W.
    Colorado

    What printer model? What program are you printing from?
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Reader insists on printing 2 pages per sheet

    Reader 11.0.10
    I cannot set it to print 1 page per sheet. Other programs are happy with one, or multiple pages per sheet. But not Adobe Reader.
    Printer is Fuji Xerox CM205FW.
    Thanks in advance
    Peter

    Hi donmellado
    Welcome to the forum.
    Just go:
    +Menu > File > Print > Layout > Pages per sheet: 2+
    Don't rotate the sheet or specify a reduction size, this is not necessary, the Mac will work it all out for you.
    Peter

  • Printing multiple pages per sheet using a PostScript driver and GhostScript.

    I have three PDF files containing a total of 165 pages. I would like to print 162 of these pages onto two sides of a 8.5 × 11 in. "Letter" size paper. That is 81 pages per sheet. I don't care about loss of clarity or readability, just that fact that there are 81 (or I suppose 80 would be possible and would fit much nicer) pages of the document shown. I've seen this done before, so it is possible. It involved printing using a PostScript driver. I don't own a PostScript printer, so GhostScript will take the resulting PostScript document and print it on a non-PostScript printer.
    The first issue I'm having is with using the PostScript driver to print 80 pages per sheet. The only printing options I can find allow you to print 1, 2, 4, 6, 9, or 16 pages per sheet, no customizable value present.
    Does anyone have any words of advice or a source for information on the process of how this can be done? Thanks in advance.

    "The only printing options I can find allow you to print 1, 2, 4, 6, 9, or 16 pages per sheet, no customizable value present."
    There's no "Custom..." to choose from.
    Edit: Alright! I solved my own problem. In order to print a customizable number of pages per sheet 'Page Scaling', under the 'Page Handling' section of the  'Print' window, must be set to "Multiple pages per sheet". At this point more options populate the window, one of which is a new but seperate dropdown for 'Pages per sheet' with "Custom..." as a selection. This is different, however, from the 'Print' window's 'Properties' sub-window which has a form entry drop-down for 'Pages Per Sheet'. Hurray for unintuitive software GUIs! Hopefully this post will help others.

  • Printer-Friendly Page

    Hi,
    My JSP needs to generate a "printer-friendly" version of a page.
    1) As you know, the JavaScript print() method prints the page currently loaded in the browser. Can I, in my "Printer-unfriendly" page, have a Print button, which on click, calls a JSP/servlet, generates a "Printer-friendly" page BUT DOES NOT LOAD IN THE BROWSER, but prints? Or do I have to show the user the "Printer-Friendly" page before printing it?
    2) What are the points I need to take care in order to make an HTML page Printer-friendly?
    thanks

    Hi!
    I, just recently, made this kind of page you're talking about and didn't find a simple and good way of achieving this through anything but a simple print-friendly page.
    I did it using
    # body-onload triggers the print() function
    # through some logic (counting html lines) in the page I inserted the folowing html code to achieve
    page breaks in the printed document:
    <p clear=all style='page-break-before:always'>
    # After the print method I forwarded the client to another page (which will happen even if the user
    clicked cancel in the print dialogue)
    If you find a better way, I'd br glad to hear of it...
    /Rickard

Maybe you are looking for

  • Trouble deleting text messages from Extravert 2

    My daughter and I both recently got the LG Extravert 2 and have both had the same problem. I was the first to have the problem with not being able to delete messages, but I was able to solve it after turning my phone off and removing the battery for

  • How can I avoid crash of my iphone 5.

    How can I avoid crash of my iphone 5.

  • Java SOAP and PHP server

    HI all, I have the follow problem: I have created a SOAP server with PHP. The client connection with PHP and with generated local classes for Java, with java.apache.axis.wsdl.WSDL2Java, is working very well and I don't have problems with this. But no

  • Best way to handle user scaling/offsetting of channels?

    I have a "Channel Configuration" page in my program that I setup. The user can turn channels on or off for data acquisition. The user saves the channels (global variable), and then goes back to a Main Menu. Right now, if they want to add a channel or

  • Hierarchy Structure

    Hi Folks,      My source structure is  Hierarchy level.. and my target structure is also  almost same like that Hierarchy.. but the thing is.. In the target level Each lower level   we need to populate  the e Source- Hierlevel fileds data also.. for