Page Generation Functions
Page Generation Functions
public byte[] generateImage(int imgType, int pageNum) throws SnowException
- Generates a
byte[]
representation of the specified page in the specified format - The imgType should be one of the format codes specified in
Snow.Defines.java
- The byte array returned is a complete image of the page, ready to be viewed or written to a file system
- Generates a
public byte[] extractText(int pageNum) throws SnowException
- Generates a SNBD_EXTSTREAM of the specified page and returns its ASCII form
public void saveImageAs(String fileSave, int imgType, int pageNum) throws SnowException
public void saveImageAs(byte[] dataOutput, int imgType, int pageNum) throws SnowException
- Each of these functions performs the same operations as generateImage, then goes a step further to save the resultant byte array
- The version that takes a String will write the file to the system path location specified by fileSave
- The version that takes a byte array will store the file in that byte array
Have questions, corrections, or concerns about this topic? Please let us know!