hunterple.blogg.se

Snagit full page screenshot
Snagit full page screenshot








snagit full page screenshot

Note that you'll need to replace the xxx with the name of your pdf file. The second one is the URL to load, which is the local webserver running pdfjs. That's easy, in our case it's the modified version of rasterize.js! The first one tells phantomjs which script to run. What are those parameters I hear you say? Phantomjs.exe rasterize.js test.png 1920px*1080px

  • Place a copy of the pdf file you want to capture into a folder called test in the pdfjs root folder.
  • Go to line 45 and change the time from 200 to something like 5000 for now.
  • Open up rasterize.js because we need to change something.
  • Copy the rasterize.js file from the examples folder of phantomjs into the bin folder (I know it's a bit dirty but we can sort it out later right?).
  • Unzip it wherever you like and then from the command prompt cd into the bin folder.
  • You can view an example pdf by going to the following page: Next up you'll need to download PhantomJS. What you have done so far is create a web server running on localhost:8888 that is able to render pdfs using JavaScript. Unzip it and then open up command prompt and cd into the root of the folder if you don't have git then you'll need to download the whole code repository from here: Git clone git:///mozilla/pdf.js.git pdfjs and cd into the directoryī. If you have git installed just clone the mozilla/pdf.js repo from github like so
  • Grab a version of NodeJS from here and install it.
  • So, to get this all working you will need to do the following: The bad news: its a bit long winded and the pdf might not come out 100% correct! The good news: there's a way to capture your pdf in it's entirety.










    Snagit full page screenshot