Display PDF in the region

I'm trying enter a pdf of a blob column in a table and display it in a dynamic region of pl/sql, with mixed results...

The Oracle hosted instance of APEX, the following identification information:

Workspace: Homeworld

User: Demo

Password: demo

I have an application called the display PDF (# 74691) problem.  At page 2 of the application, I download a file (PDF format, I hope) to my table (APP_HELP).  On page 3, I have a pl/sql dynamic region with the following code:

{code}

DECLARE

v_mime VARCHAR2 (48);

V_LENGTH NUMBER;

v_file_name VARCHAR2 (2000);

v_lob_content BLOB;

BEGIN

SELECT Mime_type,

blob_content,

DBMS_LOB. GetLength (blob_content)

BY v_mime,

v_lob_content,

V_LENGTH

OF APP_HELP;

OWA_UTIL.mime_header (NVL (v_mime, ' application/pdf'), FALSE);

HTP.p ("Content-length: ' |") v_length);

OWA_UTIL.http_header_close;

WPG_DOCLOAD.download_file (v_lob_content);

END;

{code}

However when I run the page 3, I get a messy confusion of the characters to the screen against the PDF that was downloaded earlier...

I usually download PDF via a report so I wonder if the code I use is not sustainable at APEX 4.x

If someone can take a look and offer a suggestion, I would be grateful...

Thank you

Tony Miller

Software LuvMuffin

Ruckersville, WILL

Hello

It is not easy.

You must use for example to embed or object tag.

I have change your sample to use the embed tag in the html area.

Incorporate the src tag is the application process where I copy your code from PL/SQL area.

Kind regards

Jari

Tags: Database

