Working on plumbin -fast through two up and stamp (hence nobble)
This commit is contained in:
parent
42aaa374a2
commit
3df7a6817e
8
cpdf.ml
8
cpdf.ml
|
@ -3111,7 +3111,7 @@ let twoup_transforms mediabox =
|
||||||
|
|
||||||
(* Combine two pages into one throughout the document. The pages have already
|
(* Combine two pages into one throughout the document. The pages have already
|
||||||
had their objects renumbered so as not to clash.*)
|
had their objects renumbered so as not to clash.*)
|
||||||
let twoup_pages pdf = function
|
let twoup_pages fast pdf = function
|
||||||
| [] -> assert false
|
| [] -> assert false
|
||||||
| (h::_) as pages ->
|
| (h::_) as pages ->
|
||||||
let resources' =
|
let resources' =
|
||||||
|
@ -3163,7 +3163,7 @@ let twoup_stack_transforms mediabox =
|
||||||
[t0; t1]
|
[t0; t1]
|
||||||
|
|
||||||
(* FIXME: Add clipping, as for twoup, or merge these two functions properly *)
|
(* FIXME: Add clipping, as for twoup, or merge these two functions properly *)
|
||||||
let twoup_pages_stack pdf = function
|
let twoup_pages_stack fast pdf = function
|
||||||
| [] -> assert false
|
| [] -> assert false
|
||||||
| (h::_) as pages ->
|
| (h::_) as pages ->
|
||||||
let resources =
|
let resources =
|
||||||
|
@ -3219,9 +3219,9 @@ let f_twoup f_pages pdf =
|
||||||
(*print_changes changes;*)
|
(*print_changes changes;*)
|
||||||
Pdfpage.change_pages ~changes true pdf pages'
|
Pdfpage.change_pages ~changes true pdf pages'
|
||||||
|
|
||||||
let twoup pdf = f_twoup twoup_pages pdf
|
let twoup fast pdf = f_twoup (twoup_pages fast) pdf
|
||||||
|
|
||||||
let twoup_stack pdf = f_twoup twoup_pages_stack pdf
|
let twoup_stack fast pdf = f_twoup (twoup_pages_stack fast) pdf
|
||||||
|
|
||||||
(* \section{Output info} *)
|
(* \section{Output info} *)
|
||||||
let get_info raw pdf =
|
let get_info raw pdf =
|
||||||
|
|
9
cpdf.mli
9
cpdf.mli
|
@ -384,12 +384,13 @@ val remove_annotations : int list -> Pdf.t -> Pdf.t
|
||||||
(** {2 Imposition} *)
|
(** {2 Imposition} *)
|
||||||
|
|
||||||
(** The twoup_stack operation puts two logical pages on each physical page,
|
(** The twoup_stack operation puts two logical pages on each physical page,
|
||||||
rotating them 90 degrees to do so. The new mediabox is thus larger. *)
|
rotating them 90 degrees to do so. The new mediabox is thus larger. Bool true
|
||||||
val twoup_stack : Pdf.t -> Pdf.t
|
(fast) if assume well-formed ISO content streams. *)
|
||||||
|
val twoup_stack : bool -> Pdf.t -> Pdf.t
|
||||||
|
|
||||||
(** The twoup operation does the same, but scales the new sides down so that
|
(** The twoup operation does the same, but scales the new sides down so that
|
||||||
the media box is unchanged. *)
|
the media box is unchanged. Bool true (fast) if assume well-formed ISO content streams. *)
|
||||||
val twoup : Pdf.t -> Pdf.t
|
val twoup : bool -> Pdf.t -> Pdf.t
|
||||||
|
|
||||||
(** {2 Making new documents} *)
|
(** {2 Making new documents} *)
|
||||||
|
|
||||||
|
|
|
@ -4261,9 +4261,9 @@ let go () =
|
||||||
| Some RemoveBookmarks ->
|
| Some RemoveBookmarks ->
|
||||||
write_pdf false (Pdfmarks.remove_bookmarks (get_single_pdf args.op false))
|
write_pdf false (Pdfmarks.remove_bookmarks (get_single_pdf args.op false))
|
||||||
| Some TwoUp ->
|
| Some TwoUp ->
|
||||||
write_pdf false (Cpdf.twoup (get_single_pdf args.op false))
|
write_pdf false (Cpdf.twoup args.fast (get_single_pdf args.op false))
|
||||||
| Some TwoUpStack ->
|
| Some TwoUpStack ->
|
||||||
write_pdf false (Cpdf.twoup_stack (get_single_pdf args.op false))
|
write_pdf false (Cpdf.twoup_stack args.fast (get_single_pdf args.op false))
|
||||||
| Some (StampOn over) ->
|
| Some (StampOn over) ->
|
||||||
let overpdf =
|
let overpdf =
|
||||||
match over with
|
match over with
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
%FIXME: Document -bookmarks-open-to-level <n>
|
%FIXME: Document -bookmarks-open-to-level <n>
|
||||||
%FIXME: Explain in key places that you probably want UTF8 a lot
|
%FIXME: Explain in key places that you probably want UTF8 a lot
|
||||||
%FIXME: Document new -create-pdf functionality
|
%FIXME: Document new -create-pdf functionality
|
||||||
|
%FIXME: Explain fast more / better and list things it works on
|
||||||
|
|
||||||
\documentclass{book}
|
\documentclass{book}
|
||||||
\usepackage{palatino}
|
\usepackage{palatino}
|
||||||
|
|
Loading…
Reference in New Issue