File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Show PDF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Show PDF" Watch "Show PDF" New topic

Show PDF

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 755

I have a javascript file which does this

When I click my button it send me to the original page without download any pdf. I suppose I should put the location of the empty pdf but how?

Would you do it this way? Am I missing something?

Rob Crowther
Ranch Hand

Joined: Nov 06, 2012
Posts: 297

Some questions:
  • What is it about the HTML page tm-renewal.htm that will cause it to generate a PDF?
  • What is this 'empty PDF' you mention?
  • Why do you have spaces in your URL?

  • Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
    Paul Clapham

    Joined: Oct 14, 2005
    Posts: 19973

    It seems very strange to see Response.ContentType = 'application/pdf'; as a parameter of the URL. Does that actually do something? Do you need to do it when you have an ordinary link to the PDF at that address, or when you type that address into the browser's address bar?
    I agree. Here's the link:
    subject: Show PDF
    It's not a secret anymore!