Save or print files in javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kitkat

    Save or print files in javascript

    Hi, i hope my english is good enough to explain my problem.
    Okay,
    I have a html-file with a image.
    But i don't want to save or print the html-file with the image.
    I want to save or print a pdf-file (in this pdf-file is the image,
    too) without open the pdf-file. It should only open the "save
    as"-window or the "print"-window when I push a button.

    It'll be nice if somebody can help me.

    Thanks.
  • Grant Wagner

    #2
    Re: Save or print files in javascript

    Kitkat wrote:
    [color=blue]
    > Hi, i hope my english is good enough to explain my problem.
    > Okay,
    > I have a html-file with a image.
    > But i don't want to save or print the html-file with the image.
    > I want to save or print a pdf-file (in this pdf-file is the image,
    > too) without open the pdf-file. It should only open the "save
    > as"-window or the "print"-window when I push a button.
    >
    > It'll be nice if somebody can help me.
    >
    > Thanks.[/color]

    What you want can not be done using client-side JavaScript in the
    default security environment.

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq


    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Save or print files in javascript

      Kitkat wrote:[color=blue]
      > Hi, i hope my english is good enough to explain my problem.[/color]

      de.comp.lang.ja vascript exists but you should get a real name
      prior to posting and use newsreader software (because Google
      Groups does not declare the umlauts etc.). I recommend Mozilla
      Thunderbird for the latter, see my sig.
      [color=blue]
      > I have a html-file with a image.
      > But i don't want to save or print the html-file with the image.
      > I want to save or print a pdf-file (in this pdf-file is the image,
      > too) without open the pdf-file. It should only open the "save
      > as"-window or the "print"-window when I push a button.[/color]

      That's impossible with client-side scripting. What you can do is to have a
      server-side script generate a PDF document on-the-fly and serve it with the
      proper MIME-Type and (for IE) filename suffix. HTML2PDF and the like, and
      any language that can be used server-side (including J[ava]Script) and can
      call this application (JScript in ASP on IIS should be capable) would be the
      tools of choice here.


      HTH

      PointedEars
      --
      Ein schlanker, leistungsfähige r und standardkonform er
      Mail/News-Client ohne viel einzustellen? Geht nicht?
      Geht doch! <http://thunderbird.bri c.de/>

      Comment

      Working...