Xportability / css-to-pdf

Convert any HTML page or region to PDF - supports CSS, SVG, embedded XML objects, and more..
http://www.cloudformatter.com/CSS2Pdf
207 stars 77 forks source link

Is there a way to change the name of the downloaded document? #9

Closed phiden closed 9 years ago

phiden commented 9 years ago

Right now, docs come down with a generic "document.pdf." Is there an option exposed that would let me set 'document' to something more descriptive?

Thanks!

kstubs commented 9 years ago

Yes, see option filename. Go here for complete reference: http://www.cloudformatter.com/CSS2Pdf.APIDoc.Usage

kbrown01 commented 9 years ago

You can.

We will update on GITHUB to the latest Javascript.

Or … go to here:

http://www.cloudformatter.com/CSS2Pdf.APIDoc.Usage

See there is now an option to name the file for download:

You can either link to that Javascript which is the latest or download from there.

Note there are many changes in that Javascript and the backend service including support for many different files types as well as images.

Kevin Brown

@cloudformatter

From: phiden [mailto:notifications@github.com] Sent: Thursday, July 30, 2015 11:49 AM To: Xportability/css-to-pdf css-to-pdf@noreply.github.com Subject: [css-to-pdf] Is there a way to change the name of the downloaded document? (#9)

Right now, docs come down with a generic "document.pdf." Is there an option exposed that would let me set 'document' to something more descriptive?

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/Xportability/css-to-pdf/issues/9 . https://github.com/notifications/beacon/AAsJo-YaRIhOXuLxyVzBwDjv-XxrgbPmks5oimkYgaJpZM4Fi-8_.gif

kbrown01 commented 9 years ago

And just as an FYI, the pages on the whole website are done this way (actually the site is all XML driven so the buttons are generated dynamically using the same ID of the div to format. So that ID is used to name the download file. You of course set you own string like this:

  • As PDF
  • This would result in a file named “Usage.pdf”

    Kevin Brown

    @xportability

    From: phiden [mailto:notifications@github.com] Sent: Thursday, July 30, 2015 11:49 AM To: Xportability/css-to-pdf css-to-pdf@noreply.github.com Subject: [css-to-pdf] Is there a way to change the name of the downloaded document? (#9)

    Right now, docs come down with a generic "document.pdf." Is there an option exposed that would let me set 'document' to something more descriptive?

    Thanks!

    — Reply to this email directly or view it on GitHub https://github.com/Xportability/css-to-pdf/issues/9 . https://github.com/notifications/beacon/AAsJo-YaRIhOXuLxyVzBwDjv-XxrgbPmks5oimkYgaJpZM4Fi-8_.gif

    phiden commented 9 years ago

    Thanks very much!

    On Thu, Jul 30, 2015 at 4:13 PM, kbrown01 notifications@github.com wrote:

    And just as an FYI, the pages on the whole website are done this way (actually the site is all XML driven so the buttons are generated dynamically using the same ID of the div to format. So that ID is used to name the download file. You of course set you own string like this:

  • As PDF
  • This would result in a file named “Usage.pdf”

    Kevin Brown @xportability

    From: phiden [mailto:notifications@github.com] Sent: Thursday, July 30, 2015 11:49 AM To: Xportability/css-to-pdf css-to-pdf@noreply.github.com Subject: [css-to-pdf] Is there a way to change the name of the downloaded document? (#9)

    Right now, docs come down with a generic "document.pdf." Is there an option exposed that would let me set 'document' to something more descriptive? Thanks! —

    Reply to this email directly or view it on GitHub https://github.com/Xportability/css-to-pdf/issues/9 . https://github.com/notifications/beacon/AAsJo-YaRIhOXuLxyVzBwDjv-XxrgbPmks5oimkYgaJpZM4Fi-8_.gif

    Reply to this email directly or view it on GitHub: https://github.com/Xportability/css-to-pdf/issues/9#issuecomment-126517162

    kstubs commented 9 years ago

    yvw