diff --git a/Makefile b/Makefile index 11f8fbe..7eee757 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ OCAMLLDFLAGS = -g all : native-code native-code-library byte-code-library top htdoc 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 \ cpdfattach.mli cpdfpagespec.mli cpdfposition.mli cpdf.mli \ diff --git a/cpdf.ml b/cpdf.ml index 5142a84..45887f8 100644 --- a/cpdf.ml +++ b/cpdf.ml @@ -2977,14 +2977,17 @@ let twoup fast pdf = let endpage = Pdfpage.endpage pdf in let all = ilist 1 endpage in let pdf = scale_pdf ~fast (many (sc, sc) endpage) pdf all in + Pdfwrite.pdf_to_file pdf "scaled.pdf"; let pdf = impose ~x:2. ~y:1. ~fit:false ~columns:false ~rtl:false ~btt:false ~center:true ~margin:0. ~spacing:0. ~linewidth:0. ~fast pdf in + Pdfwrite.pdf_to_file pdf "imposed.pdf"; let endpage = Pdfpage.endpage pdf in let all = ilist 1 endpage 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 (* \section{Output info} *) diff --git a/debug/README.md b/debug/README.md new file mode 100644 index 0000000..2dc005d --- /dev/null +++ b/debug/README.md @@ -0,0 +1 @@ +For placing temporary debug PDF files. Cleaned by make clean.