HOWTO save PDF generated (using BEEP) directly in the custom as BLOB table?

Hello

I'm working on APEX on the Oracle DB 12 c version 5.0.1 (Oracle database, 12 c Enterprise Edition Release 12.1.0.2.0 - 64 bit)

We have an application which was initially founded in APEX 4.1, but migrated to 5 APEX.

Now, we want to add features.

In a report from the region (classic report), one of the columns is an image of the print icon that on click starts a JS function.

Basically, this generates a PDF using BI Publisher in the background.

Query of the region:

Select ' < a href = "#" onclick = "javascript:f_PrintReport('||)." dcl.ID |') ; "> < img src =" "#IMAGE_PREFIX #print02.gif ' alt = 'Print' > < / a > ' Print"

of my_custom_table;

The page level (header HTML) JS

< script language = "JavaScript" type = "text/javascript" >

<!--

function f_PrintReport (declaratie_id)

{

get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is SET_REPORT_PARAMETER', $v ('pFlowStepId'));

get.addParam('x01',declaratie_id);

gReturn = get.get ();

get = null;

check the dest to run the correct report

Run the report

document. Location.href = ' f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = VAT STATEMENT ';

}

->

< /script >

It's using queries report and presentations in the shared components. It all works well.

But after generation, we now want to save the PDF generated as a BLOB in a custom table.

I am looking how I can "capture" this output to be stored directly in the DB.

Some advice there?

Thank you!

Roeland

Hello

I use different how to cope:

I read the report of APEX_UTIL. GET_PRINT_DOCUMENT to the variable of BLOB.

After that I just create target resp file.

I use this just after APEX_UTIL. GET_PRINT_DOCUMENT that opens the browser download link.

part of the code example:

In your case use just insert in the table instead of the file from the Bank on the file system.

    v_filename_xls := v_filename||'.xls';
    -- crate the PDF file to external dir
    l_document := APEX_UTIL.GET_PRINT_DOCUMENT (
      p_application_id      => :APP_ID,
      p_report_query_name   => 'report_ins',
      p_report_layout_name  => 'report_ins',
      p_report_layout_type  => 'rtf',
      p_document_format     => 'xls');
    --
    l_blob_len := DBMS_LOB.getlength(l_document);
    --
    if not utl_file.is_open(f_data_init) then
      dbg_pk.trc(2,'create file for write.');
      f_data_init := utl_file.fopen(v_if_dir, v_filename_xls, 'W', 32767);
    end if;
    --
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
    WHILE l_pos < l_blob_len LOOP
      DBMS_LOB.read(l_document, l_amount, l_pos, l_buffer);
      UTL_FILE.put_raw(f_data_init, l_buffer, TRUE);
      l_pos := l_pos + l_amount;
    END LOOP;
    -- Close the file.
    UTL_FILE.fclose(f_data_init);

concerning

J

Tags: Database

