diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/contrib/patches/patch-ebb-artbox.diff')
-rw-r--r-- | Build/source/texk/xdvipdfmx/contrib/patches/patch-ebb-artbox.diff | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/Build/source/texk/xdvipdfmx/contrib/patches/patch-ebb-artbox.diff b/Build/source/texk/xdvipdfmx/contrib/patches/patch-ebb-artbox.diff deleted file mode 100644 index 7c9ff45c660..00000000000 --- a/Build/source/texk/xdvipdfmx/contrib/patches/patch-ebb-artbox.diff +++ /dev/null @@ -1,103 +0,0 @@ ---- ebb.c.orig Fri Jun 29 04:55:26 2001 -+++ ebb.c Tue Dec 2 11:48:16 2003 -@@ -40,7 +40,7 @@ - #endif - - #define EBB_PROGRAM "ebb" --#define EBB_VERSION "Version 0.5.2" -+#define EBB_VERSION "Version 0.5.2 (+ArtBox)" - - static void usage (void) - { -@@ -51,11 +51,13 @@ - fprintf (stderr, "under certain conditions. Details are distributed with the software.\n"); - fprintf (stderr, "\nUsage: [-v] [-b] ebb [files]\n"); - fprintf (stderr, "\t-b\t\tWrite .bb file in binary mode\n"); -+ fprintf (stderr, "\t-c\t\tUse MediaBox/CropBox for BoundingBox. (PDF)\n"); - fprintf (stderr, "\t-v\t\tVerbose\n"); - exit(1); - } - - static char verbose = 0; -+static char compat = 0; - - static void do_time(FILE *file) - { -@@ -189,7 +191,7 @@ - - void do_pdf (FILE *file, char *filename) - { -- pdf_obj *trailer, *catalog, *page_tree, *media_box, *crop_box; -+ pdf_obj *trailer, *catalog, *page_tree, *media_box, *crop_box, *rotate; - pdf_obj *kids_ref, *kids, *tmp1; - if (verbose) { - fprintf (stderr, "%s looks like a PDF file...", filename); -@@ -211,6 +213,7 @@ - /* Media box can be inherited so start looking for it now */ - media_box = pdf_deref_obj (pdf_lookup_dict (page_tree, "MediaBox")); - crop_box = pdf_deref_obj (pdf_lookup_dict (page_tree, "CropBox")); -+ rotate = pdf_deref_obj(pdf_lookup_dict(page_tree, "Rotate")); - while ((kids_ref = pdf_lookup_dict (page_tree, "Kids")) != NULL) { - kids = pdf_deref_obj (kids_ref); - pdf_release_obj (page_tree); -@@ -228,15 +231,43 @@ - pdf_release_obj (crop_box); - if (tmp1) - crop_box = tmp1; -+ tmp1 = pdf_deref_obj(pdf_lookup_dict(page_tree, "Rotate")); -+ if (tmp1 && rotate) -+ pdf_release_obj (rotate); -+ if (tmp1) -+ rotate = tmp1; - } -+ -+ if (crop_box) { -+ pdf_release_obj(media_box); -+ media_box = crop_box; -+ } -+ -+ if (!compat) { -+ pdf_obj *tmp; -+ -+ if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "TrimBox")))) { -+ if (media_box) -+ pdf_release_obj(media_box); -+ media_box = tmp; -+ } -+ if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "BleedBox")))) { -+ if (media_box) -+ pdf_release_obj(media_box); -+ media_box = tmp; -+ } -+ if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "ArtBox")))) { -+ if (media_box) -+ pdf_release_obj(media_box); -+ media_box = tmp; -+ } -+ if (rotate && pdf_number_value(rotate) != 0.0) -+ fprintf(stderr, "\n<< /Rotate %d >> found.\n", (int)pdf_number_value(rotate)); -+ } -+ - /* At this point, we should have the media box for the first page */ - { - pdf_obj *bbllx, *bblly, *bburx, *bbury; -- if (crop_box) { -- pdf_release_obj (media_box); -- media_box = crop_box; -- crop_box = NULL; -- } - if ((bbllx = pdf_get_array (media_box, 0)) == NULL || - (bblly = pdf_get_array (media_box, 1)) == NULL || - (bburx = pdf_get_array (media_box, 2)) == NULL || -@@ -267,6 +298,11 @@ - bb_file_mode = FOPEN_WBIN_MODE; - case 'v': - verbose = 1; -+ argc -= 1; -+ argv += 1; -+ break; -+ case 'c': -+ compat = 1; - argc -= 1; - argv += 1; - break; |