summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/media9/pdfbase.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-08 22:36:42 +0000
committerKarl Berry <karl@freefriends.org>2016-11-08 22:36:42 +0000
commitf4fb1b6553fac548fb0aa84db12e2ea648780b2a (patch)
tree82accad128ec478503d8aeac750a1c6f447f057a /Master/texmf-dist/tex/latex/media9/pdfbase.sty
parent78fd3f4c3fbb93e7faa5adb5c0183df7c41b676b (diff)
media9 (8nov16)
git-svn-id: svn://tug.org/texlive/trunk@42468 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/media9/pdfbase.sty')
-rw-r--r--Master/texmf-dist/tex/latex/media9/pdfbase.sty48
1 files changed, 28 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
index c01bb2b2076..18d5beecb00 100644
--- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty
+++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
@@ -121,15 +121,22 @@
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
-\RequirePackage{atbegshi}
\RequirePackage{atenddvi}
-\def\g@pbs@date@tl{2016/06/08}
-\def\g@pbs@version@tl{0.9}
+\def\g@pbs@date@tl{2016/11/08}
+\def\g@pbs@version@tl{0.10}
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
{driver independent access to low-level PDF features}
+\int_new:N\g@pbs@page@int %abs. page counter (zero based)
+
+%LaTeX2e wrapper
+\cs_new:Npn\pbs@seq@push@cx#1#2{
+ \seq_if_exist:cF{#1}{\seq_new:c{#1}}
+ \seq_gput_right:cx{#1}{#2}
+}
+
%wrong image file type for Image XObject generation
\msg_gset:nnn{pdfbase}{wrong~image~resource}{
Image~resource~file\\~~'#1'\\has~wrong~type.\\\\
@@ -289,30 +296,31 @@
\cs_new_nopar:Nn\pbs_pdfbdc:nn{
\pdfliteral~page~{#1/rm@oc\int_use:N\g_pbs_oc_int\space BDC}
- \tl_if_empty:NTF\g_pbs_ocmap_tl{
- \tl_gset:Nx\g_pbs_ocmap_tl{/rm@oc\int_use:N\g_pbs_oc_int\space#2}
- }{
- \tl_gput_right:Nx\g_pbs_ocmap_tl{~/rm@oc\int_use:N\g_pbs_oc_int\space#2}
- }
- \pbs_zap_properties:
- \group_begin:
- \tl_set:Nx\l_pbs_temp_tl{\group_end:
- \global\pdfpageresources{
- \the\pdfpageresources
- /Properties<<\g_pbs_ocmap_tl>>
- }
- }\l_pbs_temp_tl
+ \iow_shipout_x:Nx\@mainaux{\token_to_str:N\pbs@seq@push@cx{
+ pbs@props@\noexpand\the\g@pbs@page@int
+ }{/rm@oc\int_use:N\g_pbs_oc_int\space#2}}
\int_gincr:N\g_pbs_oc_int
}
- \tl_new:N\g_pbs_ocmap_tl
\cs_new_nopar:Nn\pbs_pdfemc:{\pdfliteral~page~{EMC}}
- %modify output routine to strip /Properties<<...>> from \pdfpageresources
- \AtBeginShipout{\tl_gclear:N\g_pbs_ocmap_tl}
+ %modify output routine to write /Properties<<...>> for current page
\tl_gset:Nx\g_pbs_output_tl{\the\output}
\global\output{
- \g_pbs_output_tl \tl_if_blank:VT\g_pbs_ocmap_tl{\pbs_zap_properties:}
+ \pbs_zap_properties: %purge those from previous page
+ \group_begin:
+ \tl_set:Nx\l_pbs_temp_tl{\group_end:
+ \global\pdfpageresources{
+ \the\pdfpageresources
+ /Properties<<\seq_if_exist:cT{pbs@props@\the\g@pbs@page@int}{
+ \seq_use:cn{pbs@props@\the\g@pbs@page@int}{~}
+ }>>
+ }
+ }\l_pbs_temp_tl
+ \g_pbs_output_tl
+ \int_gincr:N\g@pbs@page@int
+ %purge from current page's properties, because they aren't needed any longer
+ \pbs_zap_properties:
}
}{
%pgf + transparency related settings