Make PDF Book

From TheAlmightyGuru
Revision as of 14:36, 28 August 2017 by TheAlmightyGuru (talk | contribs) (Created page with "'''''Make PDF Book''''' is a JScript program that converts all of the JPG images in the folder of the script into a single PDF document using Imagemagick. This script...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Make PDF Book is a JScript program that converts all of the JPG images in the folder of the script into a single PDF document using Imagemagick. This script requires that Imagemagick be installed and able to be accessed as an object.

Source

// This script uses Imagemagick to convert all the JPEG images in the current folder into a single 
// PDF document based on the alphabetical order of the files.
// The Extent parameter should be altered to match the widest width and tallest height of all the images.
// © Copyright: Dean Tersigni, 2017-08-28.

var oIM = new ActiveXObject("ImageMagickObject.MagickImage.1");
oIM.convert("*.jpg", "-gravity", "center", "-extent", "638x900", "-density", "72", "book.pdf");