Tips For Success

Having the best tools for document imaging is only half of the equation. Our Tech Tips are designed to provide you with valuable information to help you succeed by achieving faster results with our RasterMaster Imaging and Conversion SDKs or VirtualViewer high-speed document and image viewers. New time-saving tips are added monthly - you can receive them through Imaging News or our Tech Tips RSS feed.

Get Started with VirtualViewer

Tech Tip: Processing and Saving All Worksheets in an Excel Document

Snowbound Software’s RasterMaster™ for the Java™ Platform includes the ability to convert Excel documents to other file formats such as PDF. During the conversion, you are able to save all of the worksheets or pages in an Excel workbook by using Snowbound Software’s multi-page convert sample to convert each worksheet as a separate page. The following code sample demonstrates how to convert each worksheet as a separate page:

pages = Simage.IMGLOW_get_pages("sample.xls");

for (x = 0; x < pages ; x++)
{
Simage.IMG_decompress_bitmap("sample.xls",x);
Simage.IMG_save_bitmap("out.pdf",Snow.Defines.PDF);
}
    
To get the color to convert accurately in your Excel document, set IMGLOW_set_document_input(200,24,Snow.Defines.EXCEL( or 84)) .
The DPI (dots per inch) is 200. The bits per pixel or color is 24.
Note: Excel files can be very large and may run out of memory when rendering as color.