This library is work in progress, it's in a pre-alpha state
pdf_party ๐ provides access to the content of a PDF file through a friendly Elixir API.
The short term goal of the library is to provide a basic PDF parser implemented in Elixir that enable developers to test PDF documents with ex_unit.
test "usage example" do
assert {:ok, document} = PDFParty.read("file.pdf")
assert {:ok, 2} = PDFParty.pages_count(document)
assert {:ok, [page_1, page_2]} = PDFParty.pages(document)
assert PDFParty.text(page_1) =~ "This text is in the first page"
assert PDFParty.text(page_2) =~ "This text is in the second page"
end
Documentation can be found here
Note that the library is not published yet!
def deps do
[
{:pdf_party, "~> 1.0.0"}
]
end
This project uses Dialyzer static analysis tool.
mix dialyzer
pdf_party is licensed under the MIT license.
See LICENSE for the full license text.