crabbly / Print.js

A tiny javascript library to help printing from the web.
MIT License
4.28k stars 672 forks source link

how to remove UUID during save file? #686

Open naveennsit opened 1 year ago

naveennsit commented 1 year ago

enter image description hereI am trying to use print js library in my demo application. I am following below url

https://printjs.crabbly.com/ (here there is some example + documentation ).

I am facing one issue in my demo application same in example also. when I am clicking print .It open in print window but when we try to save that file it come with UUID "cdcb9d0d-d8ce-4790-9403-a4c7690df5ff"

steps to reproduce this

  1. Go to https://printjs.crabbly.com/
  2. Click First example . it will open print window. Don't print
  3. Try to save this file . it will show uuid why ?

Code

<button type="button" onclick="printJS('docs/printjs.pdf')">
    Print PDF
 </button>

enter image description here

vipinkundal commented 1 year ago
Screenshot 2023-08-03 at 1 07 45 PM

You can add a "title" to your HTML

naveennsit commented 1 year ago

@vipinkundal thanks for answer . I am getting this PDF from server . May be title is not present . Any other way to achieve this

johnmanko commented 11 months ago

@vipinkundal thanks for answer . I am getting this PDF from server . May be title is not present . Any other way to achieve this

https://github.com/crabbly/Print.js/blob/08d002d43a9c383cc26fedbae3c8a6f597666917/src/js/init.js#L19

?