Blog: Tech Talk

agsdix-fas fa-home

Blog: Home

agsdix-fas fa-pen-fancy

Blog: CEO's Corner

agsdix-fas fa-code

Blog: Tech Talk

Blog: Product Releases

Blog: Conversion

arrow left circle icon Blog: Tech Talk

Retaining the Page Size when Converting to a PDF

by | Apr 24, 2012

Snowbound Software’s RasterMaster™ for the Java™ Platform includes the ability to take pages saved in a TIFF file format and combine them into a PDF. If the sizes of your pages vary, you can retain the original page size. For example, if you have pages that are letter size (8.5X11) and legal size (8.5X14), the PDF of the combined pages will retain the pages’ original size as letter size or legal size.

To combine pages and retain their page size, follow the steps below:

1. Call the IMGLOW_set_pdf_output(xsize, ysize) function before saving the pages to a PDF. The xsize and ysize variables are set in points or 1/72 of an inch.
2. Get the dots per inch (DPI) from the TIFF image using s.getXDpi().
3. Set the output size as follows:

xsize = (ImageWidth * 72) / xdpi;
ysize = (ImageHeight * 72) / ydpi;