Change default to use CropBox rather than MediaBox. 1.23.4
authorTor Andersson <[email protected]>
Thu, 28 Sep 2023 14:47:23 +0000 (16:47 +0200)
committerSebastian Rasmussen <[email protected]>
Tue, 10 Oct 2023 16:19:21 +0000 (18:19 +0200)
platform/gl/gl-main.c
platform/java/src/com/artifex/mupdf/fitz/Page.java
source/fitz/document.c
source/tools/muconvert.c
source/tools/mudraw.c
source/tools/murun.c
source/tools/pdftrim.c

index 73247515ed0946a4fb8353038799e7368adc3ce7..b2eb0a48eb5b4bd2919646b24040ca6606ab30af 100644 (file)
@@ -212,7 +212,7 @@ static int console_h = 14; /* to be scaled by lineheight */
 static int outline_start_x = 0;
 static int console_start_y = 0;
 
-static int oldbox = FZ_MEDIA_BOX, currentbox = FZ_MEDIA_BOX;
+static int oldbox = FZ_CROP_BOX, currentbox = FZ_CROP_BOX;
 static int oldtint = 0, currenttint = 0;
 static int oldinvert = 0, currentinvert = 0;
 static int oldicc = 1, currenticc = 1;
index 350e75c6401b7d188d2883206ff281a44532bdf0..e4b464636f769c4f5dc5e253ffdcc671897d6b74 100644 (file)
@@ -54,7 +54,7 @@ public class Page
        }
 
        public Rect getBounds() {
-               return getBoundsNative(Page.MEDIA_BOX);
+               return getBoundsNative(Page.CROP_BOX);
        }
 
        public native void run(Device dev, Matrix ctm, Cookie cookie);
index 1385b73b465ea0051e6c969f657df0ff83372809..42246f59e2701e93af4e6826aefc499447e52df2 100644 (file)
@@ -685,7 +685,7 @@ fz_rect
 fz_bound_page(fz_context *ctx, fz_page *page)
 {
        if (page && page->bound_page)
-               return page->bound_page(ctx, page, FZ_MEDIA_BOX);
+               return page->bound_page(ctx, page, FZ_CROP_BOX);
        return fz_empty_rect;
 }
 
index 760a57d0935b4a92e0c610c80a206bfc4927aa12..9357d3b889527e1f48486983d2f09f20998daf42 100644 (file)
@@ -46,7 +46,7 @@ static const char *options = "";
 static fz_context *ctx;
 static fz_document *doc;
 static fz_document_writer *out;
-static fz_box_type page_box = FZ_MEDIA_BOX;
+static fz_box_type page_box = FZ_CROP_BOX;
 static int count;
 
 static int usage(void)
index fd0e922e575208364a35f9fb7c26c6144939eae4..413f9cb8461cb04c83fadcd57f0932c11bccafe6 100644 (file)
@@ -309,7 +309,7 @@ static int res_specified = 0;
 static int width = 0;
 static int height = 0;
 static int fit = 0;
-static int page_box = FZ_MEDIA_BOX;
+static int page_box = FZ_CROP_BOX;
 
 static float layout_w = FZ_DEFAULT_LAYOUT_W;
 static float layout_h = FZ_DEFAULT_LAYOUT_H;
index e6f06f3f7e30d9969a1a921a363b0292f826e99d..173d424a4414ebf5e3a5f64e9edbde766bbeb9c8 100644 (file)
@@ -7835,7 +7835,7 @@ static void ffi_PDFPage_toPixmap(js_State *J)
        int extra = js_isdefined(J, 4) ? js_toboolean(J, 4) : 1;
        const char *usage = js_isdefined(J, 5) ? js_tostring(J, 5) : "View";
        const char *box_name = js_isdefined(J, 6) ? js_tostring(J, 6) : NULL;
-       fz_box_type box = FZ_MEDIA_BOX;
+       fz_box_type box = FZ_CROP_BOX;
        fz_pixmap *pixmap = NULL;
 
        if (box_name) {
index 27852c0109333b820adaf1f56217ddba5af899d0..d1ead9f0db171e1e8664161082f15274111a2c39 100644 (file)
@@ -186,7 +186,7 @@ int pdftrim_main(int argc, char **argv)
        int code = EXIT_SUCCESS;
        int exclude = 0;
        const char *boxname = NULL;
-       fz_box_type box = FZ_MEDIA_BOX;
+       fz_box_type box = FZ_CROP_BOX;
        int fallback = 0;
        float margins[4] = { 0 };
        int c;