diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-07-29 07:55:46 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-07-29 07:55:46 +0000 |
commit | 27fc7a0d25846cf7130d8e787cbc3b73e86b5458 (patch) | |
tree | 9a04cc8e8a613fc04960b99e59193fbdc72397ab /Build/source/texk/dvipdfm-x/pdfdoc.c | |
parent | 040e9946c2e0735e6dddc49306d1b0c843828eff (diff) |
texk/dvipdfm-x: Make dvipdfmx and xdvipdfmx essentially the same
git-svn-id: svn://tug.org/texlive/trunk@37988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfdoc.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdoc.c | 50 |
1 files changed, 20 insertions, 30 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.c b/Build/source/texk/dvipdfm-x/pdfdoc.c index e6beb5c83ae..2c975080a6c 100644 --- a/Build/source/texk/dvipdfm-x/pdfdoc.c +++ b/Build/source/texk/dvipdfm-x/pdfdoc.c @@ -1064,32 +1064,28 @@ pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, goto error; } -#ifdef XETEX if (PageBox == 0) { if (crop_box) box = crop_box; - else - if (!(box = media_box) && - !(box = bleed_box) && - !(box = trim_box) && - art_box) { - box = art_box; - } -#else -/* - Backward compatibility -*/ - if (PageBox == 0) { - if (crop_box) - box = crop_box; - else - if (!(box = art_box) && - !(box = trim_box) && - !(box = bleed_box) && - media_box) { - box = media_box; + else { + if (is_xdv) { + /* New scheme only for XDV files */ + if (!(box = media_box) && + !(box = bleed_box) && + !(box = trim_box) && + art_box) { + box = art_box; + } + } else { + /* Backward compatibility */ + if (!(box = art_box) && + !(box = trim_box) && + !(box = bleed_box) && + media_box) { + box = media_box; + } } -#endif + } } else if (PageBox == 1) { if (crop_box) box = crop_box; @@ -1177,14 +1173,8 @@ pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, pdf_release_obj(tmp); } -#ifdef XETEX - if (medbox) { -#else -/* - Backward compatibility -*/ - if (medbox && PageBox) { -#endif + /* New scheme only for XDV files */ + if (medbox && (!is_xdv || PageBox)) { for (i = 4; i--; ) { double x; pdf_obj *tmp = pdf_deref_obj(pdf_get_array(medbox, i)); |