Usage of buildPdfFromPngs

Return to directory of Todd's CASA extensions

Task to convert a list (or directory) of PNGs (or other single-page image types) into PDFs, then concatenate them into one multi-page PDF. If present, pdftk is used, otherwise ghostscript is used. See also montageTwoPngLists.


CASA <5>: buildPdfFromPngs(pnglist=[], pdfname='', convert='convert', gs='gs', pdftk='pdftk', 
       maxcount=0, cleanup=True, quiet=False, overwritePdfs=True, papersize='', filetype='png')
  • pnglist: a list of PNG files ['a.png','b.png'], or a string which is assumed to be a directory in which all *.png's will be grabbed. If this string contains a *, it will not assume that it is a wildcard string with which to identify files as pngs to grab.
  • pdfname: the filename to produce (default = my.pdf)
  • convert: specify the full path to ImageMagick's convert command (if necessary)
  • gs: specify the full path to ghostscript's gs command (if necessary)
  • pdftk: specify the full path to pdftk (if necessary)
  • maxcount: maximum number of files to include
  • cleanup: remove the temporary single-page PDFs upon conclusion
  • overwritePdfs: overwrite any existing single-page PDFs
  • papersize: 'letter' or 'a4' or '' for automatic

-- ToddHunter - 2012-05-02

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > BuildPdfFromPngs
Topic revision: 2016-01-06, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback