pdPageExtractText() raise following error when used on file created by Latex:
"/home/grzegorz-neo/Dokumenty/Projekty/MatFiz/pdfio-test/outline.pdf"
(v1.0) julia> doc = pdDocOpen(filename);
(v1.0) julia> item_pg = pdDocGetPage(doc, 3);
(v1.0) julia> buf = IOBuffer();
(v1.0) julia> pdPageExtractText(buf, item_pg)
ERROR: InexactError: Int64(Int64, 312.5)
Stacktrace:
[1] Type at ./float.jl:700 [inlined]
[2] convert at ./number.jl:7 [inlined]
[3] setindex!(::Array{Int64,1}, ::Float32, ::Int64) at ./array.jl:769
[4] get_font_widths(::PDFIO.Cos.CosDocImpl, ::PDFIO.Cos.CosIndirectObject{CosDict}) at /home/grzegorz-ubu/Dokumenty/Projekty/Julia/PDFIO.jl/src/PDFontMetrics.jl:164
....
Change:
d[i+1] = widths[ix] into d[i+1] = round(Int,widths[ix]) in PDFontMetrics.jl fix this issue.
Fix is included into PR with implementation for Outlines.
pdPageExtractText() raise following error when used on file created by Latex:
Change:
d[i+1] = widths[ix]
intod[i+1] = round(Int,widths[ix])
in PDFontMetrics.jl fix this issue. Fix is included into PR with implementation for Outlines.