How to open PDF in Form6i and send it to printer

I am still using very old version of developer which is developer 6i.
I would like to know how to do the following two things:
1. open a set of PDF files (which are stored in DB as BLOB) in Form6i
2. print them all out by a single button click in Form6i
Thank you.

I have followed the suggested program codes (with minor modification) listed in:
http://codasys.com/batch_print_pdf_using_wpg_docload.htm
There is no compile error; however, there is runtime errors as showed below:
SQL> set serveroutput on buffer 1000000
SQL> exec batch_print.p_batch_print_pdf(to_date('2011/02/10', 'YYYY/MM/DD'));
BEGIN batch_print.p_batch_print_pdf(pa_global.cur_prcs_date); END;
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 323
ORA-06512: at "SYS.HTP", line 860
ORA-06512: at "SYS.HTP", line 975
ORA-06512: at "SYS.HTP", line 993
ORA-06512: at "LOAN_ADMIN.BATCH_PRINT", line 17
ORA-06512: at line 1
Here is the code I am using:
CREATE OR REPLACE PACKAGE batch_print IS
PROCEDURE p_batch_print_pdf(pi_rpt_date IN DATE);
PROCEDURE p_download_file(pi_rpt_id IN VARCHAR2, pi_rpt_date IN DATE);
END batch_print;
CREATE OR REPLACE PACKAGE BODY batch_print IS
g_rpt_date DATE;
PROCEDURE p_batch_print_pdf(pi_rpt_date IN DATE) IS
CURSOR c_rpt_job IS
SELECT dp.job_exe
FROM dayend_log dl, dayend_proc dp
WHERE dl.job_sts = 'FIN'
AND dl.prcs_dt = pi_rpt_date
AND dl.seq_no = dp.seq_no
AND dp.job_typ = 'RPT'
ORDER BY dl.log_dt;
BEGIN
g_rpt_date := pi_rpt_date;
htp.p('Printing ...');
FOR r_rpd IN c_rpt_job LOOP
htp.p('<SCRIPT LANGUAGE="JavaScript">');
htp.p('DocloadWin = window.open("batch_print.p_download_file?p_id='||r_rpd.job_exe||'"'
||',"DocloadWin","width=150,height=150,left=10");');
htp.p('</script>');
END loop;
htp.p('<SCRIPT LANGUAGE="JavaScript">');
htp.p(' this.close();');
htp.p('</script>');
END p_batch_print_pdf;
PROCEDURE p_download_file ( pi_rpt_id IN VARCHAR2, pi_rpt_date IN DATE) IS
CURSOR c_pdf_rpt IS
SELECT *
FROM rpt_backup
WHERE rpt_id = pi_rpt_id
AND prcs_date = g_rpt_date;
BEGIN
FOR r_pdf IN c_pdf_rpt LOOP
owa_util.mime_header('application/x-pdfprint',FALSE);
htp.p('Content-Length: ' || dbms_lob.getlength(r_pdf.report));
owa_util.http_header_close;
wpg_docload.download_file( r_pdf.report );
END loop;
END p_download_file;
END batch_print;
Please help!

