Download FileOpen WebPublisher3

Transcript
permNone: no permission (the document can't be opened!) : 0 or n[one]. If 'none' is used it
must not contain spaces (‘n o’ would generate an error)
permOpen: the document can be opened: 1 or 0x0001 or o[pen]
permPrint: the document can be printed: 4 or 0x0004 or p[rint]
permCopy: parts of the documents can be copied: 16 or 0x0010 or c[opy]
permSave: the document can be saved: 64 or 0x0040 or s[ave]
This value should be provided as an integer. The value of the integer is derived from, and ultimately is
translated back into, a binary value in which each bit is interpreted as a flag. The integer values are
those used by the Adobe Acrobat application itself, which are:
Bit in perm
Permission to
Signif. Char.
Decimal value
Hexa. value
Bit 0
Open
'o'
1
0x01
Bit 1
Bit 2
Print
'p'
4
0x04
Reserved
So if you want:
Bit
Name
No perm
Open
Print
Copy
Save
Open & Print
Open & Copy
Open & Save
Print & Save
……..
Open & Print & Save
………..
Open & Print & Copy & Save
Bit 3
Edit
Bit 4
Copy
'c'
16
0x10
8
0x08
Bit 5
EditNotes
32
0x20
Bit 6
Save
's'
64
0x40
….
Reserved
0
Open
0
1
0
0
0
1
1
1
0
2
Print
0
0
1
0
0
1
0
0
1
4
Copy
0
0
0
1
0
0
1
0
0
6
Save
0
0
0
0
1
0
0
1
1
Value of perm
Hex
Decimal
0x00
0
0x01
1
0x04
4
0x10
16
0x40
64
0x05
5
0x11
17
0x41
65
0x44
68
1
1
0
1
0x45
69
1
1
1
1
0x55
85
You may also use the the pdPerms values as defined in the Acrobat SDK, as follows:
Acrobat Internal Value
Code
#define pdPermOpen
#define pdPermPrint
#define pdPermEdit
#define pdPermCopy
#define pdPermEditNote
#define pdPermSave
(1 << 0)
(1 << 2)
(1 << 3)
(1 << 4)
(1 << 5)
(1 << 6)
Letter Decimal
'o'
'p'
'e'
'c'
'n'
's'
1,
4,
8,
16,
32,
64,
Hex
0x01
0x04
0x08
0x10
0x20
0x40
Action
Open permission
Print permission
Edit permission
Copy permission
Edit note permission
Save permission
In this mode you may build a permission structure either by:
- adding the values: my_perm = pdPermOpen + pdPermCopy
- or
- logically ORing them: my_perm = pdPermOpen | pdPermCopy
NOTE: If the pdPermOpen bit is not set, the document will not be opened.
A complete list of Perms values is provided in the Appendix to this document.
FileOpen WebPublisher3
User Manual Version 3.1.8
June 25, 2007
page 40