replied on March 19, 2015
The JServerAccess library which implements the classes in the com.laserfiche.repositoryaccess package does not contain any PDF creation functionality. What JServerAccess allows you to do is to download the image data for the pages in a document. You can then use a third-party PDF library such as iText or PDFBox to create the PDF. To retrieve the image data for the pages in a document you would do something similar to the following:
Session session = ...;
Document doc = Document.getByPath("\\my document", session);
PageReader pages = doc.getAllPages();
while (pages.hasNext()) {
Page page = pages.next();
if (page.hasImage()) {
InputStream imageStream = page.read(PagePart.IMAGE);
// Do what you want with the imageStream here.
// The imageStream will give you direct access to the image data,
// which is most likely a TIFF or JPEG image.
imageStream.close();
}
}