Show a pdf file on the page

Hi, I'm trying to show a pdf on the page, but it always promts me to open or save the file, I'm using win xp, here is a peace of code I'm using:
//Buffer array of byte contains the pdf file
Response.BufferOutput = True;
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Length", Buffer.Length);
Response.AddHeader("content-disposition", "inline");
Response.ContentType = "application/pdf";
Response.BinaryWrite(Buffer);
What I'm doing bad? thanks for you help!!!!!!!!!!!!!!!!!!!

Hi, i have tried the following code and it works for me:
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
OutputStream out = response.getOutputStream();
out.write(bytes);
out.flush();
out.close();
=========
Luis Rocholl.

Similar Messages

  • Yesterday, DTA showed all PDF files on a page but today it wont. I can click on the link and DTA works from new window, but yesterday didnt have to do that. Why

    Im at a webpage that lists 200 links to PDF children's books. Yesterday I clicked DTA from this page and it showed all of the PDF files. Now when I try that today it doesnt show any PDF files. However, when I click on one of the links from the first page and then use DTA, the PDF files are seen. Why did it change and why can't I select all the PDF files from the original index page? I upgraded to the newest Firefox, downgraded to an older version, and reinstalled DTA twice. Thanks in advance for any help!!

    hello, for detailed questions about an addon, please use the support channels that the makers of the extension provide, since they can likely give you much better guidance (in your case please also include the exact web-address where this is/was happening).
    [http://www.downthemall.net/howto/faq/#faq5]

  • Can I embed a PDF file within a Pages document?

    I am working with Pages '09 and would like to embed a rather long PDF document file into my Pages text.  I want the reader to be able to click on the PDF file and have it open so that the reader can gather more information on the subject without making the actual Pages document text any longer.  I don't want the PDF file to be an external link that sends the reader away from the document -- I want to know if I can embed the PDF file WITHIN the pages document and have it open only when clicked.  I don't think I can do this.  Thanks.
    Small Town Gal.

    I found my answer within archived discussions - convert the file to a PDF and then embed the PDF file as an attachment.  Thanks.
    Barbara Smits

  • Can I set up safari to automatically open PDF documents in the pages app?

    Can I set up safari to automatically open PDF documents from the internet into the pages app?

    No - and you can't open pdf files in the Pages app on the iPad anyway as far as I know. You can export a Pages file as a pdf but you can't open them in Pages.

  • How to show the pdf file into the UIWebView from iphone documents directory?

    Hi ,
         I am working on web services right now I am getting string into base64 format. After decoding that string into NSData i am saving that data as a pdf into Document directory of iphone. Now the problem is that when I want to show the pdf into UIwebView then it is showing blank page. But when I am checking into /Users/pareshkarnawat/Library/Application Support/iPhone Simulator/4.3.2/Applications/ the pdf file is correctly generated and working fine when I ope it.
       How to show that pdf file into UIwebview ? or is there any alernative for this.
    Any ideas on how I can go about this? I have looked at a few posts and still can't seem to figure it out.
    Any idea's appreciated, thanks

    The result is a UIWebView that displays a blank page. No errors occur in the UIWebView delegate method. The thing is that data has the correct length, in bytes, for the PDF I am trying to display, and I also get the pdf file in Library/Application Support/iPhone Simulator/4.3.2/Applications/ Does anyone have an idea as to what might be going wrong here or how I can better debug this problem?

  • Safari 7.0.6, using Adobe Acrobat 11.0.10, aren't rendering pdf files in the Print Preview screen.  Additionally, only a single, blank page prints for a multi-page pdf document.  Any ideas?

    Safari 7.0.6, using Adobe Acrobat 11.0.10, isn't rendering pdf files in the Print Preview screen.  Additionally, only a single, blank page prints for a multi-page pdf document.  Any ideas?

    Figured it out.  It had nothing to do with the software levels of Safari or Adobe Acrobat.  Here's the fix:
    Open Finder/Applications
    Search "Internet Plug-Ins"
    Move any Adobe plug-ins to the trash
    Quit Safari
    Launch Safari
    Your pdf document should now render in Print Preview and print properly.

  • Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO

    Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO#, Date, ect.)

    When you say field, do you mean specifically a form field, such as a text field? Or is the information regular text on the page?

  • When I open a pdf file on the net, I can only view page 1. How do I get to the other pages?

    When I open a pdf file on the net, I can only view page 1 and cannot move to page 2, 3, etc. How can I change pages?

    See [[Firefox keeps opening many tabs or windows]]
    You can have infinite tabs opening if you have selected Firefox as the application to handle a file if you get an ''Open with'' download window.
    Firefox should not be selected as the application to handle a file and you have to remove the action that is associated with that file type.
    You can delete [http://kb.mozillazine.org/mimeTypes.rdf mimeTypes.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] to reset all actions or set that action in Tools > Options > Applications to 'Always Ask'.
    See http://kb.mozillazine.org/File_types_and_download_actions ("File handling in Firefox 3 and SeaMonkey 2" and "Reset Download Actions")

  • How to put Flash video game onto inDesign PDF file and Website page or link?!

    I am making a video game using Adobe Flash 2.0. I need to be able to show what I have through a website (my portfolio) and/or insert it into an interactive Indesign PDF file. The game needs to be able to be played and be used and tested by whoever I send the pdf file to, or whoever is would be view my the site I post it on. I have attempted many different ways to put my game onto my website (cargocollective) and Indesign, but nothing is working! I need help.
    For example I need my game to be placed on the website page, and on the pdf document as an image. When it is clicked on I need it to start so people can play the game. I don't know how to do this and I would really love and need to know how! Thanks.

    Flash should be able to publish an html page which will provide the web page code needed for embedding the swf.  The page it publishes should be sufficient for planting on a server unless you plan to dress it up with other content as well.
    As far as incorporating Flash content into a PDF using InDesign goes, you are best to ask questions about using InDesign in the InDesign forum.  Here is a link to the Overview page whee you can pick which forum applies best to your situation:
    InDesign

  • View multiple pdf files in one page

    Hi experts!
    I have to build a mobile website that will show multiple pdf files (not just the links) on one page for comparison. I've found out that using iFrames or embedded object is not an option since scrolling is not available in either of them. What do you suggest I use for this purpose?
    Any help is appreciated.
    Thanks in advance.

    The application Preview.
    Preview Help.
    Save combined PDFs
    Open the PDFs you want to combine.
    In each open PDF, choose View > Thumbnails to display the pages of the PDF in the sidebar.
    Drag the thumbnails you want to add (Command-click to select noncontiguous pages) to the thumbnail sidebar in the other PDF.You can add pages to the end of the document or between pages in a document. Drag thumbnails to reorder them. You can also add a PDF file before or after another PDF document.
    Choose File > Export to save a new PDF containing all of the combined pages, or choose File > Save to replace the original version of the destination PDF with the version containing the combined pages.

  • 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.

  • How to show a pdf file in bi publisher report

    Hi All,
    We need to show a pdf file as report which was saved in a given location. How to call that pdf file as report. We need to give a hyperlink in the report and when we click on the report the pdf file should be displayed.
    When we open a report, there will be just hyperlinks to call serveral reports. When we click on each link , one should call a pdf saved in a particular location.
    Thanks.

    In Word, if you have set the borders on then you should see them in the output. In Word it has a setting to let you see 'gridlines' even if they are not set ie you have turned the borders off. Highlight the table and set all the borders on and re-try. If that fails, try building the table from scratch and copy the cell contents across to the new table
    Tim

  • How come pages won't open PDF files made by Pages?

    How come pages won't open PDF files made by Pages?
    I have files I made with Pages and exported as PDF but I can't open them with pages to edit?
    Also, where are the recent files created by pages located? Can't find those to open either..

    Hi Tom,
    I was delighted when I signed up for Pages. Clunky yes, but it worked. I've been a graphic designer on a Mac for 25 plus years and have logged too many horror stories of "upgrade" wars which cost me massive lost time, data and money forcibly extracted just so I could finish a project.
    When I first used Pages in April of 2012? or there about, I was able to open Word documents exported to .pdf format, emailed to me, which I then dragged into Pages. I could make the changes I needed to make, export as a .pdf, return it back to my client which they could then edit on whatever it was they were using. I'm not a neophyte with this. I've had Original Photoshop as a stand alone, Quark (which locked users out 6 months after I purchased it.) Quark again, Freehand, Pagemaker, Illustrator, Photoshop again, Creative Suite for several upgrades, Acrobat Pro. 2 years ago I lost 6 years of Quicken data and had to and "upgrade" start over. This last go around I  had to "upgrade" my Apple ID - yes I had 2 on purpose, lost my Pandora One and my ability to get into the Tulsa County Library website.
    At this point, I'm retired and feel like what I've paid for in the past should WORK today. I have a 100+ page cookbook in Quark which I was able to export as a .pdf, that I've lost the tags too, Easier to start over. I have artwork that is hundreds of megs in Photoshop. Not the least bit interested in anybody's "cloud".
    Thanks for letting me vent. I'm determined to keep my equipment and software up to date so I can enjoy the skills I've acquired, but I completely cringe at Apple's antics. I truly hate it when I have to respond to some new "tip" or product offer. BooHiss. Happy Turkey Day. Pages is a "turkey" program.
    Best regards, mbd

  • How do I create a single PDF file with multiple pages?

    Hi, I occasionally need merge several jpg images into a single pdf file with multiple pages (one Jpg per page). I have tried doing this on Preview, and by selecting all the pages I want to include in my document and trying to save to Pdf through the "Print" function, but every time it only saves the first page.
    Can anyone tell me if there is a way to save multple-page pdf files without having to purchase a specific program (i to this too infrequently to justify the cost)?
    Thanks very much,

    This works for me...
    Open first image in Preview View > Sidebar. Drag the other images into Sidebar, then select all.
    From File menu > print selected images. Choose PDF > Save as PDF
    -mj

Maybe you are looking for

  • Illustrator CS5 Startup Crash Win7 32bit

    Illustrator CS5 crashes every time I Iaunch the applicaton after about 3 seconds of being open. The program worked at first before I installed my pen driver, I can not update my graphics tablet / pen as there are no driver updates available. I have t

  • No video on tutorial

    no video just audio on apple tutorial, any advice

  • Creating Dynamic Internal table with a dynamic name

    Hi, I want to create dynamic internal tables with dynamic names. For example: Suppose I have a table with three fields. 1. Structure name 2.Fields 3.file And the structure of the internal table is as follows: TYPES:BEGIN OF table_type,       struct  

  • Cisco WLC in High Availability over WAN

    Hi my name is Ivan i have a trouble perhaps could you help me... I have two cisco wlc 5508. I wan to install them in two differents site. One WLC in the site A and the another WLC in the site B. Site B is the WAN of the site A. The site A is the head

  • Issues in using RequestDispatcher

    Hi:I have found that when a forwarding servlethave read the request body, it must using mark() and reset() method of InputStream to restore the request body. Otherwise the receiving serlvet can not read the original request body message. Also it seem