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

Converting Images to Multiple Page Formats

by | Apr 24, 2012

Snowbound Software’s RasterMasterTM for ActiveX includes the ability to convert images to a multiple page document. You can do this by simply saving the document to one of the multiple page formats specified in the “Saving and Reading Multi-page Images” chapter of the RasterMaster ActiveX Imaging SDK Programmer’s Reference Manual or on

The approach for creating multi-page image files is the same no matter what programming language you use. This tech tip provides the sample code in VBScript and shows how to invoke the RasterMaster ActiveX control from an HTML page.

First, set the filename for the first input name. Then, save the document to the format that you want. The format numbers are specified in “Appendix B: File Type Constants” in the RasterMaster ActiveX Imaging SDK Programmer’s Reference Manual or on

The following steps explain how to merge two images into a multiple page TIFF_LZW document:

Set the input image name.

Snowbound.Image = “C:\user\sample\winter.jpg”  Snowbound.SaveFormat = 9  Snowbound.Save = “C:\user\sample\MergedPages.tif” 

After you set the output file as the same name, the second page will be appended.

Snowbound.Image = “C:\user\sample\Waterlilies.jpg”  Snowbound.SaveFormat = 9  Snowbound.Save = “C:\user\sample\MergedPages.tif”

To save the image as TIFF_LZW, set SaveFormat = 9.

To convert images to one PDF file, set SaveFormat

  SaveFormat = 59.  Snowbound.Image = “C:\user\sample\winter.jpg”  Snowbound.SaveFormat = 59  Snowbound.Save = “C:\user\sample\MergedPages.pdf”  Snowbound.Image = “C:\user\sample\Waterlilies.jpg”  Snowbound.SaveFormat = 59  Snowbound.Save = “C:\user\sample\MergedPages.pdf”

Please see the VBScript sample below for your reference:

<HTML>  <HEAD>  <TITLE>TestControl Page</TITLE>  <script LANGUAGE = VBScript>          Sub Page_Initialize          Snowbound.Image      = “C:\user\sample\winter.jpg”          Snowbound.SaveFormat = 9          Snowbound.Save = “C:\user\sample\MergedPages.tif”  Snowbound.Image      = “C:\user\sample\Waterlilies.jpg”          Snowbound.SaveFormat = 9          Snowbound.Save = “C:\user\sample\MergedPages.tif”          End Sub  </script>  </HEAD>  <BODY LANGUAGE = VBScript ONLOAD = “Page_Initialize”>  <CENTER>  <H1>Control Page</H1>  </CENTER>  <!- testcontrol.ocx>  <CENTER>  <OBJECT CLASSID=”clsid:B2D168E0-5597-101D-843A-DA16297B4C87″           HEIGHT=300 WIDTH=400 ID=Snowbound></OBJECT>  </CENTER>  </BODY>  </HTML>