-
Notifications
You must be signed in to change notification settings - Fork 5
/
ocproperties.pvt
60 lines (52 loc) · 1.1 KB
/
ocproperties.pvt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
\PassOptionsToPackage{enable-debug,check-declarations}{expl3}
\RequirePackage[debug]{pdfmanagement}
\DeclareDocumentMetadata
{
pdfversion=1.7, %not so good with pdftex ...
lang=de-DE,
}
\RequirePackage{pdfmanagement-regressiontest}
\documentclass{article}
\ExplSyntaxOn
%some senseless additions to test the commands
\pdf_object_new:nn {ocg1}{dict}
\pdf_object_write:nn {ocg1}
{/Type/OCG
/Name(View)
/Usage
<<
/Print
<<
/PrintState/OFF
>>
/View
<<
/ViewState/ON
>>
>>}
\pdf_object_new:nn {ocg2}{dict}
\pdf_object_write:nn {ocg2}
{/Type/OCG
/Name(View)
/Usage<<
/Print
<<
/PrintState/ON
>>
/View<<
/ViewState/OFF
>>
>>
}
\pdf_object_new:nn {ocgd}{dict}
\pdf_object_write:nn {ocgd}
{
/OFF /Blabla
}
\pdfmanagement_add:nnx { Catalog / OCProperties } {OCGs}{\pdf_object_ref:n {ocg1}}
\pdfmanagement_add:nnx { Catalog / OCProperties } {OCGs}{\pdf_object_ref:n {ocg2}}
\pdfmanagement_add:nnx { Catalog / OCProperties } {D}{\pdf_object_ref:n {ocgd}}
\ExplSyntaxOff
\begin{document}
abc
\end{document}