Bounding Box not working #195

Closed
opened 2026-02-16 00:17:06 -05:00 by yindo · 8 comments
Owner

Originally created by @tvieirabruna on GitHub (Jul 18, 2024).

Hi!

When I try to parse my PDF by specifying the bounding box, I receive an error. The bounding box option is not working on https://cloud.llamaindex.ai/parse, nor when using it with LlamaIndex.

The message I got from running it on my VS Code:

Started parsing the file under job_id 47d59df1-16f6-44b0-8efa-a94849529719
Error while parsing the file './file.pdf': 'markdown'

When I parse the document without specifying the bounding box, LlamaParse works as usual.

Originally created by @tvieirabruna on GitHub (Jul 18, 2024). Hi! When I try to parse my PDF by specifying the bounding box, I receive an error. The bounding box option is not working on https://cloud.llamaindex.ai/parse, nor when using it with LlamaIndex. The message I got from running it on my VS Code: > Started parsing the file under job_id 47d59df1-16f6-44b0-8efa-a94849529719 > Error while parsing the file './file.pdf': 'markdown' When I parse the document without specifying the bounding box, LlamaParse works as usual.
yindo closed this issue 2026-02-16 00:17:06 -05:00
Author
Owner

@Stillerman commented on GitHub (Jul 18, 2024):

Adding invalidate_cache=True fixed this for me. Seems like the caching should also include bounding_box in it.

@Stillerman commented on GitHub (Jul 18, 2024): Adding `invalidate_cache=True` fixed this for me. Seems like the caching should also include bounding_box in it.
Author
Owner

@tvieirabruna commented on GitHub (Jul 19, 2024):

Thank you! It indeed fixed the error. However, the bounding box seems to not be working. :( Adding it changed nothing in my parsed document, even when I set to not parse the top 50%.

@tvieirabruna commented on GitHub (Jul 19, 2024): Thank you! It indeed fixed the error. However, the bounding box seems to not be working. :( Adding it changed nothing in my parsed document, even when I set to not parse the top 50%.
Author
Owner

@Stillerman commented on GitHub (Jul 19, 2024):

I'm coming to a similar conclusion. For me, it seems to ignore the top 10% but it is still seeing the bottom 10% because I have text from the footer.

@Stillerman commented on GitHub (Jul 19, 2024): I'm coming to a similar conclusion. For me, it seems to ignore the top 10% but it is still seeing the bottom 10% because I have text from the footer.
Author
Owner

@tvieirabruna commented on GitHub (Jul 22, 2024):

You're right. In my case, actually, it was kind of random. Some pages had their bottom not parsed and two of them had.

@tvieirabruna commented on GitHub (Jul 22, 2024): You're right. In my case, actually, it was kind of random. Some pages had their bottom not parsed and two of them had.
Author
Owner

@OmarHory commented on GitHub (Jul 29, 2024):

May I know how you specified the bounding boxes?
I'd love to know if there is a systematic way to specify it

@OmarHory commented on GitHub (Jul 29, 2024): May I know how you specified the bounding boxes? I'd love to know if there is a systematic way to specify it
Author
Owner

@tvieirabruna commented on GitHub (Jul 29, 2024):

There are instructions to specify it in the LlamaParse website:

Specify an area of a document that you want to parse. This can be helpful to remove headers and footers. To do so you need to provide the bounding box margin in clockwise order from the top in a comma-separated. The margins are expressed as a fraction of the page size, a number between 0 and 1. Examples:
To exclude the top 10% of a document: bounding_box="0.1,0,0,0"
To exclude the top 10% and bottom 20% of a document: bounding_box="0.1,0,0.2,0"

And add

invalidate_cache=True

as a parameter so it doesn't give an error. The bounding box does not seem to be working pretty well anyway. :/

@tvieirabruna commented on GitHub (Jul 29, 2024): There are instructions to specify it in the LlamaParse website: > Specify an area of a document that you want to parse. This can be helpful to remove headers and footers. To do so you need to provide the bounding box margin in clockwise order from the top in a comma-separated. The margins are expressed as a fraction of the page size, a number between 0 and 1. Examples: > To exclude the top 10% of a document: bounding_box="0.1,0,0,0" > To exclude the top 10% and bottom 20% of a document: bounding_box="0.1,0,0.2,0" And add > invalidate_cache=True as a parameter so it doesn't give an error. The bounding box does not seem to be working pretty well anyway. :/
Author
Owner

@dshushin commented on GitHub (Aug 12, 2024):

Have the same problem.
The bounding box parameter is indeed being sent to the API. But no effect.
Screenshot 2024-08-12 at 14 52 59

The job status is marked as "SUCCESS".

Job ID: 57d21538-9dd4-4837-8e2d-c6329e32d384

@dshushin commented on GitHub (Aug 12, 2024): Have the same problem. The bounding box parameter is indeed being sent to the API. But no effect. <img width="357" alt="Screenshot 2024-08-12 at 14 52 59" src="https://github.com/user-attachments/assets/4d6b42c3-02ba-45a2-bcfe-83d0635611c3"> The job status is marked as "SUCCESS". Job ID: 57d21538-9dd4-4837-8e2d-c6329e32d384
Author
Owner

@BinaryBrain commented on GitHub (Jan 3, 2025):

This is now fixed.

@BinaryBrain commented on GitHub (Jan 3, 2025): This is now fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#195