mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-06-05 22:09:39 +02:00
more
This commit is contained in:
@@ -1,171 +1,275 @@
|
||||
// Enumerations
|
||||
// Enumerations and data structures
|
||||
|
||||
/** Permission: cannot edit the document */
|
||||
public static int noEdit = 0;
|
||||
/** Permission: cannot print the document */
|
||||
public static int noPrint = 1;
|
||||
/** Permission: cannot copy the document */
|
||||
public static int noCopy = 2;
|
||||
/** Permission: cannot annotate the document */
|
||||
public static int noAnnot = 3;
|
||||
/** Permission: cannot edit forms in the document */
|
||||
public static int noForms = 4;
|
||||
/** Permission: cannot extract information */
|
||||
public static int noExtract = 5;
|
||||
/** Permission: cannot assemble into a bigger document */
|
||||
public static int noAssemble = 6;
|
||||
/** Permission: cannot print high quality */
|
||||
public static int noHqPrint = 7;
|
||||
|
||||
/** Encryption method: 40 bit RC4 encryption */
|
||||
public static int pdf40bit = 0;
|
||||
/** Encryption method: 128 bit RC4 encryption */
|
||||
public static int pdf128bit = 1;
|
||||
/** Encryption method: 128 bit AES encryption, do not encrypt metadata */
|
||||
public static int aes128bitfalse = 2;
|
||||
/** Encryption method: 128 bit AES encryption, encrypt metadata */
|
||||
public static int aes128bittrue = 3;
|
||||
/** Encryption method: Deprecated. Do not use for new files */
|
||||
public static int aes256bitfalse = 4;
|
||||
/** Encryption method: Deprecated. Do not use for new files */
|
||||
public static int aes256bittrue = 5;
|
||||
/** Encryption method: 256 bit AES encryption, do not encrypt metadata */
|
||||
public static int aes256bitisofalse = 6;
|
||||
/** Encryption method: 256 bit AES encryption, encrypt metadata */
|
||||
public static int aes256bitisotrue = 7;
|
||||
// Permissions
|
||||
|
||||
/** Page label style: 1, 2, 3... */
|
||||
public static int decimalArabic = 0;
|
||||
/** Page label style: I, II, III... */
|
||||
public static int uppercaseRoman = 1;
|
||||
/** Page label style: i, ii, iii... */
|
||||
public static int lowercaseRoman = 2;
|
||||
/** Page label style: A, B, C... */
|
||||
public static int uppercaseLetters = 3;
|
||||
/** Page label style: a, b, c...*/
|
||||
public static int lowercaseLetters = 4;
|
||||
/** Cannot edit the document */
|
||||
var noEdit = 0;
|
||||
|
||||
/** Layout: single page */
|
||||
public static int singlePage = 0;
|
||||
/** Layout: one column */
|
||||
public static int oneColumn = 1;
|
||||
/** Layout: two column left */
|
||||
public static int twoColumnLeft = 2;
|
||||
/** Layout: two column right */
|
||||
public static int twoColumnRight = 3;
|
||||
/** Layout: two page left */
|
||||
public static int twoPageLeft = 4;
|
||||
/** Layout: two page right */
|
||||
public static int twoPageRight = 5;
|
||||
/** Cannot print the document */
|
||||
var noPrint = 1;
|
||||
|
||||
/** Page mode: use none */
|
||||
public static int useNone = 0;
|
||||
/** Page mode: use outlines */
|
||||
public static int useOutlines = 1;
|
||||
/** Page mode: use thumbs */
|
||||
public static int useThumbs = 2;
|
||||
/** Page mode: use OC */
|
||||
public static int useOC = 3;
|
||||
/** Page mode: use Attachments */
|
||||
public static int useAttachments = 4;
|
||||
/** Cannot copy the document */
|
||||
var noCopy = 2;
|
||||
|
||||
/** Paper size: A0 Portrait */
|
||||
public static int a0portrait = 0;
|
||||
/** Paper size: A1 Portrait */
|
||||
public static int a1portrait = 1;
|
||||
/** Paper size: A2 Portrait */
|
||||
public static int a2portrait = 2;
|
||||
/** Paper size: A3 Portrait */
|
||||
public static int a3portrait = 3;
|
||||
/** Paper size: A4 Portrait */
|
||||
public static int a4portrait = 4;
|
||||
/** Paper size: A5 Portrait */
|
||||
public static int a5portrait = 5;
|
||||
/** Paper size: A0 Landscape */
|
||||
public static int a0landscape = 6;
|
||||
/** Paper size: A1 Landscape */
|
||||
public static int a1landscape = 7;
|
||||
/** Paper size: A2 Landscape */
|
||||
public static int a2landscape = 8;
|
||||
/** Paper size: A3 Landscape */
|
||||
public static int a3landscape = 9;
|
||||
/** Paper size: A4 Landscape */
|
||||
public static int a4landscape = 10;
|
||||
/** Paper size: A5 Landscape */
|
||||
public static int a5landscape = 11;
|
||||
/** Paper size: US Letter Portrait */
|
||||
public static int usletterportrait = 12;
|
||||
/** Paper size: US Letter Landscape */
|
||||
public static int usletterlandscape = 13;
|
||||
/** Paper size: US Legal Portrait */
|
||||
public static int uslegalportrait = 14;
|
||||
/** Paper size: US Legal Landscape */
|
||||
public static int uslegallandscape = 15;
|
||||
/** Cannot annotate the document */
|
||||
var noAnnot = 3;
|
||||
|
||||
/** Standard font: Times Roman */
|
||||
public static int timesRoman = 0;
|
||||
/** Standard font: Times Bold */
|
||||
public static int timesBold = 1;
|
||||
/** Standard font: Times Italic */
|
||||
public static int timesItalic = 2;
|
||||
/** Standard font: Times Bold Italic */
|
||||
public static int timesBoldItalic = 3;
|
||||
/** Standard font: Helvetica */
|
||||
public static int helvetica = 4;
|
||||
/** Standard font: Helvetica Bold */
|
||||
public static int helveticaBold = 5;
|
||||
/** Standard font: Helvetica Oblique */
|
||||
public static int helveticaOblique = 6;
|
||||
/** Standard font: Helvetica Bold Oblique */
|
||||
public static int helveticaBoldOblique = 7;
|
||||
/** Standard font: Courier */
|
||||
public static int courier = 8;
|
||||
/** Standard font: Courier Bold */
|
||||
public static int courierBold = 9;
|
||||
/** Standard font: Courier Oblique */
|
||||
public static int courierOblique = 10;
|
||||
/** Standard font: Courier Bold Oblique */
|
||||
public static int courierBoldOblique = 11;
|
||||
/** Cannot edit forms in the document */
|
||||
var noForms = 4;
|
||||
|
||||
/** Position anchor: absolute centre. Takes two numbers, x and y. */
|
||||
public static int posCentre = 0;
|
||||
/** Position anchor: absolute left. Takes two numbers, x and y. */
|
||||
public static int posLeft = 1;
|
||||
/** Position anchor: absolute right. Takes two numbers, x and y. */
|
||||
public static int posRight = 2;
|
||||
/** Position anchor: the top centre of the page.
|
||||
Takes one number - distance from top. Second number ignored. */
|
||||
public static int top = 3;
|
||||
/** Position anchor: the top left of the page.
|
||||
Takes one numbers - distance from top left. Second number ignored. */
|
||||
public static int topLeft = 4;
|
||||
/** Position anchor: the top right of the page.
|
||||
Takes one number - distance from top right. Second number ignored. */
|
||||
public static int topRight = 5;
|
||||
/** Position anchor: the left hand side of the page, halfway down.
|
||||
Takes one number - distance from left middle. Second number ignored. */
|
||||
public static int left = 6;
|
||||
/** Position anchor: the bottom left of the page.
|
||||
Takes one number - distance from bottom left. Second number ignored. */
|
||||
public static int bottomLeft = 7;
|
||||
/** Position anchor: the bottom middle of the page.
|
||||
Takes one number - distance from bottom middle. Second number ignored. */
|
||||
public static int bottom = 8;
|
||||
/** Position anchor: the bottomm right of the page.
|
||||
Takes one number - distance from bottom right. Second number ignored. */
|
||||
public static int bottomRight = 9;
|
||||
/** Position anchor: the right hand side of the page, halfway down.
|
||||
Takes one number - distance from right middle. Second number ignored. */
|
||||
public static int right = 10;
|
||||
/** Position anchor: diagonal, bottom left to top right.
|
||||
Takes no numbers. Both numbers ignored. */
|
||||
public static int diagonal = 11;
|
||||
/** Position anchor: diagonal, top left to bottom right.
|
||||
Takes no numbers. Both numbers ignored. */
|
||||
public static int reverseDiagonal = 12;
|
||||
/** Justification: left */
|
||||
public static int leftJustify = 0;
|
||||
/** Justification: centre */
|
||||
public static int centreJustify = 1;
|
||||
/** Justification: right */
|
||||
public static int rightJusitfy = 2;
|
||||
/** Cannot extract information */
|
||||
var noExtract = 5;
|
||||
|
||||
/** Cannot assemble into a bigger document */
|
||||
var noAssemble = 6;
|
||||
|
||||
/** Cannot print high quality */
|
||||
var noHqPrint = 7;
|
||||
|
||||
|
||||
// Encryption types
|
||||
|
||||
/** 40 bit RC4 encryption */
|
||||
var pdf40bit = 0;
|
||||
|
||||
/** 128 bit RC4 encryption */
|
||||
var pdf128bit = 1;
|
||||
|
||||
/** 128 bit AES encryption, do not encrypt metadata */
|
||||
var aes128bitfalse = 2;
|
||||
|
||||
/** 128 bit AES encryption, encrypt metadata */
|
||||
var aes128bittrue = 3;
|
||||
|
||||
/** Deprecated. Do not use for new files */
|
||||
var aes256bitfalse = 4;
|
||||
|
||||
/** Deprecated. Do not use for new files */
|
||||
var aes256bittrue = 5;
|
||||
|
||||
/** 256 bit AES encryption, do not encrypt metadata */
|
||||
var aes256bitisofalse = 6;
|
||||
|
||||
/** 256 bit AES encryption, encrypt metadata */
|
||||
var aes256bitisotrue = 7;
|
||||
|
||||
|
||||
// Paper sizes
|
||||
|
||||
/** A0 Portrait paper */
|
||||
var a0portrait = 0;
|
||||
|
||||
/** A1 Portrait paper */
|
||||
var a1portrait = 1;
|
||||
|
||||
/** A2 Portrait paper */
|
||||
var a2portrait = 2;
|
||||
|
||||
/** A3 Portrait paper */
|
||||
var a3portrait = 3;
|
||||
|
||||
/** A4 Portrait paper */
|
||||
var a4portrait = 4;
|
||||
|
||||
/** A5 Portrait paper */
|
||||
var a5portrait = 5;
|
||||
|
||||
/** A0 Landscape paper */
|
||||
var a0landscape = 6;
|
||||
|
||||
/** A1 Landscape paper */
|
||||
var a1landscape = 7;
|
||||
|
||||
/** A2 Landscape paper */
|
||||
var a2landscape = 8;
|
||||
|
||||
/** A3 Landscape paper */
|
||||
var a3landscape = 9;
|
||||
|
||||
/** A4 Landscape paper */
|
||||
var a4landscape = 10;
|
||||
|
||||
/** A5 Landscape paper */
|
||||
var a5landscape = 11;
|
||||
|
||||
/** US Letter Portrait paper */
|
||||
var usletterportrait = 12;
|
||||
|
||||
/** US Letter Landscape paper */
|
||||
var usletterlandscape = 13;
|
||||
|
||||
/** US Legal Portrait paper */
|
||||
var uslegalportrait = 14;
|
||||
|
||||
/** US Legal Landscape paper */
|
||||
var uslegallandscape = 15;
|
||||
|
||||
|
||||
// Positions
|
||||
|
||||
/** Absolute centre */
|
||||
var posCentre = 0;
|
||||
|
||||
/** Absolute left */
|
||||
var posLeft = 1;
|
||||
|
||||
/** Absolute right */
|
||||
var posRight = 2;
|
||||
|
||||
/** The top centre of the page */
|
||||
var top = 3;
|
||||
|
||||
/** The top left of the page */
|
||||
var topLeft = 4;
|
||||
|
||||
/** The top right of the page */
|
||||
var topRight = 5;
|
||||
|
||||
/** The left hand side of the page, halfway down */
|
||||
var left = 6;
|
||||
|
||||
/** The bottom left of the page */
|
||||
var bottomLeft = 7;
|
||||
|
||||
/** The bottom middle of the page */
|
||||
var bottom = 8;
|
||||
|
||||
/** The bottom right of the page */
|
||||
var bottomRight = 9;
|
||||
|
||||
/** The right hand side of the page, halfway down */
|
||||
var right = 10;
|
||||
|
||||
/** Diagonal, bottom left to top right */
|
||||
var diagonal = 11;
|
||||
|
||||
/** Diagonal, top left to bottom right */
|
||||
var reversediagonal = 12;
|
||||
|
||||
/** Positions on the page. Used for scaling about a point, and adding text.
|
||||
|
||||
A position is an anchor and zero or one or two parameters. Constructors are provided.
|
||||
|
||||
posCentre: Two parameters, x and y
|
||||
posLeft: Two parameters, x and y
|
||||
posRight: Two parameters, x and y
|
||||
top: One parameter - distance from top
|
||||
topLeft: One parameter - distance from top left
|
||||
topRight: One parameter - distance from top right
|
||||
left: One parameter - distance from left middle
|
||||
bottomLeft: One parameter - distance from bottom left
|
||||
bottom: One parameter - distance from bottom
|
||||
bottomRight: One parameter - distance from bottom right
|
||||
right: One parameter - distance from right
|
||||
diagonal: Zero parameters
|
||||
reverseDiagonal: Zero parameters */
|
||||
function Position(anchor, p1, p2)
|
||||
|
||||
|
||||
// Fonts
|
||||
|
||||
/** Times Roman */
|
||||
var timesRoman = 0;
|
||||
|
||||
/** Times Bold */
|
||||
var timesBold = 1;
|
||||
|
||||
/** Times Italic */
|
||||
var timesItalic = 2;
|
||||
|
||||
/** Times Bold Italic */
|
||||
var timesBoldItalic = 3;
|
||||
|
||||
/** Helvetica */
|
||||
var helvetica = 4;
|
||||
|
||||
/** Helvetica Bold */
|
||||
var helveticaBold = 5;
|
||||
|
||||
/** Helvetica Oblique */
|
||||
var helveticaOblique = 6;
|
||||
|
||||
/** Helvetica Bold Oblique */
|
||||
var helveticaBoldOblique = 7;
|
||||
|
||||
/** Courier */
|
||||
var courier = 8;
|
||||
|
||||
/** Courier Bold */
|
||||
var courierBold = 9;
|
||||
|
||||
/** Courier Oblique */
|
||||
var courierOblique = 10;
|
||||
|
||||
/** Courier Bold Oblique */
|
||||
var courierBoldOblique = 11;
|
||||
|
||||
|
||||
// Justification types
|
||||
|
||||
/** Left justify */
|
||||
var leftJustify = 0;
|
||||
|
||||
/** Centre justify */
|
||||
var centreJustify = 1;
|
||||
|
||||
/** Right justify */
|
||||
var rightJustify = 2;
|
||||
|
||||
|
||||
/// Page layouts
|
||||
|
||||
/** Single page */
|
||||
var singlePage = 0;
|
||||
|
||||
/** One column */
|
||||
var oneColumn = 1;
|
||||
|
||||
/** Two column left */
|
||||
var twoColumnLeft = 2;
|
||||
|
||||
/** Two column right */
|
||||
var twoColumnRight = 3;
|
||||
|
||||
/** Two page left */
|
||||
var twoPageLeft = 4;
|
||||
|
||||
/** Two page right */
|
||||
var twoPageRight = 5;
|
||||
|
||||
|
||||
// Page modes
|
||||
|
||||
/** Use none */
|
||||
var useNone = 0;
|
||||
|
||||
/** Use outlines */
|
||||
var useOutlines = 1;
|
||||
|
||||
/** Use thumbs */
|
||||
var useThumbs = 2;
|
||||
|
||||
/** Use OC */
|
||||
var useOC = 3;
|
||||
|
||||
/** Use attachments */
|
||||
var useAttachments = 4;
|
||||
|
||||
|
||||
// Page label styles
|
||||
|
||||
/** 1, 2, 3... */
|
||||
var decimalArabic = 0;
|
||||
|
||||
/** I, II, III... */
|
||||
var uppercaseRoman = 1;
|
||||
|
||||
/** i, ii, iii... */
|
||||
var lowercaseRoman = 2;
|
||||
|
||||
/** A, B, C... */
|
||||
var uppercaseLetters = 3;
|
||||
|
||||
/** a, b, c... */
|
||||
var lowercaseLetters = 4;
|
||||
|
Reference in New Issue
Block a user