Similar Questions

  • In PDFs generated by FM 11, expands the wee for some paragraphs.  What causes this?

    In the PDF files that I generate using FM 11, broadens the wee for some paragraph tags.  I see no difference in the properties of the paragraph tag.  Sometimes, this causes the spread in the margin or even outside the borders of the table, as shown in the examples in the text.

    Notice that I use the option "Save as PDF".

    Please see attached examples that show the PDF output and the source of the FM about the same thing.  Note that extra word spacing does not occur in each paragraph.

    What causes this and how can I solve this problem?

    Adobe-example-1.pngAdobe-FM source-1.pngAdobe-example-2.pngAdobe-FM source-2.png

    Maybe, but here's what Microsoft said to the

    http://msdn.Microsoft.com/en-us/library/Windows/desktop/aa511282.aspx

    Segoe UI and Segoe are not the same font. Segoe UI is the Windows font for text user interface strings. Segoe is a brand used by Microsoft and its partners to produce materials for printing and advertising.

  • HRMS letter generated using WEB ADI but the next day it will disappear!

    HRMS letter generated using WEB ADI but the next day it will disappear, I received your comments as to check with the Getting Started Guide. It's like the assignment of function form and much more.

    Please help me to go further.

    Hi rezrezrerez,

    Good to know that the problem is solved. Please mark the post as answered.

    Thank you

    Sanjay

  • How it warns Oracle to use an index for the join of two tables...

    How to prevent the Oracle to use an index for the join of two tables to get a view online that is used in an update statement?

    O.K. I think I should explain what I mean:

    When you join two tables that have many entries sometimes there're better is not to use an index on the column that is used as a criterion to join.

    I have two tables: table A and table B.

    Table A has 4,000,000 entries and table B has 700,000 entries.

    I have a join of two tables with a numeric column as join criteria.

    There is an index on this column in A table.

    So I instead of
      where (A.col = B.col)
    I want to use
      where (A.col+0 = B.col)
    in order to avoid Oracle using the index.

    When I use the join in a select query, it works.

    But when I use the join as inline in an update statement I get the error ORA-01779.

    When I remove the '+ 0' the update statement works. (The column is unique in table B).

    Any ideas why this happens?

    Thank you very much in advance for any help.

    Hartmut cordially

    You plan to use a NO_INDEX hint as shown here: http://www.psoug.org/reference/hints.html

  • Save pdf forms to be completed by the user

    How to make a pdf form to fill live savable by the user once they have finished the form?  The ulitmate goal is to have our customers complete the form online, save it and send it to us.  If there is a way they can send email directly from the web, it would be cool too.

    Thank you!

    Acrobat 9 has a different interface. Look under the "Advanced" menu option

  • which tool is the right one to make an installation DVD that includes windows 7, SP1, Microsoft Office, Adobe Reader.etc in a single image to use it directly in the client computer

    Hello

    If I want to make a DVd image for windows 7 that includes SP1, windows live mail, adobe reader, JAVA RE, flash player, microsoft office, silverlight, and orders of partition.

    I mean a DVd that includes all this thing needed, just to facilitate the installation of the necessary things in a single step (unattended).

    and use this dvd directly in the client computer to install all these things at once.     a dvd that includes every thing and use it to install directly from the client computer.  (a single computer)

    What tool I need exactly to achieve this goal, is the tool WAIK is the right one, or I need nested tool?

    Thank you

    Johan

    See the following topics:

    http://TechNet.Microsoft.com/en-us/library/dn314789.aspx

  • I can (Edit PDF files) using my account of the composition of cloud creative single-app for Acrobat Pro (one year)?

    I have account membership cloud creative single-app for Acrobat Pro (one year).

    Can I change my PDF files using this account?

    That's what Acrobat is designed to do

  • Memory use and class of the custom movie clip?

    Hello

    I need to create instances of a clip 100. Is it better to add functions for these clips in the movie clip class or in a separate category?

    For example, I move(), setPosition(), setRotation() functions, would be that create these features a hundred times and held memory or just reference functions? What could be better?

    Thank you

    There is a slight advantage to create a function to handle all objects of class vs each class having its own class.  but it's such a small benefit that's not worth it to sacrifice any principle of encapsulation, so you should let each Member of the class to use the class methods.

  • CAN´t, use the function "save PDF-portfolio under Web site" it is grayed out on the file menu -

    I can´t use the function "save PDF-portfolio as a site" in the file menu - it is greyed out.

    I use Windows 10 House and Acrobat DC

    Not all portfolios can be saved as a site.

    It is possible with http://blogs.adobe.com/pdfdevjunkie/wp-content/themes/Adobe_PDFDevJunkie/download/Billboar dTemplate.pdf

  • Work around the window "save PDF file under ' registration

    In Adobe Acrobat Professional 10, is there a way to bypass the window "save PDF file under ' and have just the file save as the same file name or a different file name?  Then once I select 'Adobe PDF' printer and click Print, I would like that the file just to save in the same directory, in that it is.  I don't care if it overwrites the existing file or creates a new file.

    The Ride: I'm using the portfolio feature, then using the configuration of the printer for each file to reduce by 20%.  Using the print to pdf feature, I'm resave files reduced.  2000 files in the portfolio, and I don't want to see this Save As pop-up 2000 times.

    In the printer preferences, cut request file name.

  • Evaluvating LiveCycle PDF Generator ARE

    Hello

    POC, I need evaluvate LiveCycle PDF Generator ES. When I went to the product from Adobe site to download the trail version, I'm redirected to download LiveCycle ES.

    Is this the right way. To install and evaluvate LiveCycle PDF Generator, how I download suite Livecycle full of about 3 GB?

    Is this even when I have the product provider? because I only need LiveCycle PDF Generator, will I pay if I have to use the PDF generator for LiveCycle ES?

    Thank you

    ANU

    Hello

    Yes, you need to download the whole package Livecycle ES2. When you install the product, you can select to deploy only PDF Generator. When you purchase the product, you can install from even downloaded the package "trial". You can choose to buy only PDF Generator, or you can buy PDF G + additional modules in the package that you want.

  • Merge PDFs with LiveCycle PDF Generator

    Hello

    We have a requirement to merge PDF files from multiple sources as a single PDF. The application runs on Java 1.5.

    LiveCycle PDF Generator has Java API? The SDK is available at Adobe or third party?

    Anyone can update on the benefits of the use of LiveCycle PDF Generator on Adobe PDF Library.

    Thank you

    ANU

    Yes, generator has a Java API client library that is included with the LiveCycle server product.

    Insofar as a comparison of the generator and library of PDF; you are comparing apples and oranges.

    • Generator is a server side of enterprise class that runs in a JEE stack.  It is scalable/clusterable and has capacities for the management of transactions and failover.  It is designed to work seamlessly with other products in the suite LiveCycle as well (rights management, forms, output, etc.).
    • PDF Library is a set of lightweight API to add PDF support to your own Java (usually desktop).
  • Separated - is - PDF generator this possible?

    Hello!

    I would like to install the PDF generator on a dedicated machine, and other components LiveCycle to another machine. How to raise the process mgmt PDF generator location?

    Of course, I can make calls of PDF generator using the web service component. But it seems to be a bad solution.

    Is this possible at all?

    -Jaroslav

    LiveCycle is designed with the hope that all his pieces will reside in the same JVM (being done through consolidation scalability).  If you want to separate components and run separately, then you would have to make certain choices that might not be to your liking.

  • Only trial to show/hide the mouseover works in exported pdf, so that all work in the swf preview.

    I try to have all the characters in an interactive pdf book show an expanded version during the renewal of them and mask mouse when the cursor leaves. Only the first in the chapter file now works in the pdf file, but all work properly in swf preview. None of the buttons overlap. Changing the order of the buttons just change one works. The cursor turns into a helping hand during the renewal of the mouse a shutter release button, which indicates that they all are recognized as the triggers.

    I use InDesign CC 2014, Acrobat Pro XI 11.0.09, and Windows 7 Enterprise.

    Thanks in advance.

    Somehow the interactive pdf generated by InDesign loses all the names of the objects on which the triggers are supposed to act except for the first trigger. I was able to use Acrobat Pro to watch each trigger and assign the correct object for display on mouseover and hide on mouseoff. It works fine now, but it adds a significant amount of work, because if I make any changes in the InDesign file, I have to edit each trigger in the pdf file again once.

    We can hope that Adobe would address this bug in export to interactive PDF.

    Any other suggestions would be appreciated.

  • PCoIP connections directly on the desktop or via the connection to the server?

    Hello

    I have install a single view connection server and office pool and I can connect to the pool very much using the customer view pointing to the login server.

    I recently added a second login server replica and if I try to connect via the customer view succesfully authenticates, allows me to choose a pool, but errors and then with "the connection to the remote computer has ended."

    Look at newspapers in firewall, can I see traffic blocked from my desktop PC (where the client to view runs) to the IP address of the VM on the port office 4172. Of course, I can open this port, but I do not understand why this should be necessary when using the first server likely traffic goes through the connection to the server, not directly to the customer. The behavior looks different during the passage through the replica, but I don't see why this would be the case?

    You can enable/disable tunneling with a broker for connections setting.  Maybe the second broker (replica) does not make any tunnel and trying instead to go directly through your PC.

Maybe you are looking for

  • PCI input range of NOR

    Dear Sir I read in user mannual of NI PCI-6281, that he has paid minimum entry-100 mv to 100 mv. So if I select this range reslution will be 0.2/262144 = - 122 dB. Now if I have to measure the signal of-160 dB then how can I measure? I read somewhere

  • Print problems

    Buenos dias, solicito knew colaboracion porque tengo una HP4180 cambiamos los cartuchos, el impesora of tinta negra don't y color y no logramos print siempre alumbran los bombillos como so the faltara tinta, los alineamos y our muestra a message than

  • Problem of administrator rights

    I am the administrator of my laptop but it does not install/change a printer on it

  • Does not not on apple devices

    HelloI used adobe acrobat to create a newsletter with working links which will open the attachments to the record.  However I created on my PC but when people I send to open it on the IPad, the links do not work.  How can I fix?

  • Connection speed slow on one node to a node RAC 2 put in place

    Hi allHaving a little trouble with one of the nodes in a node 2 CARS set upWe have sent traffic directly to the node in question (using a service that runs only on node 1)Forced connection to this node (sqlplus) since an application server remote tak