- 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>
19 lines
472 B
C
19 lines
472 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "../../crates/pdftract-libpdftract/include/pdftract.h"
|
|
|
|
int main(void) {
|
|
printf("Testing version...\n");
|
|
const char *version = pdftract_version();
|
|
printf("Version: %s\n", version);
|
|
|
|
printf("\nTesting hash...\n");
|
|
char *result = pdftract_hash("/tmp/valid_test.pdf");
|
|
if (result) {
|
|
printf("Hash: %s\n", result);
|
|
pdftract_free(result);
|
|
}
|
|
|
|
return 0;
|
|
}
|