
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
pdfalign
Advanced tools
pdfalign is a very simple tool to grid align extracted pdf text. This is useful for invoice table extraction or further processing with llms / rag systems
pdfalign is a very simple tool to extract text from a pdf in a grid aligned format. This is especially useful in table extraction pipelines. Some use cases include invoice data extraction and pdf processing for rag systems. The simple algorithm that pdfalign uses is the meanshift algorithm to group text blocks together and to align grids. In some scenarios this may produce very sparse documents / tests. In most cases this is however not a problem for llms to handle
Install pdfalign using pip:
pip install pdfalign
Here's a quick example on how to use PDFalign to extract grid aligned text from a PDF file:
from pdfalign import align
# Extract grid aligned text from a pdf
# which returns a list for each pdf page
pages = align("sample.pdf", force_tesseract=False, tesseract_params=None)
for page in pages:
print(page['text'])
print(page['dataframe'])
If you want to use an Image you have to make sure that pytesseract is installed. Here is the code for that:
from pdfalign import align
# Initialize an Image object
img = Image("sample.jpg")
# Extract all tables from the image
# which returns a list of Table objects
text, dataframe = align(img)
You may refer to tutorial for more details
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
pdfalign is a very simple tool to grid align extracted pdf text. This is useful for invoice table extraction or further processing with llms / rag systems
We found that pdfalign demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.