public final class PageExtractor extends Object implements DSCParserConstants
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE
Modifier and Type | Method and Description |
---|---|
static void |
extractPages(InputStream in,
OutputStream out,
int from,
int to)
Parses a DSC-compliant file and pipes the content through to the OutputStream omitting
all pages not within the range.
|
public static void extractPages(InputStream in, OutputStream out, int from, int to) throws IOException, DSCException
in
- the InputStream to parse fromout
- the OutputStream to write the modified file tofrom
- the starting page (1-based)to
- the last page (inclusive, 1-based)IOException
- In case of an I/O errorDSCException
- In case of a violation of the DSC specCopyright © 2021 Apache Software Foundation. All rights reserved.