Similar Questions

  • Adobe update of Version XI (11.0.07) stopped work programs and display PDFs in the browsers don't print

    Hello

    A program that we use for our financial system is no longer works since the last update of Adobe. It is asking that install us adobe pdf reader, then opens in a window crushed with none of the clickable buttons. To fix, we had now the latest version and not opening not to restore an older version of the PDF reader that creates other issues with PDF application.

    He was interested in the update of pdf ran in the background despite users clicking on no for the update. Sneaky, broke our financial system which our Organization cannot be without.

    Also it is impossible to print PDF files they opened on the web. There is no error message, just nothing happens. To work around to save on the PC and then print them.

    Would it be the same problem as https://forums.adobe.com/thread/1474731, https://forums.adobe.com/thread/1476803, etc. ?

  • Read Pdf in the application

    Hi all

    I have to read a pdf file that will be packaged in my cod. I have no idea how search in the forum, but nothing I do that.i have found useful.

    can someone help me with a code example for reading pdf files in the blackberry application

    Thank you

    Vishal

    You can use BlackberryInternetService to open a pdf file, it will display PDFs in the browser... .for that you can store on server pdf & browse pdf link... But need to install BlackberryInternetService on the device, as it will display the pdf only on device not on Simulator

  • Session for the Validation of the region variables

    Hi guys,.

    I made the dashboard in OBIEE answers. First of all, I created dimension region in my structure. I used this dimension to validate users who log on the dashboard.
    Then, all the fact will be displayed depending on the region of the user. To do this, I used in the administration tool session variables, with the following query in the inizialitation block:
    Region_name SELECT FROM user_region WHERE user_name = LOWER(':USER')

    In the answer of dashboard, I used region_name filter with the value of the session variable to show the fact according to the region of the user.

    The problem arises when I log in as an administrator. I want if you connect administrator, does everything will be shown in all regions. But user_region table, that I created, there is no user "administrator." And the fact appears as an error because there is no rated for administrator.

    I don't know how to beat this case. I hope you guys could help me.

    Concerning

    Hello

    Initialization block; "getRegion" returns a single value for the Session Variable; "userRegion" right? A region for a user_name of the user_region of the table as you already have. If the 'Administrator' user connects, the table of user_region returns nothing. In this case the Table double (if you are on Oracle) will return; "All regions".

    Region_name SELECT FROM user_region WHERE user_name = LOWER(':USER')
    UNION ALL
    SELECT 'all regions' OF THE double WHERE LOWER(':USER') = 'administrator '.

    So far so good?

    In response OBIEE, I'll add the filter as follows:
    Column: Name of the region
    Operator: is equivalent to / in
    Session variable: userRegion

    That's ok. Convert the run in SQL. Add a 'or Clause' for the 'all regions' - part. It will be as follows:

    Region name = userRegion
    OR userRegion = 'all regions '.

    Good luck

    Daan Bakboord
    http://obibb.WordPress.com

  • Display PDF in a PL/SQL region - APEX 4.2

    I'm trying to display a pdf file in a PL/SQL area in the same page APEX. First of all, I went through the following threads, but none of them worked for me:

    How to display the pdf file in the apex region

    Re: Display pdf

    View the PDF...

    I have a dynamic region of PL/SQL with the source:

    declare
    
    n_file_id number;
    v_file    varchar2(255);
    v_source  varchar2(255);
    
    begin
    
    v_source := 'MAXIS_RENEWAL.DRIVER_FILE_API.download_file_upload?p_file='||:P250_X_FILE_ID;
    
    HTP.P(V_SOURCE);
    
    htp.p('<div style="">');
    htp.p('<embed height="900" width="800" name="embed_content" src="'||v_source||'" type="application/pdf" />');
    htp.p('</div>');
    
    end
    
    

    The download_file_upload procedure is as follows:

    PROCEDURE DOWNLOAD_FILE_UPLOAD(p_file in number ) AS
    
    
            v_mime  VARCHAR2(4000);
            v_length  NUMBER;
            v_file_name VARCHAR2(2000);
            Lob_loc  BLOB;
            LOC VARCHAR2(10);
           
    BEGIN
    
    
            SELECT MIME_TYPE, BLOB_CONTENT, filename,DBMS_LOB.GETLENGTH(blob_content)
                    Into V_Mime,Lob_Loc,V_File_Name,V_Length
                    FROM MAXIS_RENEWAL.library_docs_imp
                    WHERE id = p_file;
                  --
                  -- set up HTTP header
                  --
                        -- use an NVL around the mime type and
                        -- if it is a null set it to application/octect
                        -- application/octect may launch a download window from windows
                        owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    
                    -- set the size so the browser knows how much to download
                    htp.p('Content-length: ' || v_length);
                    -- the filename will be used by the browser if the users does a save as
                    --htp.p('Content-Disposition:  attachment; filename="'||substr(v_file_name,instr(v_file_name,'/')+1)|| '"');
                    htp.p('Content-Disposition:  inline; filename="'||substr(v_file_name,instr(v_file_name,'/')+1)|| '"');
                    -- close the headers
                 
                    owa_util.http_header_close;
                    -- download the BLOB
                
                    wpg_docload.download_file( Lob_loc );
    exception when others then
       --log error
    
    
       htp.p('ERROR DOWNLOAD FILE: '||sqlerrm);
    end download_file_upload;
    
    

    With the current version, it only downloads the pdf on FireFox and IE. On Chrome, it will not. It will display only the string 'MAXIS_RENEWAL. "DRIVER_FILE_API.download_file_upload? p_file = xxxsomeID" in the region.

    When I copy the string and passed in the url of the browser, it downloads the files.

    I can't really understand the problem. Any help is deeply appreciated.

    Hi Hawk333,

    Hawk333 wrote:

    v_source: = ' MAXIS_RENEWAL. DRIVER_FILE_API.download_file_upload? = p_file'|: P250_X_FILE_ID;

    Is it possible to hide this?

    Yes, I think that you have kept the following line in your PL/SQL dynamic content area, that is why it displays:

    declare 
    
        n_file_id number;
        v_file    varchar2(255);
        v_source  varchar2(255); 
    
    begin 
    
        v_source := 'MAXIS_RENEWAL.DRIVER_FILE_API.download_file_upload?p_file='||:P250_X_FILE_ID; 
    
        -- remove this line from your code
        -- is this for debugging purpose?
        -- HTP.P(V_SOURCE);
    
        htp.p('
    '); htp.p(''); htp.p('
    '); end;

    I hope this helps!

    Kind regards

    Kiran

  • In the region HTML or word/pdf document view state

    Hello
    How to view the blob content stored in a table in the HTML area or region to report.
    I already have a process to display the content of the image.
    But my question is how to display the PDF word within the region of html so that the user can read the document without downloading it.

    All proposals/solutions would be a great help.

    Thanks in advance...

    Thank you
    Ramesh P.

    Try the OBJECT tag. This example loads a file from the file system, but the principle remains the same.

    Re: Download of the slightest error of file system on mime_header w "digital error or value".

  • When I open my pictures folder and display their (in any view-film, thumbnails etc.) photos have a 'white' on the region, and I don't see the whole picture.

    I recently had a new hard drive installed; now when I open my pictures folder and display their (in any view-film, thumbnails etc.) photos have a 'white' on the region, and I don't see the whole picture.

    Hi AnnEdelstein,
     
    To resolve this problem, install the latest version of the video card driver.
    Contact your video hardware manufacturer to find out how to obtain and install the latest version of the video driver for your video device.
     
    To see if applicable driver updates are available, visit the Microsoft Windows Update Web site at the following address:

     

    More information on:

    How to manage devices in Windows XP

    Keep me updated on the status of the issue.

  • When typing password, cursor does not move & nothing is displayed also cannot get to any other control panel or in the region

    Original title: password

    I have Win7

    I know that my password

    My computer starts up & goes to the screen where I put in password.

    I type password but the cursor does not move and nothing is displayed.

    I can't go to any other control panel or in the region

    Help, please

    try taking your laptop battery, if it is a desktop computer, unplug it, for some reason, it worked for me

  • Conditional display of the region

    Hello

    I'm under APEX 5.0 on an Oracle 12 c server.  I created an application that will be used by several different people in an office.  Each person needs to see another part of Contacts when they connect.  I also gives users the option to display or not to display various parts on the home page according to their preference.  The issue I'm having is trying to control the display of a region where the APP_USER must match a user name AND an element (P7_CONTACTS) is not equal to 'C '.  If it's only one condition, I have no problem with displaying or hiding in the region, but with multiple conditions, I can't find a solution.  I thought to use the condition EXISTS, but can't get that to work, most likely because I write the incorrect query.  I think I'm missing something obvious, but frustration is clouding my ability to think clearly at this point.  Any suggestions would be greatly appreciated.

    Bob

    wisers wrote:

    The session state Viewer shows that: p7_contacts is 'C' when the box is checked and null when it is turned off.

    Second, the State must be:

        :app_user = 'WISERS'
    and :p7_contacts is null
    

    A null value is not equal to, or does not correspond to anything...

  • Problems to display the image in the region from the list

    Hello everyone

    I problems to View an image not to come de the worksapce in one list

    Create one region type list using le vertical image list model et j’ai want to le image only is displayed in each entry de la list come du web Server, do this easily in a report in following way:

    "< img src="/apps_resources/APP121/glyphicons_halflings_080_circle_plus.png "alt =" ">

    But it does not work work on one list, I tried different ways and No work

    Anyone not know How do this correctly?

    Best regards

    Apex 4.2.0

    Oracle 11 g R2

    Apexlistener 2.6 deployed in tomcat

    The problem is that the image prefix is hardcoded in the src URL in the model of vertical image list. Make a copy of the template, edit to remove the chain of substitution #IMAGE_PREFIX # amongst the current list template definitions and model list associated with and use the new model to the region of your list.

  • Read a PDF via the Braille display

    Hi all

    is it possible to read PDFs via the Braille display? If it is a text-based PDF only.

    I figured out by clicking in the body of the PDF that I can read the lines. But I'd love to do that without the mouse at all.

    Thanks in advance.

    Fuelz

    Hi Fuelbaz,

    You can choose the option "Read Out Loud' on the view menu."

    Kind regards

    Ana Maria

  • I'm filling out a form that is available on a site. When I click on the option to fill out and submit the form 'online' a pdf document is displayed in chrome with the following text "to display all of the content of this document, you need a later version

    I'm filling out a form that is available on a site. When I click on the option to fill out and submit the form 'online' a pdf document is displayed in chrome with the following text

    «To display all of the content of this document, you need a later version the viewer PDF.» You can upgrade to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html for further support, go to www.adobe.com/support/products/acrreader.html"

    Needless to day, I installed the latest version. I even reinstalled using the link in the message, but nothing helped. Whenever I click on the link to go forward, I get the same message. Question: (i) is it my PC/software (Vista), (ii) is the site where I'm trying to submit the form, or (iii) is it the software acrobat reader. Note that I used successfully the last version to fill out and sign forms.

    It is none of them. It's Chrome, which is ignoring Adobe Reader and showing the message.

    Solution: just save the document (with the message) to your desktop. Then open it in Adobe Reader. The 'real' should then display.

  • Entry list to display only 5 in the region from the list

    Dear friend

    I want to limit the entry of the list area of the list.

    I created an html region and create another part of list as a child of the HTML area.

    I created the dynamic list ABC. There are 30 entry in list in list ABC.

    I want to display only 5 ABC list entry in the list area and to know all the entered list user can click opton more at the bottom of the region.

    How can I restrict the list entry in the list area.

    Thank you

    query like this

    Select ename, empno from emp r d where ROWNUM<=>

    Leave.

  • Using Player Adobe 11, now comes up with an error, once the file is opened. "Invalid Plugin detected, will waive the software Adobe reader." Close the program so cannot display PDF files. Running windows 7. I uninstalled and reinstalled the same Adobe. He

    Using Player Adobe 11, now comes up with an error, once the file is opened. "Invalid Plugin detected, will waive the software Adobe reader." Close the program so cannot display PDF files. Running windows 7. I uninstalled and reinstalled the same Adobe. Help

    It seems that something has been added in the folder on the drive. I would recommend http://labs.adobe.com/downloads/acrobatcleaner.htmluninstalling the program, running, removing any left over parts of the record player (this could be the problem), reboot and reinstall. If all goes well, that solved the problem. Future questions about the player, you should consider asking in the forum of reader, is not.

  • I need help! I try to open my PDF but I get this message on my Macbook Pro! "Before you display PDF documents in the browser, you must launch Adobe Reader and accept the end user license agreement, and then quit and relaunch the browser."

    I need help! I try to open my PDF but I get this message on my Macbook Pro! "Before you display PDF documents in the browser, you must launch Adobe Reader and accept the end user license agreement, and then quit and relaunch the browser." What should I do?

    Do exactly what the message says, and it will go away.

Maybe you are looking for