4 These functions have been split out of pdf_xref.c to allow tools
5 to be linked without pulling in the interpreter. The interpreter
6 references the built-in font and cmap resources which are quite
7 big. Not linking those into the tools saves roughly 6MB in the
12 pdf_open_document_with_stream(fz_context *ctx, fz_stream *file)
14 pdf_document *doc = pdf_open_document_no_run_with_stream(ctx, file);
15 doc->super.run_page_contents = (fz_document_run_page_contents_fn *)pdf_run_page_contents;
16 doc->super.run_annot = (fz_document_run_annot_fn *)pdf_run_annot;
17 doc->update_appearance = pdf_update_appearance;
22 pdf_open_document(fz_context *ctx, const char *filename)
24 pdf_document *doc = pdf_open_document_no_run(ctx, filename);
25 doc->super.run_page_contents = (fz_document_run_page_contents_fn *)pdf_run_page_contents;
26 doc->super.run_annot = (fz_document_run_annot_fn *)pdf_run_annot;
27 doc->update_appearance = pdf_update_appearance;
31 fz_document_handler pdf_document_handler =
33 (fz_document_recognize_fn *)&pdf_recognize,
34 (fz_document_open_fn *)&pdf_open_document,
35 (fz_document_open_with_stream_fn *)&pdf_open_document_with_stream