Pulling a PDF file from the database

How would I display a pdf file from the database, or should I convert it to an image and if so how do I convert it into an image?

Hi Phil_Kenya,
Some samples here:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/db1556be-0f71-41cb-92de-b95f1e1ca3a3/how-can-i-load-a-pdf-file-in-my-database-filemdf-in-aspnet-web-project?forum=csharpgeneral
http://stackoverflow.com/questions/7747796/displaying-pdf-files-in-a-web-page-from-a-sql-database-directly-without-needing
I suggest you post this issue to the language development forum like above case, I think you would get more dedicated support.
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Unable to open large PDF file from the Attachment list.

    Hi Gurus,
    Users had attached 10 PDF file in the work order attachment list and his supervisor is trying to open the PDF file from the work order attachment list and he is able to open 9 PDF files without any issue, but 1 PDF file is giving the error message as "Database error for <GET DATA FROM KPRO>" and then select ok, we are getting the below message.
    Window cannot find u201CC/Documents and Settings/b2m/SaoworkDir/5015851 Vendor data sheets B&P 2010 SDown XXX .PDFu2019. Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click serch.
    Looks like this particular file is not transferring to the SAP work directory.
    Could you please check and suggest us as to how to fix it.
    Thanks & Regards,
    Srivas

    Hi,
    Thanks for your reply.
    We verified  your OSS notes it's not relevant to us Because our issue is while opening the PDF aatchement it is not transferring to my SAP Work Directory because of that reason we are getting the KPRO error. When I'm opening the other PDF files it's transferring to my SAP Work Directory and it's automatically open without any issue.
    Please check and suggest.
    Thanks,
    Srivas

  • Lately pdf files from the Web do not display properly; what is wrong and how can I fix it so I don't have to use IE?

    I am a professor and frequently need to open pdfs of academic journal articles from electronic databases. Within the last two or three weeks, when I try to do this using Firefox, only the first page of the pdf displays and the rest are blank. In addition, a bar appears across the top with the message "This pdf file may not display properly." So I have had to switch to Internet Explorer to open the files and do my research. What is going on and how can I fix it so I can open pdf files from the Web in Firefox and have them display properly?

    My question is simple - why would you put an application in production that has a lot of bugs? To replace a good and steady Adobe product? My customers will believe that I put a pathetic fallible form online. They are not sophisticated on computers so I just tell them to use IE. Ugh
    I must agree with pgwebgirl!

  • Adobe 8 - Unexpected Corrupt or incorrect file type warning when viewing a PDF file from the Web

    Hi,
    On downloading a PDF file from my web site using Adobe 8 on the client machine I expect the file to open automatically however I receive encounter the "File Download" dialog. It has the following warning message: "The file you are downloading cannot be opened by the default program. It is either corrupted or it has an incorrect file type. As a security precaution, it is recommended that you cancel the download."
    This issue did not occur within previously tested versions of Adobe Reader (e.g. Version 5.1).
    On investigating the issue I discovered the factor that results in Adobe 8 failing to open the file automatically is the Content-Type = "application/pdf; Charset=utf-8". However, if I intercept the response and alter the Content-Type to contain only "application/pdf;" the issue on Adobe 8 does not occur.
    I have even tested when the Content-Type contains an empty Charset (i.e. "application/pdf; Charset=") but this issue still occurs. In addition setting the Charset to other encodings (e.g. "ISO-LATIN-7", "iso-8859-1") the issue occurs.
    QUESTION(s):
    1. Why is it necessary for Adobe 8 when opening PDF files from the web to expect no Charset within the Content-Type?
    2. If this was not an issue within previous versions of Adobe surly this is a bug?
    Since I cannot ensure that the Response's Content-Type does not contain a Charset at all please can someone suggest either a work-around or more importantly a solution to the issue?
    Please Note:-
    1. Within Adobe, Edit -> Preferences -> Internet option it's compulsory for our users to have "Display PDF in browser" ticked!
    2. We cannot prevent a Charset from being present within the Content-Type of the response sent to the client, hence this issue.
    Many Thanks in advance,
    Martin.

    Bill,
    This is exactly the same behavior I observed when I rendered a PDF stored in a database through a .NET page. If I chose to save it, it would open fine after the save, but if I chose to open it in the browser without saving it, I would get the error.
    The problem was not with the PDF or Acrobat. It was with the way I was delivering the PDF. Putting the following code before my binarywrite fixed the issue completely:
    Response.ClearHeaders()
    Response.ClearContent()
    Response.ContentType = "application/octet-stream"
    Response.AddHeader("content-disposition", "attachment; filename=" + saveFilename)
    where saveFileName is the name you want to give the PDF.
    You can use 'inline' instead of 'attachment' above if you just want the PDF to open (no option to save first). You can also use 'pdf' instead of 'octet-stream' (not sure the difference).
    The trouble seems to be that .NET puts some info in the header and/or content by default prior to anything your code says to write. If you don't clear this, IE has an issue with it. Other browsers seem to ignore it.
    Bottomline is that this is an issue the website programmer needs to fix and is not something the user can fix by changing some setting(s).
    I hope this helps.

  • Store and Display doc/pdf files in the database using Forms

    Hi all,
    How can i store and display doc/pdf files in the database using Forms 10g?.
    Arif

    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    [OraHome] with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
      and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
      [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
         cd [JacobStage]
         copy jacob.jar [OraHome]\forms\java\.
         copy jacob.dll [OraHome]\forms\webutil\.
      The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
      Open a DOS command prompt.
      Add [OraHome]\jdk\bin to the PATH:
         set PATH=[OraHome]\jdk\bin;%PATH%
      Sign the files, and check the output for success:
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
      you may skip this step. Otherwise,
      Create a schema to hold the WebUtil stored code, and privileges needed to
      connect and create a stored package. Schema name "WEBUTIL" is recommended
      for no reason other than consistency over the user base.
      Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
      out the EXIT statement, to be able to see whether the objects were created witout
      errors.
      Start SQL*Plus as SYSTEM, and issue:
         CREATE USER webutil IDENTIFIED BY [password]
         DEFAULT TABLESPACE users
         TEMPORARY TABLESPACE temp;
         GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
         CONNECT webutil/[password]@[connectstring]
         @[OraHome]\forms\create_webutil_db.sql
         -- Inspect SQL*Plus output for errors, and then
         CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
      Reconnect as SYSTEM, and issue:
         grant execute on webutil_db to public;
    5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
      to the CLASSPATH entry.
    6) Start the OC4J instance
    7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
      Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
      It is important to generate the PLX, to avoid the FRM-40039 discussed in
      Note 303682.1
      If the PLX is not generated, the Webutil.pll library would have to be attached with
      full path information to all forms wishing to use WebUtil. This is NOT recommended.
    8) Create a new FMB.
      Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
      There is no need to Subclass the WebutilConfig object.
      Attach the Webutil.pll Library, and remove the path.
      Add an ON-LOGON trigger with the code
             NULL;
      to avoid having to connect to an RDBMS (optional).
      Create a new button on a new canvas, with the code
             show_webutil_information (TRUE);
      in a WHEN-BUTTON-PRESSED trigger.
      Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
      the "Application Server URL" is empty.
      Then append "?config=webutil" at the end, so you end up with a URL of the form
          http://server:port/forms/frmservlet?config=webutil
    10) Run your form.sarah

  • How to mail pdf file from oracle database 11g

    Hi,
    Using following code to send pdf file from oracle database.
    DECLARE
    v_From VARCHAR2(80) := '[email protected]';
    v_Recipient VARCHAR2(80) := '[email protected]';
    v_Subject VARCHAR2(80) := 'test subject';
    v_Mail_Host VARCHAR2(30) := '116.214.31.249';
    v_Mail_Conn sys.utl_smtp.Connection;
    crlf VARCHAR2(2) := chr(13)||chr(10);
    BEGIN
    v_Mail_Conn := sys.utl_smtp.Open_Connection(v_Mail_Host, 26);
    sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
    sys.utl_smtp.Mail(v_Mail_Conn, v_From);
    sys.utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
    sys.utl_smtp.Data(v_Mail_Conn,
    'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
    'From: ' || v_From || crlf ||
    'Subject: '|| v_Subject || crlf ||
    'To: ' || v_Recipient || crlf ||
    'MIME-Version: 1.0'|| crlf ||     -- Use MIME mail standard
    'Content-Type: multipart/mixed;'|| crlf ||
    ' boundary="-----SECBOUND"'|| crlf ||
    crlf ||
    '-------SECBOUND'|| crlf ||
    'Content-Type: text/plain;'|| crlf ||
    'Content-Transfer_Encoding: 7bit'|| crlf ||
    crlf ||
    'some message text'|| crlf ||     -- Message body
    'more message text'|| crlf ||
    crlf ||
    '-------SECBOUND'|| crlf ||
    'Content-Type: file;'|| crlf ||
    ' name="D:\mail\pdfSample.pdf"'|| crlf ||
    'Content-Transfer_Encoding: 8bit'|| crlf ||
    'Content-Disposition: attachment;'|| crlf ||
    ' filename="D:\mail\pdfSample.pdf"'|| crlf ||
    crlf ||
    'CSV,file,attachement'|| crlf ||     -- Content of attachment
    crlf ||
    '-------SECBOUND--'               -- End MIME mail
    sys.utl_smtp.Quit(v_mail_conn);
    EXCEPTION
    WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
    raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
    END;
    Above code executed successfully and mail is send to recipient but file is corrupted.
    I think it doesn't pick file from specified location, attachment name is appearing like this 'D:mailpdfsample.pdf
    Oracle Database : 11g R2
    O.S : windows 7 Professional
    Thanks in Advance

    parapr wrote:
    sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);The above violates RFC 5321 section 4.1.1.1
    '-------SECBOUND'|| crlf ||
    'Content-Type: file;'|| crlf ||
    ' name="D:\mail\pdfSample.pdf"'|| crlf ||
    'Content-Transfer_Encoding: 8bit'|| crlf ||
    'Content-Disposition: attachment;'|| crlf ||
    ' filename="D:\mail\pdfSample.pdf"'|| crlf ||Invalid Mime header above. Filename are logical. Not physical. Loose the drive and directory names. The filename is there to name the Mime body's content.
    crlf ||
    'CSV,file,attachement'|| crlf ||     -- Content of attachmentHow is the above PDF content? This is a string containing the text CSV,file,attachement. Which means when this is what is saved as a PDF file by the mail reader.
    EXCEPTION
    WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
    raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
    END;Silly. Why change meaningful exceptions into a generic meaningless exception?? That does not make any sense.

  • Save a report 6i PDF file onto the database server

    Hello Experts,
    I have a requirement, whereby I need to generate a PDF report and then send that report via Email. The problem I have is my email procedure is looking for the file which is in the directory on the server where the database is stored, While the PDF is generated on the local machine. Im using reports 6i.
    I know in reports 10g the file is generated on the report server itself but Im afraid same is not the case with reports 6i.
    The other problem is the local machine does not have the access to the directories on the server. I tried to change the directory path in the database to look at the C:\ but it doesn't work, it says invalid directory, I think the PDF report file needs to be on the server where the database is installed. Is there a way I can pick the PDF file from the local machine instead of the server where the database is installed?
    Im not too sure what is the way forward, All I need is to generate a PDF file and mail it.
    The procedure that I'm using to send the email attachment is :-
    CREATE OR REPLACE PROCEDURE email_attachment(
    xfilename VARCHAR2,
    xloc VARCHAR2) IS
    conn utl_smtp.connection;
    BEGIN
    conn := Send_Mail.begin_mail(
    sender => '[email protected]',
    recipients => '[email protected]',
    subject => 'Attachment Test',
    mime_type => Send_Mail.MULTIPART_MIME_TYPE);
    Send_Mail.attach_text(
    conn => conn,
    DATA => '<b>This is a test Email.<b>',
    mime_type => 'text/html');
    send_mail.attach_base64_fromfile(
    conn => conn,
    filename => xfilename,--'test.pdf',
    floc => xloc,--'File directory',
    mime_type => 'application/octet',
    inline => TRUE);
    Send_Mail.end_attachment( conn => conn );
    Send_Mail.end_mail( conn => conn );
    Thanks any help would be appreciated.

    Hi,
    in the forms 6i email with attachment can be sent only through database folder/file. From the client it can not be.
    Here is one alternate solution.
    1. Share the folder from db server which is used for email directory and keep changeable for everyone.
    2. After generate the report like RUN_PRODUCT keep the below command.
    HOST('XCOPY CLIENT_PATH\FILE_NAME SERVER_PATH');
    3. This command will transfer file from client to db server. After this execute your procedure which is sending email.
    Hope it will work.
    -Ammad
    Edited by: Ammad Ahmed on Mar 23, 2010 1:43 PM

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How to download a pdf file from the server from an strut application?

    Hi,
    I wan to download a pdf file from the server side to local system. Please help me how i use the down load option.

    Read up on the Struts download action [1].
    And next time, please post in the relevant forum, one of the web-tier ones [2].
    [1] http://wiki.apache.org/struts/StrutsFileDownload
    [2] http://forum.java.sun.com/category.jspa?categoryID=20
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • I have just upgraded to OSX 10.6.8 and now I cannot open or save PDF files from the internet. I get a dialogue box saying the QuickTime plugin has failed. I have tried to download the latest plugin but this doesn't work. Can anyone help?

    I have just upgraded to OSX 10.6.8 and now I cannot open or save PDF files from the internet using either Safari or Firefox. I get a dialogue box saying the QuickTime plugin has failed. Can anyone help?

    Is this what you downloaded: iTunes 10.7?
    When the update fails what if any error report do you get, specifically? Please do this before trying again:
    Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • How to measure a pdf file from the guides?

    Hi,
    I need to check 200 pdf files before go to print,
    essentialy the size
    So i wanna know if there are an easy way to measure the pdf file from the cut guides
    using indd cs6 or Illustrator
    thanks

    Thanks guys
    The thing is that i dont have the indd file
    I just have a lot of PDF files and i need to check all files gone correct for print
    what Im doing is open PDF file in Illustrator and with the measure tool check the size of the crop marks
    the "page size" in Acrobat includes the bleed area so i can´t be sure if the file gone correct
    Im looking for a fast way to check that.
    The Adobe measuring tool is basically the same as im doing in Illustrator
    and in the Preflight profile i can´t find the page size
    I guess there's no faster way
    thanks a lot Danny Whitehead and John Mensinger for your interest
    and sorry about the bad english

  • Opening a pdf file from the internet.

    Everytime I try to open a pdf file from the internet a window pops up and tells me that my adobe reader has a problem or gives me a blank page.  I have ie 10, adobe reader XI and adobe acrobat 8 pro.  All this is on win 7.  When I installed the acrobat 8 pro it could not find the adobepdf.dll.  I searched the disc, and tried to direct the installation to it but it would not accept it.  What can I do to correct this issue?

    Yes, unlike earlier IE versions, IE10 has only one executable, but it can run in 32-bit or 64-bit mode.
    Some details: http://www.sevenforums.com/tutorials/280434-internet-explorer-10-enable-32-bit-64-bit-ie10 -windows-7-a.html

  • I am trying to convert a pdf file from the Government Website.

    I am trying to convert a pdf file from the government site, it is a divorce petition item d008-eng.docx. Whenever I do the transcript is all over the place. Any suggestions?
    I have only bought the software to do this one thing and it failed.

    If you use Reader XI you should be able to save it. You should also be able to save the form with Acrobat. However, the form name you gave is a docx file, not a PDF. So it is not clear what you are asking. If it were a PDF form as I would have expected, your questions would have made more sense.
    Did you buy Acrobat? If so, are you trying to convert to docx or what. I really do not understand your question. I did find an 8 page PDF of the form (assume it is the same). If you have Acrobat, just start filling it out and save at any stage. I do not see any need to convert it to docx. There are no restrictions on the form for saving or such, so I do not see why you say you can not save your input. If you bought Reader, you got ripped off. If you bought Acrobat there should be no issues with saving. If you use Reader XI there should also be no issues with saving the PDF. So, I do not see the point of your question, sorry.

  • How to upload words, exel, PDF file from the pc via itune to the iPad, and where will the uploaded file be saved? In the apps?

    How to upload words, exel, PDF file from the pc via itune to the iPad, and where will the uploaded file be saved? In the apps?

    You will need an app (or apps) on your iPad that is capable of reading the documents, as they will be saved with the app - if you don't have such an app then there is nothing to transfer them to or to read/access them.
    One method of transferring them is toconnect your iPad to your computer's iTunes, select it's app tab, and then scroll to the bottom of it - you should the apps That you've got that are capable of file-sharing (if you've got any).  Selecting/high-lighting one of them should then allow you to add files to it via the box to the right of it.
    An alternative way to get the documents onto your iPad is if the app that you want to transfer them to has a wifi setting, which will then allow you to transfer the documents wirelessly. You can also send the documents to yourself as attachments and then use Mail's 'open in' facility to copy them into your chosen app.
    Edit : more info on file sharing from the manual :
    File Sharing lets you transfer files between iPad and your computer. You can share files created with a compatible app and saved in a supported format.
    Apps that support file sharing appear in the File Sharing Apps list in iTunes. For each app, the Files list shows the documents that are on iPad. See the app’s documentation for how it shares files; not all apps support this feature.
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, select an app from the list on the left.
    On the right, select the file you want to transfer, then click “Save to” and choose a destination on your computer.
    Transfer a file from your computer to iPad:
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, click Add.
    Select a file, then click Choose (Mac) or OK (PC).
    The file is transferred to your device and can be opened using an app that supports that file type. To transfer more than one file, select each additional file.
    Delete a file from iPad: Select the file in the Files list, then tap Delete.
    Message was edited by: King_Penguin

Maybe you are looking for