API does will not parse text in PDF image #272

Closed
opened 2026-02-16 00:17:20 -05:00 by yindo · 2 comments
Owner

Originally created by @SomebodySysop on GitHub (Sep 17, 2024).

I am using LlamaParse via the REST API: https://docs.cloud.llamaindex.ai/llamaparse/getting_started/api

I have PDF I am trying to parse: https://s3.us-west-2.amazonaws.com/docs.scbbs.com/docs/test/67_SL_23.pdf

The first two pages are indexable text, but the 3rd page is an image.

When I submit the PDF in the lllamacloud parser dashboard, it returns all pages correctly.

However, when I submit the same PDF to the API, it only returns the first two pages.

I've tried these parameters to force the OCR, but I still only get the first 2 pages via the API:

// Define the body parameters
$data = [
	'language' => 'en',
	'parsing_instruction' => 'Please use OCR to extract all text in the page 3 image.',
	'accurate_mode' => true,
	'fast_mode' => false,
	'disable_ocr' => false // Note: Using string 'false' as it will be sent as form-data
];

Any suggestions to get all 3 pages via the API?

Originally created by @SomebodySysop on GitHub (Sep 17, 2024). I am using LlamaParse via the REST API: https://docs.cloud.llamaindex.ai/llamaparse/getting_started/api I have PDF I am trying to parse: https://s3.us-west-2.amazonaws.com/docs.scbbs.com/docs/test/67_SL_23.pdf The first two pages are indexable text, but the 3rd page is an image. When I submit the PDF in the lllamacloud parser dashboard, it returns all pages correctly. However, when I submit the same PDF to the API, it only returns the first two pages. I've tried these parameters to force the OCR, but I still only get the first 2 pages via the API: // Define the body parameters $data = [ 'language' => 'en', 'parsing_instruction' => 'Please use OCR to extract all text in the page 3 image.', 'accurate_mode' => true, 'fast_mode' => false, 'disable_ocr' => false // Note: Using string 'false' as it will be sent as form-data ]; Any suggestions to get all 3 pages via the API?
yindo added the bug label 2026-02-16 00:17:20 -05:00
yindo closed this issue 2026-02-16 00:17:20 -05:00
Author
Owner

@BinaryBrain commented on GitHub (Oct 24, 2024):

hi @SomebodySysop,
We couldn't reproduce the issue. That said, I recommend removing the parsing instruction as it'll probably lead to better result by default.
Also, disable_ocr is false by default so you can remove it.

@BinaryBrain commented on GitHub (Oct 24, 2024): hi @SomebodySysop, We couldn't reproduce the issue. That said, I recommend removing the parsing instruction as it'll probably lead to better result by default. Also, `disable_ocr` is `false` by default so you can remove it.
Author
Owner

@SomebodySysop commented on GitHub (Nov 18, 2024):

Thank you very much for looking into this. I just re-tested with the same PDF, and am now getting the desired results through the API.

Beautiful service!

@SomebodySysop commented on GitHub (Nov 18, 2024): Thank you very much for looking into this. I just re-tested with the same PDF, and am now getting the desired results through the API. Beautiful service!
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#272