From 68a57fa99b9f4d81ea136009b34163f96afb4f2a Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 11 Jan 2023 13:25:08 +0800 Subject: [PATCH] more --- cpdfcommand.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index e7d283c..b349e93 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1957,7 +1957,11 @@ let jpeg_of_input i = let w = match Pdf.lookup_direct pdf "/Width" obj with Some x -> Pdf.getnum pdf x | _ -> assert false in let h = match Pdf.lookup_direct pdf "/Height" obj with Some x -> Pdf.getnum pdf x | _ -> assert false in let page = - {Pdfpage.content = []; + {Pdfpage.content = + [Pdfops.stream_of_ops + [Pdfops.Op_cm (Pdftransform.matrix_of_transform [Pdftransform.Translate (0., 0.); + Pdftransform.Scale ((0., 0.), w, h)]); + Pdfops.Op_Do "/Im0"]]; Pdfpage.mediabox = Pdf.Array [Pdf.Real 0.; Pdf.Real 0.; Pdf.Real w; Pdf.Real h]; Pdfpage.resources = Pdf.Dictionary