- Add decode_page_content_streams() function for per-page lazy decode - Update extract_page_from_dict() to support lazy stream decoding - Modify extract_pdf() and extract_pdf_ndjson() to enable lazy decoding - Fix borrow checker issue in LazyPageIter::next() This ensures content streams are decoded lazily per page and dropped immediately after processing, keeping peak RSS flat across page count. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
13 lines
413 B
C
13 lines
413 B
C
#include <stdio.h>
|
|
#include "/home/coding/pdftract/crates/pdftract-libpdftract/include/pdftract.h"
|
|
|
|
int main() {
|
|
char *result = pdftract_extract_text("tests/fixtures/valid-minimal.pdf", "{}");
|
|
printf("Result: %s\n", result ? result : "NULL");
|
|
if (result) pdftract_free(result);
|
|
|
|
const char *err = pdftract_last_error();
|
|
printf("Last error: %s\n", err ? err : "none");
|
|
|
|
return 0;
|
|
}
|