more
This commit is contained in:
parent
c4768c9a92
commit
52dc0585c8
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# Build the cpdf command line tools and top level
|
# Build the cpdf command line tools and top level
|
||||||
MODS = cpdfyojson cpdfxmlm \
|
MODS = cpdfyojson cpdfxmlm \
|
||||||
cpdferror cpdfjson cpdfstrftime cpdfcoord cpdfattach \
|
cpdferror cpdfjson cpdfstrftime cpdfcoord cpdfattach \
|
||||||
cpdfpagespec cpdfposition cpdf cpdfcommand
|
cpdfpagespec cpdfposition cpdffont cpdf cpdfcommand
|
||||||
|
|
||||||
SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml
|
SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
(* Embed missing fonts with Ghostscript. *)
|
||||||
|
let embed_missing_fonts path_to_ghostscript gs_quiet fi fo =
|
||||||
|
if path_to_ghostscript = "" then begin
|
||||||
|
Printf.eprintf "Please supply path to gs with -gs\n%!";
|
||||||
|
exit 2
|
||||||
|
end;
|
||||||
|
let gscall =
|
||||||
|
path_to_ghostscript ^
|
||||||
|
" -dNOPAUSE " ^ (if gs_quiet then "-dQUIET" else "") ^ " -sDEVICE=pdfwrite -sOUTPUTFILE=" ^ Filename.quote fo ^
|
||||||
|
" -dBATCH " ^ Filename.quote fi
|
||||||
|
in
|
||||||
|
match Sys.command gscall with
|
||||||
|
| 0 -> exit 0
|
||||||
|
| _ -> Printf.eprintf "Font embedding failed.\n%!"; exit 2
|
|
@ -0,0 +1 @@
|
||||||
|
val embed_missing_fonts : string -> bool -> string -> string -> unit
|
Loading…
Reference in New Issue