Similar Messages

  • How to open .pdf in Illustrator, and not the pdf compatible half of file.

    We first get a digital proof form printers as .pdf. Sometiems they save them with PDF compatible on. This makes my job harder because will get ilustrator asking for all the links when opening the .pdf.
    What we do is open the .pdf form the printere, adn paste this on topof our orignal .ai file. Thi sis to proof what theyt changed. Adding in theri product numbers, adn updating the UPCS is about all we want to see. What we look for is shifting type, or missing elelements.
    Mas OS 10.8.4, AI CS5

    Sorry for posting figured this out.

  • I am trying to open pdf in Pro and not Reader.  Please advise how I can fix this.

    I am trying to open pdf in Pro and not Reader.  Please advise how I can fix this.

    Eric-
    FYI, this is a forum for storage and sharing...photoshop.com and revel. If you have acrobat issues you might want to make a note of the other forums:
    http://forums.adobe.com shows a list of all of them, and specifically http://forums.adobe.com/community/acrobat  this one for Acrobat
    But, since I have had this same issue myself...
    On Windows, locate your pdf document. Right click it and select "open with". Select Adobe Acrobat. That should do it. On MAC, I'm not sure but I'm guessing there is a similar setting.
    Good luck.
    Pattie

  • How to open -pdf in a secure environment

    Opening PDF files from a secured account on Internet (e.g. telephone billing info) does not work. in Safe as the file is shown as _pdf (underscore instead of dot).  We suspect this problem started after installing CS6, but are not sure. Win 7, IE 9, Reader XI

    PDF on a regular website can be opened and downloaded. However, PDF on a secure website (https) looks normal with normal icon but double click gives screen for open / save / save as. ‘Open’ gives no result, no error message either. ‘Save’ or ‘save as’ shows screen with filename ending on _pdf, which cannot be opened or saved, no error messages either. Changing the filename into .pdf gives the same reaction: nothing happens, no error messages.
    The same files can be opened on a different PC win7, IE9, Reader XI and similar software, but without CS6.
    Van: Pat Willener [email protected]
    Verzonden: 3 november 2012 5:19
    Aan: EllyHo
    Onderwerp: how to open -pdf in a secure environment
    Re: how to open -pdf in a secure environment
    created by Pat Willener <http://forums.adobe.com/people/pwillener>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4820274#4820274

  • How to open *.pdf files in BOXI r2 inbox

    I am scheduling as  *.pdf file for deski report.After scheduling i am getting *.pdf in my inbox.if the report is deski or webi we can use FC_REPORT_ENGINE or WI_REPORT_ENGINE to open the report's using java code.In same way how to open *.PDF file in Inbox?
    Edited by: ramkishore kishore on Nov 7, 2008 8:31 AM
    Edited by: ramkishore kishore on Nov 7, 2008 8:31 AM

    Hi Ram,
    Following information might help you to resolve the issue.
    After logging into Desktop Intelligence, you may be presented with a message stating:
    u201CYou have received 1 document from users"
    Examining the Inbox from within the Desktop Intelligence client shows no objects visible in your Inbox.
    The object in your Inbox is in a format other than Desktop Intelligence format such as, PDF, XLS or other format. Therefore the object is not recognized by the Desktop Intelligence client inbox browser.
    Log in to Info View or the Central Management Console, browse to your Inbox and verify the file name and format that has been sent to your Inbox. The object may be saved, copied, moved or deleted as necessary.
    Regards,
    Sarbhjeet Kaur

  • Open a command window and send some keystroke to the opened command window

    Hi All,
    I am trying to open command prompt and send some key stroke to that command prompt. Here I am using Robot to send keystroke. But the problem is, the keystrokes are not sent to the prompt. I guess I need to activate progamitically the command prompt to accept the keystrokes . Please find the code below ( as I did).
    try
    String command = "cmd.exe /c start";
    Process child = Runtime.getRuntime().exec(command);
    Robot robot = new Robot();
    Thread.sleep(5000);
    String lol = "indranil";
    for(int i=0;i<lol.length();i++)
    robot.keyPress(lol.charAt(i));
    int g = lol.length() - 1;
    robot.keyRelease(lol.charAt(g));
    catch (Exception e) {}
    I guess I am doing some mistake here while sending the keystroke/openning the command prompt. Can anyone please help me how can I open a command window and send some keystroke to the opened command window. I am in fix.
    Thanks,
    Indranil

    The first thing to do is read the API and examples for the Robot class.
    Also check out this thread with a similar discussion: [http://forums.sun.com/thread.jspa?threadID=5385677]
    The short spoonfed answer - keyPress() and keyReleaseI() do not take chars. Read up on KeyEvent

  • How to open pdf in labview

    How to open pdf in labview?
    please help me
     1110340028

    Unfortunatly, most of the PDF questions I have seen recently aren't simply "How do I launch another application in Windows"
    Edit: What Jeff and Dennis were getting at in their own way is that you can easily launch adobe reader to display a pdf if that is your only goal.  See: http://digital.ni.com/public.nsf/allkb/68A6F2A00872837E862576940059C142
    I am also quite certain you could find an ActiveX object that would just display PDFs as well.

  • How to open pdf files in browser using flex

    hi,
    my project is having a Document explorer wchich contains pdf
    files,iwant to open it in the browser.can any one tell me how to
    open pdf documents using flex programming(i tried with different
    thing like swf's but my client wants only pdf formatt).

    Another option is by calling a JSP page. This example will
    open a pdf file into a new browser without displaying the download
    "save" prompt.
    Function to call the JSP:
    private function downloadFlyer(event:Event):void {
    var jspLink:URLRequest = new
    URLRequest("jsp/downloadpdf.jsp?fileName=Fundraiser_flyer_2008.pdf");
    navigateToURL( jspLink, "_blank" );
    JSP code:
    <%@ page errorPage="error.jsp" %>
    <%@ page import="java.io.*" %>
    <%
    //Get the parameters
    String downloadFileName=request.getParameter("fileName");
    String fileName = application.getRealPath("/downloads/" +
    downloadFileName);
    File file = new File(fileName);
    if (!file.exists()) {
    throw new IOException("File does not exist.");
    // Get the size of the file
    long length = file.length();
    // You cannot create an array using a long type.
    // It needs to be an int type.
    // Before converting to an int type, check
    // to ensure that file is not larger than Integer.MAX_VALUE.
    if (length > Integer.MAX_VALUE) {
    throw new IOException("File too big.");
    response.reset();
    response.resetBuffer();
    response.setContentType( "application/pdf" );
    response.setHeader ("Content-Disposition", "filename=" +
    downloadFileName);
    //Prevent the Java error: "getOutputStream() has already
    been called for this response"
    out.clear();
    out = pageContext.pushBody();
    InputStream in = new FileInputStream(file);
    OutputStream output = response.getOutputStream();
    try {
    int curByte=-1;
    while( (curByte=in.read()) !=-1){
    output.write(curByte);
    } catch (IOException ioe) {
    ioe.printStackTrace(System.out);
    } finally{
    output.flush();
    in.close();
    response.flushBuffer();
    %>

  • How to open pdf or word doc or notpad file in flex

    hai friends,
           how to open pdf or word doc or notpad file in flex. i am doing flexcoldfusion project. now i reterive data(notpad or worddoc or pdf file path) from database using coldfusion.now i want to open that file content .if i reterive notpad file .that will show in notpad. if it is possible. give example.
    regards,
    welcomecanv

    Hi WelcomeCan,
    Try this...
    var urlRequest:URLRequest = new URLRequest();
        urlRequest.url = "http://www.yourdomain.com/notepad.txt";
        //urlRequest.url = "http://www.yourdomain.com/FlexComp.pdf";
        navigateToURL(urlRequest,_blank);
    Thanks,
    Bhasker Chari

  • Screen resolution changes after opening PDF in preview and is enlarged.

    Screen resolution changes after opening PDF in Preview and is enlarged.

    Do a backup.
    Quit Preview.
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Remove the following. You may not find them all.
    Containers/com.apple.Preview
    Preferences/com.apple.Preview.LSSharedFileList.plist
    Preferences/com.apple.Preview.SandboxedPersistentURLs.LSSharedFileList.plist
    Saved Application State/com.apple.Preview.savedState
    Credit Linc Davis  for this solution.

  • I have just recorded on garageband and now need to send away for editing how do i place in file and send

    I have just recorded on garageband and now need to send away for editing how do i place in file and send 

    Send where? Edit how?

  • How To Open PDF Attached file use CLIENT_HOST 11 g forms

    How to open pdf file on client side at 11 g forms ?
    when i open any attached (PDF )file on client side is not open those file open on server side plz guide me how to  open those file on client machine using client host?
    thanks

    Where is the pdf you are trying to open? Is it on the server or the client? If the file is stored on the server then you can access it using WEB.SHOW_DOCUMENT assuming it is stored in a place that has a virtual mapping. For example:
    WEB.SHOW_DOCUMENT ('http://server/someLocation/file.pdf','_blank');If the file is on the client then you need to configure your application to use WebUtil. Then you can do what Francois suggested.

  • Converting OTF to EXCEL  or PDF to ECXEL  and sending Excel through mail

    Hi ,
    I need a solution for Converting OTF into EXCEL  or PDF into ECXEL  and sending Excel as a attachment to the mail.
    In my current Program I am getting OTF data from script and converting into PDF using Function module ' CONVERT_OTF'
    And sending PDF as a mail attachment using Function module 'SO_NEW_DOCUMENT_SEND_API1' it is working fine but
    My current requirement is I need to send Excel as a mail attachment instead of PDF.
    Hope it is clear for you, please give me solutions with sample code..

    Hi!
    Because OTF is not a grid, like Excel, and PDF can also contain anything, I think it is not possible to convert an OTF, or PDF into an excel spreadsheet.
    You can convert an ALV into excel and send it via email.
    Regards
    Tamá

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • Adf11g how to open pdf or html files from  webservice

    hi all,
    adf11g how to open pdf or html files from webservice .

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

Maybe you are looking for

  • RemoveEventListener in drag and drop parallax composition

    Hello all, I have a question, one of my students is making a project with a horizontal parallax and he wants to add drag and drop functionality to this. It works, only when you start to drag the object (converted to symbol) shoots to the right out of

  • Problems in generating thumbnails in iMovie08

    I just downloaded 6GB worth of video from my Sanyo XactiHD camera into my iPhoto. When i launch my iMovie08, it asks for permissions for generating thumbnails and then it closes down. It has imported stills and video into iPhoto perfectly, but fails

  • Where is my app?

    Thanks to a "sync" function that is dramatically inferior to that of Palm in so many ways, my iPod Touch dumped all of its apps (including Motion X Poker, wiping out a two-month game, ouch!). I had to reload them all. But, one never showed up on the

  • Update columns

    When I was trying to update columns, I met two different problems: 1. Source column with COLUMN1 VARCHAR2(70 BYTE); Target column with COLUMN2 VARCHAR2(50 BYTE) 2. Source column with COLUMN3 NUMBER(38,0); Target column with COLUMN4 NUMBER(10,0). When

  • Mark call as callback in Cisco UCCX outbound

    Hi, I am using Cisco UCCX 10.0. I configured outbound system in uccx and calls are offering to agents. Anybody please help how a call can be marked as callback in uccx. Also whether i can update the result of the call; for example: I am running a cam