diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftex.defines | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftex.web | 13 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftoepdf.cc | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ptexlib.h | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/writeimg.c | 13 |
6 files changed, 38 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index bee0ed4b5f8..e528c30f958 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,13 @@ +2012-05-20 Thanh Han The <thanh@river-valley.org> + + * pdftex.defines (get/setimagegroupref): these replace imagegroupref. + * ptexlib.h: likewise. + * writeimg.c: define them, and check for page group + without object number. + * pdftex.web: change calls. + * pdftoepdf.cc: more page-group changes. + This is all related to http://bugs.debian.org/672951. + 2012-05-11 Peter Breitenlohner <peb@mppmu.mpg.de> * pdftex.web: Adapted to e-TeX Version 2.4. diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.defines b/Build/source/texk/web2c/pdftexdir/pdftex.defines index d21075556fe..620bbea80a5 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftex.defines +++ b/Build/source/texk/web2c/pdftexdir/pdftex.defines @@ -111,7 +111,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>. @define function imagerotate(); @define function imagepages(); @define function imagecolordepth(); -@define function imagegroupref(); +@define function getimagegroupref(); +@define procedure setimagegroupref(); @define function imagewidth(); @define function imagexres(); @define function imageyres(); diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web index 956514c239f..4c20f370c13 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftex.web +++ b/Build/source/texk/web2c/pdftexdir/pdftex.web @@ -36064,7 +36064,7 @@ begin pdf_append_list(pdf_ximage_objnum(p))(pdf_ximage_list); if not is_pdf_image(image) then begin if is_png_image(image) then begin - groupref := image_group_ref(image); + groupref := get_image_group_ref(image); if (groupref > 0) and (pdf_page_group_val = 0) then pdf_page_group_val := groupref; end; @@ -36079,9 +36079,14 @@ begin end else begin {for pdf images we generate the page group object number here} - groupref := image_group_ref(image); {this is only a flag whether page group is present} - if (groupref > 0) and (pdf_page_group_val = 0) then begin - pdf_page_group_val := pdf_new_objnum; + groupref := get_image_group_ref(image); {0: no group, -1: to be generated; >0: already written} + if (groupref <> 0) and (pdf_page_group_val = 0) then begin + if groupref = -1 then begin + pdf_page_group_val := pdf_new_objnum; + set_image_group_ref(image, pdf_page_group_val); + end + else { groupref > 0 } + pdf_page_group_val := groupref; end; pdf_print_real(ext_xn_over_d(pdf_width(p), ten_pow[6], img_w), 6); diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc index d1edb9dcee2..358b726f045 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc +++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc @@ -811,6 +811,8 @@ read_pdf_info(char *image_name, char *page_name, int page_num, epdf_has_page_group = 1; // only flag that page group is present; // the actual object number will be // generated in pdftex.web + else + epdf_has_page_group = 0; // no page group present pdf_doc->xref = pdf_doc->doc->getXRef(); return page_num; @@ -941,6 +943,8 @@ void write_epdf(void) if (pdfpagegroupval == 0) { // another pdf with page group was included earlier on the same page; // copy the Group entry as is + pdftex_warn + ("PDF inclusion: multiple pdfs with page group included in a single page"); pdf_newline(); pdf_puts("/Group "); copyObject(&dictObj); diff --git a/Build/source/texk/web2c/pdftexdir/ptexlib.h b/Build/source/texk/web2c/pdftexdir/ptexlib.h index 96b766c0472..c0dd1bb3bda 100644 --- a/Build/source/texk/web2c/pdftexdir/ptexlib.h +++ b/Build/source/texk/web2c/pdftexdir/ptexlib.h @@ -294,7 +294,8 @@ extern integer imagewidth(integer); extern integer imagexres(integer); extern integer imageyres(integer); extern integer imagecolordepth(integer); -extern integer imagegroupref(integer); +extern integer getimagegroupref(integer); +extern void setimagegroupref(integer,integer); extern integer readimage(strnumber, integer, strnumber, integer, integer, integer, integer); extern void deleteimage(integer); diff --git a/Build/source/texk/web2c/pdftexdir/writeimg.c b/Build/source/texk/web2c/pdftexdir/writeimg.c index d11559f88f9..846d4727875 100644 --- a/Build/source/texk/web2c/pdftexdir/writeimg.c +++ b/Build/source/texk/web2c/pdftexdir/writeimg.c @@ -150,11 +150,16 @@ integer imagecolordepth(integer img) } } -integer imagegroupref(integer img) +integer getimagegroupref(integer img) { return img_group_ref(img); } +void setimagegroupref(integer img, integer value) +{ + img_group_ref(img) = value; +} + /* Patch ImageTypeDetection 2003/02/08 by Heiko Oberdiek. @@ -322,7 +327,11 @@ integer readimage(strnumber s, integer page_num, strnumber page_name, pdf_ptr(img)->orig_y = bp2int(epdf_orig_y); pdf_ptr(img)->selected_page = page_num; pdf_ptr(img)->doc = epdf_doc; - img_group_ref(img) = epdf_has_page_group; + if (epdf_has_page_group == 1) + img_group_ref(img) = -1; // page group present, but new object + // number not set yet + else + img_group_ref(img) = 0; // no page group present break; case IMAGE_TYPE_PNG: img_pages(img) = 1; |