public class PdfVersion extends Object implements Comparable<PdfVersion>
Versions 1.2 to 1.7 are supported. This range corresponds to the versions
supported by iText, as seen in PdfWriter static
fields PdfWriter.VERSION_1_2 etc.
| Constructor and Description |
|---|
PdfVersion(char charValue)
Creates a PDF version from the last character of its string
representation
|
PdfVersion(String stringValue)
Creates a PDF version from its string representation
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PdfVersion o) |
char |
toChar()
Returns the last character of the PDF version
|
String |
toString() |
public PdfVersion(String stringValue) throws IllegalArgumentException
Versions 1.2 to 1.7 are supported. Valid string representations include:
1.31.6stringValue - string representation of the versionIllegalArgumentException - if stringValue does not represent a
valid versionpublic PdfVersion(char charValue) throws IllegalArgumentException
Since versions 1.2 to 1.7 are supported, a valid PDF version is uniquely specified by its last character (the digit 2 to 7).
Version in this format is returned by
PdfReader.getPdfVersion().
charValue - last character of the PDF versionIllegalArgumentException - if charValue does not represent a valid
versionpublic char toChar()
This format of PDF version is accepted for example by
PdfStamper.PdfStamper(PdfReader, OutputStream, char)
public int compareTo(PdfVersion o)
compareTo in interface Comparable<PdfVersion>Copyright © 2015–2016 Hobrasoft s.r.o.. All rights reserved.