Cannot view PDF created by passing xml and XSL-FO using UTL_HTTP

Hi,
Using UTL_HTTP Iam trying to contact a servlet which uses the input XML and XSL/FO to produce a PDF.However, when I run the procedure , I get the following error 'File does not begin with -%PDF' ? I checked the output on the console and the blob values does not start with %PDF . Below is the sample from my code , please let me know if Iam commiting a mistake somewhere. I confirmed that the servlet itself is working fine by confirming with test webpage that takes xml and stylesheet input and generates a PDF when 'submitted' to servlet on the click of a button.
INSERT INTO TESTPDF ( PDF_REPORT ) VALUES ( Empty_Blob() ) RETURNING PDF_REPORT INTO vBlobRef;
vReportURL :='/rufop/fop?xml='||xmldoc||'&xsltRPath=../../test/PAXSL.xsl';
req := UTL_HTTP.BEGIN_REQUEST (url=>vReportURL, method=>'POST');
resp := utl_http.get_response(req);
loop
begin
Utl_Http.read_raw(resp, vData);
Dbms_Lob.writeAppend ( lob_loc => vBlobRef , amount => Utl_Raw.length(vData) , buffer => vData );
exception
when utl_http.end_of_body then
exit;
end;
end loop;
Utl_Http.end_response(resp);
owa_util.mime_header('application/pdf',false);
htp.p('Content-Disposition: inline; filename="test.pdf"');
htp.p('Content-Length: '|| dbms_lob.getlength(vBlobRef));
owa_util.http_header_close;
wpg_docload.download_file(vBlobRef);
Thanks in advance,
Jen

Hello guys! I have been assigned the same task,i.e to generate pdf through xml using xsl stylesheet.
I have a procedure which is creating the xml and the stylesheet. But I have no idea how to write the procedure which passes this xml to fo engine. I am very new to this. Can anyone please share your thoughts with me so as how to accomplish this? By reading blogs on internet I figured I would have to use UTIL_HTTP but don't know how.
Sunny
Edited by: 887252 on May 29, 2012 1:24 AM

