If you have a requirement to reorder pages within a document, or to create a new document containing pages from multiple existing documents, here’s an easy approach.
The first step is to create a class that represents each source page. I’ve called it com.snowbound.sample.PageReference. It only needs to store the name of the source document, and the page Index of the desired page.
package com.snowbound.sample;
public PageReference (String file, int index)
/**
/**
}
The next class to create is an extension of java.util.Vector. I’ve named it com.snowbound.sample.DocumentModel, since it models the layout of the document that we are creating. This class only has one method, writeDocument, in addition to the inherited methods of Vector. It uses a RasterMaster for Java Snow.Snowbnd object to handle the image processing and output.
package com.snowbound.sample;
import java.util.Vector;
for (int i = 0; i < size(); i++)
package com.snowbound.sample;
model.writeDocument("c:/imgs/new.tif", Defines.TIFF_LZW);
-Alex
Do you know how to get info about the pages of the tif!??Thanks!
Posted by: Ant | June 05, 2006 at 08:26 AM
Ant,
RasterMaster for Java has several methods for getting info from Tiff files and Tiff pages. More information can be found at http://www.snowbound.com/rastermaster_java/java_overview.html
Posted by: Alex Harm | June 08, 2006 at 09:22 AM