Fixed regression in image_resolution due to Pdfunit change
This commit is contained in:
parent
847f498add
commit
3ca5c8bb20
|
@ -235,8 +235,8 @@ let rec image_resolution_page pdf page pagenum dpi images =
|
||||||
let newpdf = Pdfpage.change_pages false pdf [page] in
|
let newpdf = Pdfpage.change_pages false pdf [page] in
|
||||||
image_resolution newpdf [pagenum] dpi
|
image_resolution newpdf [pagenum] dpi
|
||||||
| (pagenum, name, Image (w, h), objnum) ->
|
| (pagenum, name, Image (w, h), objnum) ->
|
||||||
let lx = Pdfunits.points (distance_between o x) Pdfunits.Inch in
|
let lx = Pdfunits.inches (distance_between o x) Pdfunits.PdfPoint in
|
||||||
let ly = Pdfunits.points (distance_between o y) Pdfunits.Inch in
|
let ly = Pdfunits.inches (distance_between o y) Pdfunits.PdfPoint in
|
||||||
let wdpi = float w /. lx
|
let wdpi = float w /. lx
|
||||||
and hdpi = float h /. ly in
|
and hdpi = float h /. ly in
|
||||||
image_results := (pagenum, xobject, w, h, wdpi, hdpi, objnum)::!image_results
|
image_results := (pagenum, xobject, w, h, wdpi, hdpi, objnum)::!image_results
|
||||||
|
|
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
|
@ -279,7 +279,7 @@ These examples demonstrate just a few of the facilities provided by the Coherent
|
||||||
|
|
||||||
\noindent Dump attachments to file, given the directory to put them in.
|
\noindent Dump attachments to file, given the directory to put them in.
|
||||||
|
|
||||||
\section*{\hyperref[chap:13]{Chapter 13: Working with Images}}
|
\section*{\hyperref[chap:13]{Chapter 13: Images}}
|
||||||
|
|
||||||
\begin{framed}\noindent\texttt{cpdf -image-resolution 600 in.pdf}\end{framed}
|
\begin{framed}\noindent\texttt{cpdf -image-resolution 600 in.pdf}\end{framed}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue