public final class MultipageDocUtil extends Object
E.g. to detect if a document contains pages of one multipage TIFF or scanpages ONLY. Filename conversions utility methods e.g. for zip files are also available.
Modifier and Type | Method and Description |
---|---|
static int |
autoGetElementNumber(List<SaDocInfo.ElementInfo> elements)
Returns the element number to use to get the first element of a document.
|
static String |
convertZipFilename(String path)
Converts a multi-page filename in a zip filename.
|
static String |
getFilename(String path)
Extracts and returns the filename of the given path.
|
static boolean |
isMultipageDoc(List<SaDocInfo.ElementInfo> elements)
Returns true if the document contains the pages of a splitted multipage TIFF
or scanned pages only.
|
static boolean |
isMultipageTiff(String path)
Checks if the given path contains a multi-page filename.
|
public static int autoGetElementNumber(List<SaDocInfo.ElementInfo> elements)
elements
- the document's structure elementspublic static boolean isMultipageDoc(List<SaDocInfo.ElementInfo> elements)
elements
- the document's structure elementspublic static boolean isMultipageTiff(String path)
A multi-page filename is specified by a "@" after the filename suffix. The number after the "@" describes the page number of the multi-page document. Example: file.tiff@1
path
- the path containing a filename to check multi-pagepublic static String getFilename(String path)
path
- The path+filename to be extract the filename from. Should be a multi-page filename.public static String convertZipFilename(String path)
Example: converts filename.tiff@3 to filename[3].tiff
path
- The path+filename to be extract the filename from. Should be a multi-page filename.Copyright © 2016 SAPERION AG. All rights reserved.