sambitdash / PDFIO.jl

PDF Reader Library for Native Julia.
Other
128 stars 13 forks source link

MethodError: no method matching setindex!(::Rectangle.IntervalTree{UInt16, Int64}, ::Float32, ::Rectangle.Interval{UInt16}) #115

Closed marthinkondjeni closed 4 weeks ago

marthinkondjeni commented 1 month ago

Good day, I am following the documentation but I am getting this error

pdPageExtractText(stdout,pdDocGetPage(pdDocOpen("Job_Adverts/00-828-7458.pdf"), 1))


Stack trace
Here is what happened, the most recent locations are first:

get_cid_font_widths(cosDoc::PDFIO.Cos.CosDocImpl, font::PDFIO.Cos.CosIndirectObject{PDFIO.Cos.CosDict}) @ PDFontMetrics.jl:194
get_font_widths(cosdoc::PDFIO.Cos.CosDocImpl, font::PDFIO.Cos.CosIndirectObject{PDFIO.Cos.CosDict}) @ PDFontMetrics.jl:154
PDFont @ PDFonts.jl:359
get_pd_font!(doc::PDFIO.PD.PDDocImpl, cosfont::PDFIO.Cos.CosIndirectObject{PDFIO.Cos.CosDict}) @ PDDocImpl.jl:124
get_font(page::PDFIO.PD.PDPageImpl, fontname::PDFIO.Cos.CosName) @ PDPage.jl:233
evalContent!(pdo::PDFIO.PD.PDPageElement{:Tf}, state::PDFIO.PD.GState{:PDFIO}) @ PDPageElement.jl:717
evalContent! @ PDPageElement.jl:620
evalContent!(pdo::PDFIO.PD.PDPageTextObject, state::PDFIO.PD.GState{:PDFIO}) @ PDPageElement.jl:661
evalContent! @ PDPageElement.jl:620
pdPageEvalContent(page::PDFIO.PD.PDPageImpl, state::PDFIO.PD.GState{:PDFIO}) @ PDPage.jl:96
pdPageEvalContent @ PDPage.jl:95
pdPageExtractText @ PDPage.jl:109
[This cell: line 1](http://196.216.167.118:8081/edit?id=6f67b45a-88a0-11ef-0d0d-3d83273097af#42e70605-bc89-46c3-a4c4-d15260196acb)
``
sambitdash commented 1 month ago

Please upload the file to review and understand what may have gone wrong.

marthinkondjeni commented 1 month ago

Here is the file 00-828-7458.pdf

sambitdash commented 1 month ago

I get the following output. Please review the version of PDFIO you are using. Please set up a fresh environment and try. I used the trunk build. If you are seeing the issue with the last released build, may be we need to release a new version.

      IT Audit Senior Manager | Risk Advisory
      Full­time

      Company Description
      Deloitte is a leading global provider of audit and assurance, consulting, financial advisory, risk advisory,
      tax and related services. Our global network of member firms and related entities in more than 150
      countries and territories (collectively, the “Deloitte organization”) serves four out of five Fortune Global
      500® companies. Learn how Deloitte’s approximately 410,000 people make an impact that matters at
      www.deloitte.com

      Job Description
      What impact will you make?

      Every day, your work will make an impact that matters, while you thrive in a dynamic culture of inclusion,
      collaboration and high performance. As the undisputed leader in professional services, Deloitte is where
      you’ll find unrivaled opportunities to succeed and realize your full potential.

      Main Purpose of Job

      Supports business area leadership in the implementation of strategic plan. Focus on the management
      and delivery of client engagements, as well as sales and practice development. Develop high­performing
      people, leading and supporting them to make an impact that matters, and setting the direction to deliver
      exceptional client service.

      Key Performance areas:

      Delivery Excellence    

       Involved in all facets of IT risk management including assessment, reporting, and developing action
       plans to address risks;
       Plan and execute IT internal and external audits as well as IT governance reviews;
       Audit security configurations, authorizations, change control processes, and operations at various
       clients using different tools and platforms;
       Participate in the development of new tools, solutions and market offerings;
       Perform project tasks independently, and direct the efforts of others;
       Extensive client liaison and engagement with related stakeholders;
       Managing and/or contributing to overall Deloitte office roles and functions;
       Prepares project plan to meet objectives within established budget and timeline and recognizes when
       plans should be adjusted to meet objectives;
       Develops budget, scope and staffing recommendations based on understanding of client budget and
       project economics;
       Communicates business objectives and desired outcomes to guide the work of others;
       Ensures that team’s work meets quality assurance standards and that all relevant risks have been
       identified and appropriately addressed;
       Recognizes potential independence or related issues and takes appropriate action, includingBase.TTY(RawFD(15) open, 0 bytes waiting)
sambitdash commented 1 month ago

tried with PDFIO v.1.1.14 the latest version with Julia version 1.10.0.

I see no issues. Here are the package files for comparison.

Project.toml

[deps]
PDFIO = "4d0d745f-9d9a-592e-8d18-1ad8a0f42b92"

Manifest.toml

# This file is machine-generated - editing it directly is not advised

julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "fd02b20d627c4c3b7700480bf0d7e3770e9ded04"

[[deps.AbstractTrees]]
git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5"
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
version = "0.3.4"

[[deps.AdobeGlyphList]]
deps = ["DelimitedFiles", "Pkg"]
git-tree-sha1 = "d90a9c83fe96e3e93c66e1d3202877f0e92fcdfe"
uuid = "715cd884-8f22-55db-b077-449d1f7eef73"
version = "0.1.2"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.BinDeps]]
deps = ["Libdl", "Pkg", "SHA", "URIParser", "Unicode"]
git-tree-sha1 = "1289b57e8cf019aede076edab0587eb9644175bd"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "1.0.2"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.5+1"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.DelimitedFiles]]
deps = ["Mmap"]
git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae"
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
version = "1.9.1"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[deps.IntegerMathUtils]]
git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30"
uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235"
version = "0.1.2"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[deps.JLLWrappers]]
deps = ["Artifacts", "Preferences"]
git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.6.1"

