more
This commit is contained in:
parent
95115786d9
commit
d0cdba9c1e
|
@ -4455,7 +4455,15 @@ let go () =
|
||||||
let pdf = Cpdftexttopdf.typeset ~font:cpdffont ~papersize:args.createpdf_pagesize ~fontsize:args.fontsize text in
|
let pdf = Cpdftexttopdf.typeset ~font:cpdffont ~papersize:args.createpdf_pagesize ~fontsize:args.fontsize text in
|
||||||
write_pdf false pdf
|
write_pdf false pdf
|
||||||
| Some (TextWidth s) ->
|
| Some (TextWidth s) ->
|
||||||
Printf.printf "%i\n" (1000)
|
let rawwidth =
|
||||||
|
match args.font with
|
||||||
|
| StandardFont f ->
|
||||||
|
Pdfstandard14.textwidth false WinAnsiEncoding f s
|
||||||
|
| _ ->
|
||||||
|
error "-text-width only works for the standard 14 fonts"
|
||||||
|
in
|
||||||
|
let w = (float rawwidth *. args.fontsize) /. 1000. in
|
||||||
|
Printf.printf "%f\n" w
|
||||||
| Some Draw ->
|
| Some Draw ->
|
||||||
if !tdeep <> 0 then error "Unmatched -bt / -et" else
|
if !tdeep <> 0 then error "Unmatched -bt / -et" else
|
||||||
let pdf = get_single_pdf args.op false in
|
let pdf = get_single_pdf args.op false in
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
%Document Topleft2 etc.
|
%Document Topleft2 etc.
|
||||||
%Test new camlpdf unit conversions
|
%Test new camlpdf unit conversions
|
||||||
%Document -non-full-screen-page-mode
|
%Document -non-full-screen-page-mode
|
||||||
%Documnet -open-at-page-custom
|
%Document -open-at-page-custom
|
||||||
|
%Document -text-width
|
||||||
\documentclass{book}
|
\documentclass{book}
|
||||||
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
||||||
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
||||||
|
|
Loading…
Reference in New Issue