diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-29 20:35:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-29 20:35:48 +0000 |
commit | 3b7862a995975696a6ff97afa58c1ff5ac6693c2 (patch) | |
tree | 25b8fb62d48b4e6959939239bda1fea184235f19 /Master/texmf-dist/tex/latex/media9/pdfbase.sty | |
parent | 05ad878615ce98b655e8db03dc4cd7559ae81f55 (diff) |
media9 (29jul21)
git-svn-id: svn://tug.org/texlive/trunk@60110 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.sty | 118 |
1 files changed, 72 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty index 61397e2a150..b61b8b56aac 100644 --- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty +++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty @@ -158,12 +158,12 @@ \RequirePackage{l3keys2e} -\def\g@pbs@date@tl{2021/07/28} -\def\g@pbs@version@tl{0.49} +\def\g@pbs@date@tl{2021/07/29} +\def\g@pbs@version@tl{0.50} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl} -{driver independent access to low-level PDF features} +{driver~independent~access~to~low-level~PDF~features} \int_new:N\g_pbs_page_int %abs. page counter @@ -1083,13 +1083,19 @@ }{ \tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}} } - %store dimensions in "dots" units (DPI) + %store content dimensions in DPI units (Dots) \tl_set:Nx\l_pbs_width_tl{ - \dim_to_decimal:n{\box_wd:N#5}~72.27~div~Resolution~mul~} + \dim_to_decimal_in_sp:n{\box_wd:N#5}~65536~div~72.27~div~DVImag~mul~ + Resolution~mul~ + } \tl_set:Nx\l_pbs_height_tl{ - \dim_to_decimal:n{\box_ht:N#5}~72.27~div~VResolution~mul~} + \dim_to_decimal_in_sp:n{\box_ht:N#5}~65536~div~72.27~div~DVImag~mul~ + VResolution~mul~ + } \tl_set:Nx\l_pbs_depth_tl{ - \dim_to_decimal:n{\box_dp:N#5}~72.27~div~VResolution~mul~} + \dim_to_decimal_in_sp:n{\box_dp:N#5}~65536~div~72.27~div~DVImag~mul~ + VResolution~mul~ + } %additional dict entries \tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl \pbs_special:n{ @@ -1122,29 +1128,36 @@ %distill graphics to XObject mark~ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~ - /BBox~[ - isls { - landplus90 { - % geometry with landscape - \l_pbs_height_tl~neg~\l_pbs_width_tl~\l_pbs_depth_tl~0 + /BBox~[ % rotated BBoxes; o = reference point = origin (0,0), + isls { % x = top-left page corner, vert. coord downwards positive + landplus90 { % x----o-+ + % geometry with landscape | | | + \l_pbs_height_tl~neg~ % llx | | | + \l_pbs_width_tl~ % lly | | | + \l_pbs_depth_tl~0 % urx ury +----+-+ }{ - % landscape as class option - \l_pbs_depth_tl~neg~0~\l_pbs_height_tl~\l_pbs_width_tl~neg - } ifelse + % landscape as class option x-+----+ + \l_pbs_depth_tl~neg~0~ % llx lly | | | + \l_pbs_height_tl~ % urx | | | + \l_pbs_width_tl~neg % ury | | | + } ifelse % +-o----+ }{ - % portrait - 0~\l_pbs_height_tl~\l_pbs_width_tl~\l_pbs_depth_tl~neg - } ifelse - ] + % portrait x----------+ + 0~\l_pbs_height_tl~ % llx lly | | + \l_pbs_width_tl~ % urx o----------+ + \l_pbs_depth_tl~neg % ury | | + } ifelse % | | + ] % +----------+ %insert additional dict entries (the Distiller way) \str_if_eq:eeF{\l_tmpa_tl}{}{ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~ } /BP~pdfmark~grestore~ - % content transformations required for appearances - { - pbs@curx~pbs@cury~2~copy~translate~1~-1~scale~ - isls {90~landplus90 {neg} if~rotate} if~ + % content transformations required for appearances, cf. BBox + { % orientations above + pbs@curx~pbs@cury~2~copy~translate~1~ + -1~scale~ % upside-down (mirrored) + isls {90~landplus90 {neg} if~rotate} if~ % rotated neg~exch~neg~exch~translate }?pdfmark } @@ -1509,8 +1522,8 @@ \RequirePackage{l3keys2e} -\def\g@pbs@date@tl{2021/07/28} -\def\g@pbs@version@tl{0.49} +\def\g@pbs@date@tl{2021/07/29} +\def\g@pbs@version@tl{0.50} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl} @@ -1607,7 +1620,7 @@ \bool_if:NF\g_pbs_dvisvgm_bool{\bool_gset_true:N\g_pbs_dvipdfmx_bool} } -% writing to core objects in the PDF, using the new +% writing to core objects in the PDF, using the new % pdfmanagement interface \cs_new_protected_nopar:Nn\pbs_appendtofields:n{ \pdfmanagement_add:nnx{Catalog/AcroForm}{Fields}{#1} @@ -2384,13 +2397,19 @@ }{ \tl_use:c{scale_{pbs@obj\int_use:N\g_pbs_obj_int}} } - %store dimensions (in "dots" units) + %store content dimensions in DPI units (Dots) \tl_set:Nx\l_pbs_width_tl{ - \dim_to_decimal:n{\box_wd:N#5}~72.27~div~Resolution~mul~} + \dim_to_decimal_in_sp:n{\box_wd:N#5}~65536~div~72.27~div~DVImag~mul~ + Resolution~mul~ + } \tl_set:Nx\l_pbs_height_tl{ - \dim_to_decimal:n{\box_ht:N#5}~72.27~div~VResolution~mul~} + \dim_to_decimal_in_sp:n{\box_ht:N#5}~65536~div~72.27~div~DVImag~mul~ + VResolution~mul~ + } \tl_set:Nx\l_pbs_depth_tl{ - \dim_to_decimal:n{\box_dp:N#5}~72.27~div~VResolution~mul~} + \dim_to_decimal_in_sp:n{\box_dp:N#5}~65536~div~72.27~div~DVImag~mul~ + VResolution~mul~ + } %additional dict entries \tl_set:Nx\l_tmpa_tl{#4} \tl_trim_spaces:N\l_tmpa_tl \pbs_special:n{ @@ -2423,29 +2442,36 @@ %distill graphics to XObject mark~ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~ - /BBox~[ - isls { - landplus90 { - % geometry with landscape - \l_pbs_height_tl~neg~\l_pbs_width_tl~\l_pbs_depth_tl~0 + /BBox~[ % rotated BBoxes; o = reference point = origin (0,0), + isls { % x = top-left page corner, vert. coord downwards positive + landplus90 { % x----o-+ + % geometry with landscape | | | + \l_pbs_height_tl~neg~ % llx | | | + \l_pbs_width_tl~ % lly | | | + \l_pbs_depth_tl~0 % urx ury +----+-+ }{ - % landscape as class option - \l_pbs_depth_tl~neg~0~\l_pbs_height_tl~\l_pbs_width_tl~neg - } ifelse + % landscape as class option x-+----+ + \l_pbs_depth_tl~neg~0~ % llx lly | | | + \l_pbs_height_tl~ % urx | | | + \l_pbs_width_tl~neg % ury | | | + } ifelse % +-o----+ }{ - % portrait - 0~\l_pbs_height_tl~\l_pbs_width_tl~\l_pbs_depth_tl~neg - } ifelse - ] + % portrait x----------+ + 0~\l_pbs_height_tl~ % llx lly | | + \l_pbs_width_tl~ % urx o----------+ + \l_pbs_depth_tl~neg % ury | | + } ifelse % | | + ] % +----------+ %insert additional dict entries (the Distiller way) \str_if_eq:eeF{\l_tmpa_tl}{}{ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~ } /BP~pdfmark~grestore~ - % content transformations required for appearances - { - pbs@curx~pbs@cury~2~copy~translate~1~-1~scale~ - isls {90~landplus90 {neg} if~rotate} if~ + % content transformations required for appearances, cf. BBox + { % orientations above + pbs@curx~pbs@cury~2~copy~translate~1~ + -1~scale~ % upside-down (mirrored) + isls {90~landplus90 {neg} if~rotate} if~ % rotated neg~exch~neg~exch~translate }?pdfmark } |