more
This commit is contained in:
parent
588f265a8c
commit
ca1e09700d
2
Changes
2
Changes
|
@ -26,7 +26,7 @@ o Updated Yojson to remove dependency on Stream, ready for OCaml 5
|
||||||
o -typeset was opening files in text mode, instead of binary
|
o -typeset was opening files in text mode, instead of binary
|
||||||
o Fixed behaviour of -squeeze-no-pagedata / -squeeze-no-recompress
|
o Fixed behaviour of -squeeze-no-pagedata / -squeeze-no-recompress
|
||||||
o Significant improvements to malformed file reading
|
o Significant improvements to malformed file reading
|
||||||
|
o Removed unfinished -revisions from years ago
|
||||||
|
|
||||||
2.5.1 (January 2022)
|
2.5.1 (January 2022)
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,6 @@ type op =
|
||||||
| AddPageLabels
|
| AddPageLabels
|
||||||
| RemovePageLabels
|
| RemovePageLabels
|
||||||
| PrintPageLabels
|
| PrintPageLabels
|
||||||
| Revisions
|
|
||||||
| RemoveDictEntry of string
|
| RemoveDictEntry of string
|
||||||
| ReplaceDictEntry of string
|
| ReplaceDictEntry of string
|
||||||
| PrintDictEntry of string
|
| PrintDictEntry of string
|
||||||
|
@ -324,7 +323,6 @@ let string_of_op = function
|
||||||
| AddPageLabels -> "AddPageLabels"
|
| AddPageLabels -> "AddPageLabels"
|
||||||
| RemovePageLabels -> "RemovePageLabels"
|
| RemovePageLabels -> "RemovePageLabels"
|
||||||
| PrintPageLabels -> "PrintPageLabels"
|
| PrintPageLabels -> "PrintPageLabels"
|
||||||
| Revisions -> "Revisions"
|
|
||||||
| RemoveDictEntry _ -> "RemoveDictEntry"
|
| RemoveDictEntry _ -> "RemoveDictEntry"
|
||||||
| ReplaceDictEntry _ -> "ReplaceDictEntry"
|
| ReplaceDictEntry _ -> "ReplaceDictEntry"
|
||||||
| ListSpotColours -> "ListSpotColours"
|
| ListSpotColours -> "ListSpotColours"
|
||||||
|
@ -816,7 +814,7 @@ performed is checked to see if it's allowable under the permissions regime. *)
|
||||||
bans list in the input file, the operation cannot proceed. Other operations
|
bans list in the input file, the operation cannot proceed. Other operations
|
||||||
cannot proceed at all without owner password. *)
|
cannot proceed at all without owner password. *)
|
||||||
let banned banlist = function
|
let banned banlist = function
|
||||||
| Fonts | Info | Metadata | PageInfo | Revisions | CountPages
|
| Fonts | Info | Metadata | PageInfo | CountPages
|
||||||
| ListAttachedFiles | ListAnnotations
|
| ListAttachedFiles | ListAnnotations
|
||||||
| ListBookmarks | ImageResolution _ | MissingFonts
|
| ListBookmarks | ImageResolution _ | MissingFonts
|
||||||
| PrintPageLabels | Clean | Compress | Decompress
|
| PrintPageLabels | Clean | Compress | Decompress
|
||||||
|
@ -2578,9 +2576,6 @@ and specs =
|
||||||
("-pages",
|
("-pages",
|
||||||
Arg.Unit (setop CountPages),
|
Arg.Unit (setop CountPages),
|
||||||
" Count pages");
|
" Count pages");
|
||||||
("-revisions",
|
|
||||||
Arg.Unit (setop Revisions),
|
|
||||||
"");
|
|
||||||
("-list-attached-files",
|
("-list-attached-files",
|
||||||
Arg.Unit (setop ListAttachedFiles),
|
Arg.Unit (setop ListAttachedFiles),
|
||||||
" List attached files");
|
" List attached files");
|
||||||
|
@ -3534,18 +3529,6 @@ let go () =
|
||||||
output_page_count pdf
|
output_page_count pdf
|
||||||
| _ -> raise (Arg.Bad "CountPages: must have a single input file only")
|
| _ -> raise (Arg.Bad "CountPages: must have a single input file only")
|
||||||
end
|
end
|
||||||
| Some Revisions ->
|
|
||||||
let input =
|
|
||||||
match args.inputs with
|
|
||||||
(InFile inname, _, _, _, _, _)::_ -> Pdfio.input_of_channel (open_in_bin inname)
|
|
||||||
| (StdIn, _, _, _, _, _)::_ -> Pdfio.input_of_channel stdin
|
|
||||||
| _ -> raise (Arg.Bad "Revisions: must be a filename or stdin")
|
|
||||||
in
|
|
||||||
begin try
|
|
||||||
Printf.printf "%i\n%!" (Pdfread.revisions input)
|
|
||||||
with
|
|
||||||
_ -> soft_error "Malformed XRef table. Cannot determine number of revisions."
|
|
||||||
end
|
|
||||||
| Some Clean ->
|
| Some Clean ->
|
||||||
let pdf' = get_single_pdf (Some Clean) false in
|
let pdf' = get_single_pdf (Some Clean) false in
|
||||||
write_pdf false pdf'
|
write_pdf false pdf'
|
||||||
|
|
Loading…
Reference in New Issue