summaryrefslogtreecommitdiff
path: root/source/tools/pdfinfo.c
AgeCommit message (Collapse)Author
2017-04-27Include required system headers.Tor Andersson
2017-03-22Rename fz_putc/puts/printf to fz_write_*.Tor Andersson
Rename fz_write to fz_write_data. Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*. Be consistent in naming: fz_write_* calls write to fz_output. fz_append_* calls append to fz_buffer. Update documentation.
2016-12-27Strip extraneous blank lines.Tor Andersson
2016-12-14Fix document leak when mutool info throws.Sebastian Rasmussen
2016-10-12Bug 696939: Fix mutool info -I flag.Robin Watts
When using -I without -X we were not seeing the expected images listed. Adopt the solution suggested by the bug reporter. Many thanks!
2016-09-22Bug 697018: Avoid recursing infinitely on dicts in mutool info.Sebastian Rasmussen
2016-07-06Remove premature optimization: don't bother to resolve page objects.Tor Andersson
2016-07-06pdf: Drop generation number from public interfaces.Tor Andersson
The generation number is only needed for decryption, and is assumed to be zero or irrelevant for all other uses. Store the original object number and generation in the xref slot, so that we can decrypt them even when the objects have been renumbered, without needing to pass the original object number around through the stream loading APIs.
2016-06-29Print font encoding in mutool info.Sebastian Rasmussen
2016-06-17Use 'size_t' instead of int as appropriate.Robin Watts
This silences the many warnings we get when building for x64 in windows. This does not address any of the warnings we get in thirdparty libraries - in particular harfbuzz. These look (at a quick glance) harmless though.
2016-06-08Move to using size_t for all mallocs.Robin Watts
This has knock on effects in the store. fix
2016-05-13Add common page range parsing function for tools.Tor Andersson
2016-05-13Introduce a general output context.Sebastian Rasmussen
This makes it possible to redirect standard out and standard error output streams to output streams of your liking. This means that now you can, in gdb, type: (gdb) call pdf_print_obj(ctx, fz_stdout(ctx), obj, 0) (gdb) call fflush(0) or when dealing with an unresolved indirect reference: (gdb) call pdf_print_obj(ctx, fz_stdout(ctx), pdf_resolve_indirect(ctx, ref), 0) (gdb) call fflush(0)
2016-03-01Rename pdf_close_document to pdf_drop_document.Tor Andersson
2015-12-11Use fz_output instead of FILE* for most of our output needs.Tor Andersson
Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj.
2015-04-09Remove the _no_run functions.Tor Andersson
The new pdfclean sanitize functionality mean that mutool now needs the data files, so maintaining the split that was designed to keep data files out of mutool is no longer viable.
2015-04-06Update mutool subtools to use PDF_NAME_xxx rather than "xxx".Robin Watts
2015-04-06Fix oddity with pdfinfoRobin Watts
If pdfinfo is invoked as: mutool info file.pdf 1,2,3 then it will show the items found on page 1, then the items found on pages 1 and 2, then the items shown on pages 1,2 and 3. Fix this by clearing the data after each show operation.
2015-04-01Update manpages.Tor Andersson
2015-02-25Bug 695851: Fix SEGV in mutool info.Robin Watts
Add missing initialisation of glo.ctx required due to API change.
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
2015-02-17Rename fz_close_* and fz_free_* to fz_drop_*.Tor Andersson
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
2014-05-05Fix 695207: printf format bug in mutool info.Tor Andersson
2014-03-13Tweak pdfclean and pdfinfo to be useful as libraries.Robin Watts
Firstly, we remove the use of global variables; this is done by introducing a 'globals' structure for each of these files and passing it internally between functions. Next, split the core of pdfclean_main into pdfclean_clean, and the core of pdfinfo_main into pdfinfo_info. The _main functions now do the argv processing. The new functions now run entirely thread safely, so can be called from library functions.
2013-07-11Implement dynamic page tree lookups.Tor Andersson
No more caching a flattened page tree in doc->page_objs/refs. No more flattening of page resources, rotation and boxes. Smart page number lookup by following Parent links. Naive implementation of insert and delet page that doesn't rebalance the trees. Requires existing page tree to hook into, cannot be used to create a page tree from scratch.
2013-06-25Rid the world of "pdf_document *xref".Robin Watts
For historical reasons lots of the code uses "xref" when talking about a pdf document. Now pdf_xref is a separate type this has become confusing, so replace 'xref' with 'doc' for clarity.
2013-06-20Rearrange source files.Tor Andersson