Need the pdf file to be stored directly in database using jasper

I am using jasper integration package ..from www.opal-consulting.de
using apex 4 and i Am currently able to generate pdf invoice..using jasper and store in a database.. table.
I need to generate the pdf  invoice in the background ..without dispalying in my screen..
Without downloading on my machine..And  store directly into  the database table..
Is it  possible..
Any information is highly appreicated..
Below is my existing part of code..Kindly guide.
DECLARE
l_blob BLOB;
l_mime_type VARCHAR2 (100);
l_blob2 BLOB;
l_mime_type2 VARCHAR2 (100);
mport varchar2(200);
mrserver varchar2(20);
BEGIN
warn('fsubdno'||:P103_SUBSCRIBERDNO);
commit;
mrserver := rserver();
mport := 'http://'||mrserver||'/JasperReportsIntegration/report';
-- generate the report and return in BLOB
xlib_jasperreports.set_report_url (mport);
warn('firststrikeeee');
xlib_jasperreports.get_report
(p_rep_name => 'reinvx',
p_rep_format => 'pdf',
p_data_source => 'chess',
p_rep_locale => 'de_DE',
p_rep_encoding => 'UTF-8',
p_additional_params => '&Psubscribe_no='||:P103_SUBSCRIBER_NO||'&Psubscribed_no='||:P103_SUBSCRIBERDNO,
p_out_blob => l_blob,
p_out_mime_type => l_mime_type
WPG_DOCLOAD.download_file (l_blob);
warn('secondstrikeee');
WPG_DOCLOAD.download_file (l_blob);
BLOB_LOADB (mid(),:p103_subscriber_no,null,'renewal_invoice','renewalinv'||:p103_subscriber_no,l_mime_type,l_blob);
-- release resources
DBMS_LOB.freetemporary (l_blob);
-- stop rendering of APEX page
apex_application.g_unrecoverable_error := TRUE;
EXCEPTION
WHEN OTHERS
THEN
xlog ('PRC_GET_REPORT_TUNNEL', SQLERRM, 'ERROR');
RAISE;
END;
Edited by: susf on Jul 16, 2012 8:47 AM

Hi,
try make a procedure from your original code like this:
procedure make_pdf(p_subscriber_no in number, p_subscriberdno in number)
is
   l_blob blob;
   l_mime_type varchar2 (100);
   l_blob2 blob;
   l_mime_type2 varchar2 (100);
   mport varchar2(200);
   mrserver varchar2(20);
begin
   warn('fsubdno'||p_subscriberdno);
   commit;
   mrserver := rserver();
   mport := 'http://'||mrserver||'/jasperreportsintegration/report';
   -- generate the report and return in blob
   xlib_jasperreports.set_report_url (mport);
   warn('firststrikeeee');
   xlib_jasperreports.get_report
      (p_rep_name => 'reinvx',
      p_rep_format => 'pdf',
      p_data_source => 'chess',
      p_rep_locale => 'de_de',
      p_rep_encoding => 'utf-8',
      p_additional_params => '&Psubscribe_no='||p_subscriber_no||'&Psubscribed_no='||p_subscriberdno,
      p_out_blob => l_blob,
      p_out_mime_type => l_mime_type
   blob_loadb (mid(),p_subscriber_no,null,'renewal_invoice','renewalinv'||p_subscriber_no,l_mime_type,l_blob);
   -- release resources
   dbms_lob.freetemporary (l_blob);
exception
   when others
   then
      xlog ('prc_get_report_tunnel', sqlerrm, 'error');
      raise;
end;Then you can call this procedure in a database job that you create with an apex process like this:
begin
  dbms_scheduler.create_job (
    job_name        => 'make_pdf_job',
    job_type        => 'PLSQL_BLOCK',
    job_action      => 'begin make_pdf(' || :P103_SUBSCRIBER_NO || ',' || :P103_SUBSCRIBERDNO|| ') end;',
    start_date      => systimestamp,
    repeat_interval => null,
    end_date        => null,
    enabled         => true,
    comments        => 'Make pdf job from Apex page 103.');
end;regards,
Erik-jan

Similar Messages

  • I cannot view PDF in Firefox at the first time but once I manually open the PDF file from my local computer, I can view other PDF files via Firefox webbrowser

    I install Adobe Acrobat 9 in my laptop which runs on windows 7. I use Firefox 3.6.8 and have the problem with the PDF file. The problem is I cannot open the PDF file in Firefox web browser at the first time I launch firefox. It shows a warning box without any message. Only OK button is shown so I can close it. However, if I manage to open the PDF file from my local computer by just using adobe acrobat itself then the PDF can be opened in the Firefox web browser. I followed the instruction on the mozilla help but nothing works for me. The problem still exists. I wonder if anyone have the same problem like me and know how to solve this. Thank you so much

    Hi there!
    I cannot help you, but I think we have a common problem: We got a system here running Vista SP1 with Acrobat 9 standard on it. When we open a pdf file it works normally, but when we open another pdf file, we see the first one in that second window.
    Think that missing option to watch several files within a single window-thing messed up more than meets the eye ... but as we just purchased the 15 licenses, we have to use version 9.
    I didn't find any clues on this problem, but I will post any new hints I get.

  • I have Windows 98 and need Acrobat to open up the pdf files for 5.0

    I have the old system, Windows 98 and presently have the free Adobe 5.0 version on my Compaq Presario Computer, and it is a 5242 model desktop.
    I have inadvertanly switched over to Compaq Carbon Copy 32 Version 5.0 but since, have uninstalled it and now, on each of what was the pdf files initially of which I have, of which is at least 16 or more, on each of those files, an error message comes up and says "PROGRAM NOT FOUND," and states the following: "Windows cannot find CCW32EXE. This program is needed for opening the pdf files." And then it has a dialogue box with the computer operational symbol in it as C:\ and then it wants me to locate it. I cannot locate it through the "auto" because, this sytem being so old, doesn't have a magnifying glass or a "search" tool to do this in the "My Computer Icon on the Desktop as the Compaq people wanted me to do. I would have to do this manually. I have already talked to the Compaq people on their chat line and because of this, they said they couldn't help me with this problem and referred me over to you.
    I've tried to find a download for 5.0, though I really don't think I need one since it is currently installed. I believe the proper way to fix this is to just convert the CCW32EXE over to the Acrobat pdf files and have those files opened and should open up all of my 15 or so files altogether at the same time because they all converted over to something else at the same time prior.
    Are you able to help me?
    But I believe to alleviate this problem, if you could just give me the information to be able to open up the pdf files to 5.0 and find out what download I may pursue, it might be able to correct this problem. I already have the 5.0 Acrobat installed, however.

    Hi Aandi,
    I have followed your directions and I have the old system of Windows 98, so I had to go to "programs" and come up to Acrobat 5.0 and once in there, all of the Window there is greyed out, although I can still go to the tool bars above in it. I went to "file" and went to "open" and from there, I received an "open" window with a dialogue box in it and in that dialogue box as I scrolled down, it wants me to put in there, one of the following, "desktop," "my documents," "3 1/2 floppy [A:]," "[C:]," "system _save [D:]," ""[E:," "[F:]," ete; of these which do I pick in the "open" dialogue box? and down at the bottom, is the FILE NAME and what do I put in there? Just below that, it has the FILES OF TYPE which has there Adobe pdf Files, in it's dialogue box. I hit these, but I still get an error message of which basically says, "NOT FOUND, please put in proper file name given." And I don't know actually where it is given.
    So, as you see, I am a novice in all of this and you can contact me at my e mail address which is [email protected]
    and should a reply be needed, I'll come back to the forum for a reply.
    I really need to open up the Adobe 5.0 pdf files. All of the pdf files, simultaneously went over to Compaq Carbon Copy 32 of which I since, uninstalled. But I really need to get back and open the Adobe 5.0 pdf files.
    And I want to thank you for your support and eagerly awaiting your help.
    Thanks,
    Now, I did do one of the following: I went to C: which came to Acobat 3 and I hit that which came to Reader and I hit that which came to the following: ACROBAT which gave me ACTIVE X - BROWSER - FONTS - HELP - OPTIONAL - PLUG-INS

  • I need to send an email where the recipient opens the PDF file with a password,   can anybody help me and show me how to do that

    Hello,  I am trying to send an email where the recipient opens the PDF file with a password,   can anybody show me how to do that

    Hi surez,
    To password protect a PDF file, you need to use Acrobat. If you don't have Acrobat, you can try it for free for 30 days. See www.adobe.com/products/acrobat.html for more information.
    In Acrobat, you choose File > Properties when the document is open, and then click the Security tab to set up a password.
    Please let us know how it goes.
    Best,
    Sara

  • Why are pdf files opened automatically in iPad email. I need to save the pdf file itself.

    Why are pdf files opened automatically in iPad email?  I need to save the pdf file itself, so I can re-read them for later.  ANy fix.  Some pdf files I send are saved as pdf files unopened.

    I have no idea how an iPad works.
    [topic moved to iOS subforum]

  • Pdf file is too big (7MB). Need a pdf file with max size 4MB. How to minimize the size of a pdf file?

    pdf file is too big (7MB). Need a pdf file with max size 4MB. How to minimize the size of a pdf file?

    The other alternative is the Save As Other>Reduce File Size. The PDF Optimizer gives you more control. You might also use the audit feature in the PDF Optimizer to see where the size problem is coming from. You might find that in the WORD file you can select and image and then go to the FORMAT (pictures) menu and select compress for all of the bitmaps in the file. That will typically use 150 dpi by default that is adequate for most needs.

  • How can i reduce the pdf file size? I need to send via email, at the moment its at 10mb

    How can i reduce the pdf file size? I need to send via email, at the moment its at 10mb

    Reducing PDF file size or Optimizing PDF is the feature that is supported only by Acrobat Pro (desktop app that is not free).
    Optimizing PDFs (Acrobat Pro)
    Free Adobe Reader products (Reader XI desktop, Reader for iOS, Reader for Android, Reader Touch for Windows 8, etc) do not offer the capability.

  • How to directly print PDF file(which is stored in SAP) in ABAP report?

    Hi experts,
    I searched SDN for printing PDF file but everything is about OTF to PDF and to use fm: CONVERT_OTF which is not the solution for my problem.
    I have to build ABAP report which will take the PDF file attached to SAP document (CV02N) and print it.So, which function module or program can I use to print the PDF file?
    Thank you very much.
    Kind regards,
    Danijela

    Dear
       this is the code for down load smartform for PDF format. its working properly
    2nd way is
    set your Acrobat Printer as your default printer
    when you print select printer as LOCAL
    then you will file dialog box for Naming PDF
    DATA  :  T_OTF          TYPE ITCOO OCCURS 0 WITH HEADER LINE.
      DATA  :  WA_CTRLOP      TYPE SSFCTRLOP.
      DATA  :  WA_OUTOPT      TYPE SSFCOMPOP.
      DATA  :  T_OTFDATA      TYPE SSFCRESCL.
      DATA  :  T_PDF_TAB      LIKE TLINE OCCURS 0 WITH HEADER LINE.
      DATA  :  V_FILESIZE     TYPE I.
      DATA  :  W_BIN_SIZE     TYPE I.
      WA_CTRLOP-GETOTF = 'X'.
      WA_CTRLOP-NO_DIALOG = 'X'.
      WA_OUTOPT-TDNOPREV = 'X'.
      CALL FUNCTION P_LV_FNAME
        EXPORTING
          OUTPUT_OPTIONS     = WA_OUTOPT
          USER_SETTINGS      = 'X'
          CONTROL_PARAMETERS = WA_CTRLOP
        IMPORTING
          JOB_OUTPUT_INFO    = T_OTFDATA
        EXCEPTIONS
          FORMATTING_ERROR   = 1
          INTERNAL_ERROR     = 2
          SEND_ERROR         = 3
          USER_CANCELED      = 4
          OTHERS             = 5.
      T_OTF[] = T_OTFDATA-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
          MAX_LINEWIDTH         = 132
        IMPORTING
          BIN_FILESIZE          = W_BIN_SIZE
        TABLES
          OTF                   = T_OTF
          LINES                 = T_PDF_TAB
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      DATA  :  LV_DOWN_FILE TYPE RLGRAP-FILENAME.
      DATA  :  LV_TEXT      TYPE STRING.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'REPRUNMOLD'.
          CONCATENATE '(' SO_SCHDT-LOW '-' SO_PLANT-LOW ')' INTO LV_TEXT.
          CONCATENATE '\\lkdb01\FTP-Loadstar\0.PP_Planning\ZPP014\Run_Moulds\' SY-DATUM '-' SY-TIMLO '-' 'Running Mould' '-' LV_TEXT '.pdf' INTO LV_DOWN_FILE SEPARATED BY SPACE.
        WHEN  'REPLINESIT'.
          CONCATENATE '(' SO_SCHDT-LOW '-' SO_PLANT-LOW '-' SO_LINE2-LOW ')' INTO LV_TEXT.
          CONCATENATE '\\lkdb01\FTP-Loadstar\0.PP_Planning\ZPP014\Line_Situation\' SY-DATUM '-' SY-TIMLO '-' 'Line Situation' '-' LV_TEXT '.pdf' INTO LV_DOWN_FILE SEPARATED BY SPACE.
      ENDCASE.
      CALL FUNCTION 'WS_DOWNLOAD'
        EXPORTING
          BIN_FILESIZE            = W_BIN_SIZE
          FILENAME                = LV_DOWN_FILE
          FILETYPE                = 'BIN'
        IMPORTING
          FILELENGTH              = V_FILESIZE
        TABLES
          DATA_TAB                = T_PDF_TAB
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_WRITE_ERROR        = 2
          INVALID_FILESIZE        = 3
          INVALID_TYPE            = 4
          NO_BATCH                = 5
          UNKNOWN_ERROR           = 6
          INVALID_TABLE_WIDTH     = 7
          GUI_REFUSE_FILETRANSFER = 8
          CUSTOMER_ERROR          = 9
          OTHERS                  = 10.
      IF SY-SUBRC <> 0.
        MESSAGE  'File not downloaded succesfully' TYPE 'I'.
        EXIT.
      ELSE.
        MESSAGE 'PDF File downloaded succesfully' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " Print_PDF
    Rewards if useful.

  • Why can't I access the PDF files stored in my iBooks without connecting it to internet ?

    Hi,
    I have nearly 2000 PDF file documents which I have synchronized to iBooks from my DELL laptop.
    All the PDF files are individually named as to make it easy for myself to search.
    I took it outside in my show where i tried to access it, what I am seeing here is there are no documents appearing on my iBooks. I then connected it to my Mobile phone Internet where I could now see all the 2000 PDF files.
    My question here is , if all these files are on the hard drive of my iPad, why do I have to always connect it to the internet to access. This is very difficult as some places where I travel are having very low network coverage. Please help me to sort this issue. Many thanks, Amit

    You posted in the notebook computer forum, rather than the eBook format forum you desired to post in.  Here's where to post:
    iBooks for iOS for iPad/iPod Touch/iPhone eBooks, and iBooks for Mac.

  • Regarding the storing of the pdf files

    hi,
    The requirement is that all the pdf files  that are present in the application server for the day must be saved to presentation server at the end of the day.
    Thnaks in advance.

    In Pages you have the option to export to Pdf and can choose between good, better and best versions. Beware though it is often the images that will lose in resolution. This is what the Pages User Guide says:
    If you’re exporting to PDF, you must choose an image quality (a higher image quality results in a larger PDF file):
    Best: Image resolutions are not scaled down.
    Better:          Images are downsampled to 150 dpi. Images without transparency (alpha
    channel) are JPEG-compressed by 0.7.
    Good:          Images are downsampled to 72 dpi. Images without transparency (alpha channel) are JPEG-compressed by 0.9.

  • Is there any way to read the pdf file in java

    Hai,
    i need some advice from anyone that is there anyway to read the pdf file directly from java...
    Without converting to other files(txt,html)
    if it is possible please help me..
    Thank you

    Or use the Adobe one (search the adobe site). Or search this forum, this is one of the Top Ten Qestions Asked here.

  • How to sign a pdf file and save it directly back to sharepoint site?

    Hello,
    I own a Sharepoint site for testing. It is installed in my computer with Sharepoint 2010 (WSS). What I want to do is to find a way to achieve a signing function for pdf file type on sharepoint.
    By refer to this site below, the site has been able to recognize pdf file type and open it and edit it directly on the sharepoint site.
    http://www.portalsolutions.net/Blog/Lists/Posts/Post.aspx?ID=40
    I can edit the pdf file by checking out and then the modification will be save directly back to the pdf file in the shared document library when I am done. Now the problem is, I cannot save the pdf directly back to sharepoint after I inserted a digital signature
    to the pdf file.
    Everytime I inserted a digital signature to the pdf file, a "save as..." window would pop up and asked me to save the signed pdf file as another file in my local computer, so the changes were not applied to the original pdf file on the shared document library
    of my sharepoint site. I have to upload the local signed version back to the site and replace the old one manually.
    Any suggestion? Thank you.
    Mengxin Wu

     
    Hi,
    According to my analysis, for Digital Signatures: Adobe has changed the behavior around digital signatures and SharePoint-hosted PDF files. Now, when digitally signing a SharePoint-hosted PDF file, it will be saved directly to SharePoint if that PDF file
    is already checked out. If not, the user will be prompted to check it out. When digitally signing a SharePoint-hosted PDF file in Acrobat X, Version 10.0, the user would be prompted to save that file locally and would then need to upload it separately to SharePoint
    as a new version.
    I suggest that you use Acrobat X, then check the result. For more information about Acrobat X, please refer to
    http://blogs.adobe.com/pdfitmatters/2011/06/whats-new-in-acrobat-x-version-10-1.html
    In addition, you can also consider the following third-party tool:
    http://www.arx.com/digital-signature/sharepoint
    Thanks,
    Rock Wang

  • For email links from state of Montana employees to pdf files: Firefox pulls up a blank screen but Internet Explorer pulls up the pdf file.

    Whenever I get an email from a state of Montana employee with a link to a pdf file, the link does not work - it just pulls up a blank screen in Firefox. However, when I put the same link in Internet Explorer, the link works and the pdf file appears on my screen. This prevents me from efficiently using email. Here is an example of a link I recently received: "As noted in the [http://leg.mt.gov/content/committees/interim/2011-2012/water-policy/agenda/wpic09132011.pdf agenda pdf] agenda, the Committee will discuss a variety of water-related topics..."

    How do I install the Firefox plugin it's talking about on that page?
    I only see directions to install Adobe Reader.
    I cannot install a different version of Adobe. As I mentioned above, I do not have Admin privileges on this computer.
    This is the version of Adobe that my employer has decided we will be using, and I do not have a vote.
    I can change internal settings, and I can install Firefox plugins, but I can't install programs themselves - I don't have the necessary Admin rights to do so.
    Thanks anyway, but I don't have the Admin rights needed to install Adobe Reader in the manner mentioned in this article. (I have the full Adobe Acrobat XI version 11.0.09).

  • Renaming the pdf files?

    i have not found a way to rename the pdf files I have downloaded. In other apps it is easy to do so, but iBooks does allow just change the files and not other editing. Do you find this important?

    What are the names directly after splitting?
    1.pdf 2.pdf 3.pdf.....they are names as in sequence but practically there are not in sequence they are just vertically split
    how do you get 56 files out of 56 pages if each file has 2 pages?
    i got 56 files after splitting vertically.  each side will be splitted into  separate files
    what is the naming convention the splitted  files should be renamed to?
    any name but the sequence should be proper. if it says 1.pdf then it should point to 1st side
    And what does this all have to do with Java?
    need to know the programming logic on how we can do it in java.

  • OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF. then 2.  need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that

    OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF; then 2. I need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that??
    I had been saving as a PDF and then reducing the size of the PDF by printing it as a PDF with a degree of image compression. I write manuals with a LOT of screen captures and line art that needs to be clear. So it is a balancing act between image clarity and PDF size. The PDFs on the web need to be smaller - sure you can undertsand.
    Anyway, when I print the PDF again, I lose both my destinations and bookmarks.
    Anyone know of any way to avoid that?

    Control the images by creating a custom PDF Job Options and then selecting it in the PDF Job Options drop-down of the PDF setup dialog box (File > Save as PDF...)
    Create the custom PDF Job Options file with Distiller. If you do not have Distiller, open the Printing Preferences of the Adobe PDF printer. Start with the Smallest File Size Job Options settings and Edit.

Maybe you are looking for

  • Timecapsule - opening files from within an application!!

    I have a time capsule... 500Mb I have an airport extreme with external hard drive - 250 Mb. Through Finder, I can place files on either of these drives and open them from Finder. If I open Numbers, or Pages, then try to open any file on Timecapsule,

  • Format hard drive or use a NTFS driver?

    I have just purchased a Toshiba Stor.E Slim hard drive, which I do not require for Time Machine back ups.  Should I use the Tuxera NTFS driver, or should I format the hard drive for Mac?  Is any benefit over formatting vs using the driver?  I pretty

  • Cannot get 5.1 Surround Sound with optic fiber cable (Mini Toslink)

    I have a Macbook Pro (Early 2011 Model) and after spending lot of time I figured out that the best way to get 5.1 surround sound output is to connect the MBP to the AV Receiver with the optic fiber cable (Via Mini Toslink Adapter). So after reading a

  • Unable to import images to iMovie, or copy and paste images.

    As the title states, I am unable to import images from either iPhoto, the iMovie photo selector, or finder. Furthermore I cannot copy the rest of my timelapse from a second project into the origional, it just pastes one image in a different size and

  • HANA Studio: Installation and usage

    Hi, I am currently retaking the the introduction course in the HANA development and wonder about the HANA studio GUI presented there. Installation: I see on the HANA Dev site that there is the Studio and the Client. Do I need both for installation? O