[[deps.LabelNumerals]]
deps = ["RomanNumerals"]
git-tree-sha1 = "d7d8d199b61941d4f0ba666ef5eb017dab5d79f4"
uuid = "2e475f56-4567-5c41-94ff-3f69a29378f9"
version = "0.1.1"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.4"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "8.4.0+0"

[[deps.LibGit2]]
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.LibGit2_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
version = "1.6.4+0"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.11.0+1"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.LinearAlgebra]]
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.2+1"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2023.1.10"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.23+2"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "ad31332567b189f508a3ea8957a2640b1147ab00"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "1.1.23+1"

[[deps.PDFIO]]
deps = ["AbstractTrees", "AdobeGlyphList", "BinDeps", "Dates", "DelimitedFiles", "LabelNumerals", "Libdl", "LinearAlgebra", "OpenSSL_jll", "Pkg", "Printf", "Rectangle", "RomanNumerals", "Zlib_jll"]
git-tree-sha1 = "0c676de71d61a22bcc6b371c3e14e8702097ce91"
uuid = "4d0d745f-9d9a-592e-8d18-1ad8a0f42b92"
version = "0.1.14"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.10.0"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.3"

[[deps.Primes]]
deps = ["IntegerMathUtils"]
git-tree-sha1 = "cb420f77dc474d23ee47ca8d14c90810cafe69e7"
uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
version = "0.5.6"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.Rectangle]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "656434329bee23e402f1db2f86c5362bf859de8c"
uuid = "9a9db56c-8f71-5460-add5-cb450131785e"
version = "0.1.3"

[[deps.RomanNumerals]]
deps = ["Primes"]
git-tree-sha1 = "e2f9f2357f68b95d5b9a130ba54508423602f287"
uuid = "37834d88-8936-577c-80c9-1066ecf66832"
version = "0.3.3"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"

[[deps.URIParser]]
deps = ["Unicode"]
git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.1"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.13+1"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.8.0+1"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.52.0+1"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+2"
marthinkondjeni commented 4 weeks ago

Thank you so much. The issue was on my side. When I uploaded the file from Windows to Linux, it got corrupted.