Replies: 1 comment
-
Take a look at: pkg/api/test/extract_test.go: TestExtractImagesLowLevel Let me know if you have further Qs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to extract a page from a PDF using
pdfcpu
and anio.ReadSeeker
. When I useapi.ReadContextFile(path)
everything works correctly andExtractPage
succeeds. However, when I try to useapi.ReadContext(readerSeeker, config)
to read from anio.ReadSeeker
, the context is created without error, butapi.ExtractPage(ctx, pageNumber)
fails with:I have confirmed that the
readerSeeker
is valid — other operations using the samereaderSeeker
work fine and detect the document correctly. The issue seems to be specific to howReadContext
sets up the context when using aReadSeeker
, particularly in relation to page access.Here are the relevant code snippets:
Then later:
When using
ReadContextFile(path)
instead, theExtractPage
call works fine.Is there a special consideration or additional step needed when using
api.ReadContext
with anio.ReadSeeker
to properly initialize the context for page extraction?Thanks in advance for any insights.
Beta Was this translation helpful? Give feedback.
All reactions