Similar Messages

  • I cannot view pdf files on Safari, instead they download and open in viewer. How do I change this?

    Does anyone have a solution for this???
    "I cannot view pdf files on Safari, instead they download and open in viewer. How do I change this?"

    Back up all data. Please read this whole message before doing anything, so you'll know what to expect.
    Open Safari's preferences dialog and make notes of everything you would need to recreate the basic settings, such as your home page. That includes the settings of Safari extensions, if any are installed.
    Triple-click the line below to select it, then copy the selected text to the Clipboard (command-C):
    ~/Library/Preferences/com.apple.Safari.plist
    Quit Safari. In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste (command-V) into the box that opens and press return. A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open.
    Launch Safari. Its settings will have reverted to what they were they first time you launched it. Your bookmarks, history, and AutoFill data will be preserved.
    Test. If Safari now works as expected, recreate its settings and delete the file you moved to the Desktop. Otherwise, quit Safari again and put the file you moved back where it was, overwriting the newer one created in its place. Post your results.

  • Using Adobe 11 reader, now comes up with an error, once file is opened. 'Invalid plugin detected, Adobe reader will quit. Closes the program so cannot view PDF files. Running windows 7. I have uninstalled and re-installed Adobe still the same. HELP

    Using Adobe 11 reader, now comes up with an error, once file is opened. 'Invalid plugin detected, Adobe reader will quit. Closes the program so cannot view PDF files. Running windows 7. I have uninstalled and re-installed Adobe still the same. HELP

    Sounds like something has been added into the Reader folder. I would recommend uninstalling, running http://labs.adobe.com/downloads/acrobatcleaner.html, removing any left over parts of the Reader folder (this might have been the problem), reboot, and reinstall. Hopefully that solves the problem. For future question about Reader, you should consider asking in the Reader forum, this is not it.

  • Unable to view pdf created in Live Cycle Designer ES2-initially thought to be a user/OS issue

    Unable to view pdf created in Live Cycle Designer ES2.  I initially thought this was a user / OS issue when I created a document for someone who is new to a MAC laptop.  She could not view the document through email.  Unfortunately, I began seeing the same error in my own document folders when searching for another document showing as icons instead of a list.  I can open the file without a problem although I see the error she sees only while viewing the icons in my folder.  I am using a Windows 7 PC. Now, I also know that if the document is downloaded, it can be viewed.
    Other notes:
    If trying to access the form via the internet, the same error is seen through Chrome, Firefox, and Mozilla but NOT through IE
    Everyone seems to have the latest or a very recent READER
    The form is compatible with Reader versions 7 and up
    Again, downloading from the internet to the computer appears to allow the file to open properly
    Document cannot be viewed on the Galaxy Tab 2 via Chrome or the pre-installed Internet Browser, nor can it be viewed through the Reader after download to tablet. I did not try on an Apple iPad.
    All parties involved are up-to-date with virus protection.
    Below is a link to the exact message received when trying to open the document.
    https://www.dropbox.com/s/wmjqzwyriovg9vi/Adobe%20Error.pdf

    You're on to something KJ!  Yes the form was created in LiveCycle Designer ES2 which came bundled with my Adobe X Pro.  I began creating a new form yesterday and found that I could not preview the form, rendering this same "error" instead.  I ran a repair on my Adobe and at first it seemed to fix the issue but after making some changes to the form I tried to preview again and couldn't.  Here is what I get when I try to preview my forms in Designer ES2: 
    When I click the OK button, it then gives me that single static page as mentioned above in previous posts.
    I searched Adobe yesterday trying to figure out how I could repair the LiveCycle Designer or if there was some sort of patch that I haven't gotten but was not able to find anything.
    (Sorry for the delay in response, I've been on vacation.)
    Message was edited by: AngelaC

  • Cannot view or print boarding passes from easy jet on ipad

    cannot view or print boarding passes from easy jet which are viewed via Adobe Reader. Get a message to say Adobe Reader needed and it just goes round in a loop

    Frankesca,
    Please see Re: How do I find my easy jet boarding cards
    It's best to get the easyJet app for iOS rather than trying to view or print the PDF version of your boarding pass.

  • Cannot view pdf files in browser

    brand new imac cannot view PDF files in browser but the PDF's can be viewed if downloaded. All the data in the PDF online have question marks instead, maybe a missing font issue?

    Have Adobe Reader installed? If so, disable the AdobePDFViewer.plugin resident in /Library/Internet Plug-Ins., restart, and try again. For font-associated issues, peruse Font Management in OS X

  • Cannot view PDF in Acrobat due to IE  EPM.Acrobat 11.0.9. EPM is disabled in IE 9. Anyone know why?

    Cannot view PDF in Acrobat due to IE  EPM.Acrobat 11.0.9. EPM is disabled in IE 9. Anyone know why?

    Hi Kswron,
    Have you tried to upgrade IE to 10. I would suggest to install latest updates to IE and upgrade to 10 and check the issue again.
    Regards,
    Ajlan Huda.

  • Cannot view pdf using Internet Explorer 8.0

    Running Vista 64-bit, IE8.0, Adobe Acrobat 9.4.1 (Pro).  I cannot view pdf documents on line --- a blank page opens, but no document is visible.  Java is loaded, ActiveX controls are in default mode, and I've done a "Repair Adobe Installation".  Anyone else seeing this?  How fixed?
    Thanks,
    OMM

    Try : http://kb2.adobe.com/cps/328/328233.html

  • I cannot view pdf files. I cannot download adobe reader also.whenever you try to download any pdf file, the screen turn black, I cannot view pdf files. I cannot download adobe reader also.whenever you try to download any pdf file, the screen turn black

    I cannot view pdf file.Cannot download adobe reader.When attempted to download adobe reader, screen turn black

    Jen.ph
    When you say that you have the same problem, do you mean that you are:
    1. Not able to download Adobe Reader;
    2. cannot view a PDF file;
    3. or what?
    Please be a little more descriptive of your particular problem or, better yet, start your own thread and clearly indicate which problem(s) you're having and what you have done, thus far, to correct the problem(s).
    Clinton

  • I cannot view pdf files with free download from Adobe. Simple

    I cannot view pdf documents, since recent download of Adobe Reader. Click pdf doc, Adobe opens, but bleeps if I click anywhere on the screen, then closes.
    Recently I tried to look at my Amex Statement online, but Adobe wouldn't show the file.
    I downloaded the Statement, but every attempt to view, is futile!!!!!!
    Today, I downloaded, Assistant and signed in. Also Adobe Air. But still the Statement cannot be viewed.
    If this is a free download, why change the setup so the damn thing doesn't work, when downloaded. I don't want to view the "World", just 1 document. If it ain't broke, don't fix it. (Words of some intellect, I would say) (Please take note)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Use the Adobe Cleaner to completely uninstall Reader. http://labs.adobe.com/downloads/acrobatcleaner.html
    Then, download the full offline installer here: http://get.adobe.com/reader/enterprise/ and run it to reinstall a good working copy of Reader.

  • Cannot view pdf in safari

    Since I installed Adobe Reader X, I cannot view pdf files in safari. If I click on a .pdf file on my hard drive, it will open up with Preview and I can view it. But before I used to be able to see pdf files in the safari browser. But now the browser is black and the url references a pdf file.

    Back up all data.
    Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Cannot view pdfs in Firefox. - Browser doesn't recognize them as pdfs

    I cannot view pdfs in Firefox. I checked the Applications section of FIrefox preferences and instead of saying "Adobe Acrobat PDF document"- it says "Adobe Acrobat FDF document. I am guessing that the browser does not recognize pdfs because the content type is incorrect.
    I am using a Mac running OSX 10.8.2 and Firefox 17.0, however I have had this problem for several months and several earlier versions of Firefox as well. Please fix this issue. According to the help center forums, I am not alone with this issue.

    Thank you for your help. What I ended up having to do was to change the Action next to Adobe Acrobat FDF document to "Use Preview". Then again under the Preview.app Document under Content Type, I had to change that to Use Preview as well. It is now working. However, Firefox (Mozilla) needs to change the word FDF to PDF in their preferences file.

  • Cannot view pdf in snow leopard in safari, cannot view pdf in snow leopard in safari

    I have a MacBookPro  Duo Core   that I just installed Snow Leopard on, Now I cannot view pdf's online in either Safari or FireFox. And I am getting  a message when I open Safari that it does not support community toolbar.

    Back up all data.
    Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Cannot view pdf files.

    I cannot view PDF files.Every now & then will allow page to be read however as soon as I go to another on the same site the window comes up with nothing in it.Adobe 9.3 definitely installed.Up to last week there were no problems. Internet connection OK. Any advice would be appreciated.

    Have Adobe Reader installed? If so, disable the AdobePDFViewer.plugin resident in /Library/Internet Plug-Ins., restart, and try again. For font-associated issues, peruse Font Management in OS X

  • Cannot convert pdf to word - just spins and says retrievin current session status - has been doing it for days

    Cannot convert pdf to word - just spins and says retrievin current session status - has been doing it for days

    Hi da522811,
    Are you still having trouble converting files? It sounds as though you may be trying to convert via Reader, is that correct? If so, please try logging out, and then logging back in. You may need to log out via the web interface at https://cloud.acrobat.com if you don't have access to the Sign Out button in Reader.
    Please let us know how it goes.
    Best,
    Sara

Maybe you are looking for

  • Actual cost of Production Order settled to Fixed Assets

    Dear all, My client is doing in-house production of moulds (internal order suggestion is not accepted by the client) for which they have the following 1. BOM 2. Machine hour 3. labour 4. overhead etc 5.plan value 6. actual value Can i settle the actu

  • Error in GRC AC 5.3--ERM-mshost missing

    Dears, We are using SAP GRC 5.3 on AIX,Oracle 10g. In Enterprise Role Management,We are facing one issue: We created a role,Now we try to change it and try to add new tcode by option searching tcodes in Available system it shows error: "mshost missin

  • CLOSURE OF BT YAHOO EMAIL

    Sorry to break in on this thread but as PaddyB (moderator) is the author of this closed thread http://community.bt.com/t5/Other-BB-Queries/Changes-to-BT-s-portal-and-email-services/td-p/876712 I feel he (or she?) should have a look at this thread htt

  • Undo effects of "Learn" in spell checker

    I accidently "learned" an incorrect spelling of a word and it is stored in my Pages dictionary. I can not remove it and the instructions on Pages Help for this do not work. The text below is an answer to this question which I found in this forum. It

  • Brush lag GPU Acceleration with AMD FirePro M6000

    Hello, I currently have a Dell Precision M6700 which I had replaced my old laptop with in attempt to fix this very problem. I'm using Windows 7 x64 with Photoshop CC x64. Whenever I attempt to use my Cintiq 13HD with GPU acceleration enabled, the bru