This commit is contained in:
John Whitington 2021-10-25 16:26:30 +01:00
parent e27eb54cfd
commit b93b230fa4
3 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,7 @@ OCAMLLDFLAGS = -g
all : native-code native-code-library byte-code-library top htdoc all : native-code native-code-library byte-code-library top htdoc
clean :: clean ::
rm -rf doc foo foo2 out.pdf out2.pdf foo.pdf *.cmt *.cmti *.json rm -rf doc foo foo2 out.pdf out2.pdf foo.pdf *.cmt *.cmti *.json debug/*.pdf
DOC_FILES = cpdferror.mli cpdfjson.mli cpdfstrftime.mli cpdfcoord.mli \ DOC_FILES = cpdferror.mli cpdfjson.mli cpdfstrftime.mli cpdfcoord.mli \
cpdfattach.mli cpdfpagespec.mli cpdfposition.mli cpdf.mli \ cpdfattach.mli cpdfpagespec.mli cpdfposition.mli cpdf.mli \

View File

@ -2977,14 +2977,17 @@ let twoup fast pdf =
let endpage = Pdfpage.endpage pdf in let endpage = Pdfpage.endpage pdf in
let all = ilist 1 endpage in let all = ilist 1 endpage in
let pdf = scale_pdf ~fast (many (sc, sc) endpage) pdf all in let pdf = scale_pdf ~fast (many (sc, sc) endpage) pdf all in
Pdfwrite.pdf_to_file pdf "scaled.pdf";
let pdf = let pdf =
impose impose
~x:2. ~y:1. ~fit:false ~columns:false ~rtl:false ~btt:false ~center:true ~x:2. ~y:1. ~fit:false ~columns:false ~rtl:false ~btt:false ~center:true
~margin:0. ~spacing:0. ~linewidth:0. ~fast pdf ~margin:0. ~spacing:0. ~linewidth:0. ~fast pdf
in in
Pdfwrite.pdf_to_file pdf "imposed.pdf";
let endpage = Pdfpage.endpage pdf in let endpage = Pdfpage.endpage pdf in
let all = ilist 1 endpage in let all = ilist 1 endpage in
let pdf = upright all (rotate_pdf ~-90 pdf all) in let pdf = upright all (rotate_pdf ~-90 pdf all) in
Pdfwrite.pdf_to_file pdf "uprighted.pdf";
scale_to_fit_pdf ~fast Cpdfposition.Diagonal 1. (many (width, height) endpage) () pdf all scale_to_fit_pdf ~fast Cpdfposition.Diagonal 1. (many (width, height) endpage) () pdf all
(* \section{Output info} *) (* \section{Output info} *)

1
debug/README.md Normal file
View File

@ -0,0 +1 @@
For placing temporary debug PDF files. Cleaned by make clean.