Improve the Output Quality of File-to-File Conversion in Java SDK, RasterMaster®

Snowbound Software’s RasterMaster® for the Java™ Platform includes the ability to control the quality of an output image when converting from one file format to another such as AFP, Excel, PCL, PDF and Word. With any file conversion software, you may find that after converting a file that the quality of the output format is not as good as the original document. Snowbound Software’s RasterMaster products allow you to control the output quality of your converted file. To control the output quality of a converted file, use the IMGLOW_set_document_input method.

For example, if you are converting a file to an AFP file and the output quality is low, call the following method prior to decompression:

IMGLOW_set_document_input(300, 24, 74);

  • The first value sets the DPI to 300.
  • The second value sets the bits per pixel to 24.
  • The third value specifies the file format as AFP.Please see Appendix C: File Format Constants in the RasterMaster Imaging SDK for the Java Platform Programmer’s Reference Manual for a list of the file format numbers: http://rastermaster.com/RasterMaster Java manual/WebHelp/Content/apfiletype.htm

The following describes the IMGLOW_set_document_input method:

IMGLOW_set_document_input(int, int, int)

This method allows document formats to be rendered in color or black and white. It also allows you to set the document size. It is used for the PDF, Word, Excel, PCL, and AFP formats.

Note: The default is 200 dots per inch (DPI) and 24 bits per pixel for PDF. The default is 300 DPI and 1 bit per pixel for PCL, AFP, Word, and Excel.

Syntax

int IMGLOW_set_document_input(int dpi, int bits_pix, int format);

Remark

The table below lists the IMGLOW_set_document_input(int, int, int) method variable descriptions.

 

Variable   Description
 dpi  Sets the document in dots per inch
 bits_pix  Sets the bits per pixel
1=black and white documents
8= grayscale or color images
24 = color images
 format  Sets the format parameter

Please see Appendix C: File Format Constants in the RasterMaster Imaging SDK for the Java Platform Programmer’s Reference Manual for a list of the file format numbers. http://rastermaster.com/RasterMaster Java manual/WebHelp/Content/apfiletype.htm

Category:

Online Demo