summaryrefslogtreecommitdiff
path: root/source/pdf
AgeCommit message (Collapse)Author
2017-06-16Strip doc out of color space load methodMichael Vrhel
Also the pdf_load_function call. Doc was not used in either of these.
2017-06-16Handle error when reading OCGs.Sebastian Rasmussen
2017-06-16Do not throw exception when dropping pdf document.Sebastian Rasmussen
2017-06-16Plug leak of uri if creating link fails.Sebastian Rasmussen
2017-06-08Plug leak of PDF page object.Sebastian Rasmussen
2017-06-06Rename misnamed pdf object graft map keep interface.Sebastian Rasmussen
2017-06-03Tweak pdf_graft_map API.Robin Watts
Passing a pdf_document to pdf_graft_object to specify the source document is redundant, as if we need to know the document, it will be pickled into the object we are copying. Similarly, repeatedly having to pass the destination document seems silly when we can just pickle it into the map too (and this removes the possibility of people using a different destination document part way through). This leaves to simplifying the pdf_graft_object call, at the expense of splitting it into 2 calls - one with a map, and one without. Also, we can delay the creation of the mapping table until we are first asked to copy an object that requires deep copying. This avoids us ever having to manually pass in the source document. This has knock-on effects in the java and javascript classes, but with the advantage of being clearer in the end (IMHO). Conflicts: include/mupdf/pdf/document.h
2017-06-03Add pdf_keep_document.Robin Watts
We have pdf_drop_document, so a pdf_keep_document seems justified too.
2017-06-03Add documentation for pdf_processors.Robin Watts
Expose pdf_new_output_processor. Remove pdf_document argument to pdf_new_filter_processor. It is only ever used when copying resources from the old resource dictionary to the new one, whereupon it must agree with the bound pdf_document in the old resource dictionary.
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-05-29Make PI/RADIAN/SQRT2/LN2 global single precision float constants.Sebastian Rasmussen
2017-05-27Bug 697947: Handle Illegal hex codes in PDF names.Sebastian Rasmussen
PDF 1.2 and prior treats # in PDF names to be regular characters. PDF 1.2 and later treats # as escape characters for character hex codes. Previously illegal hex codes, e.g. #BX, were partially parsed as escaped hex codes and the illegal remainder parsed as regular characters. Now illegal hex codes are handled as consisting entirely of regular characters. Note that character code 0 is also considered to be an illegal hex code.
2017-05-27Handle extremely long PDF names.Sebastian Rasmussen
Previously the parser would cut these names short and then parse the remainder as a separate name.
2017-05-25Replace broken FZ_IGNORE_IMAGE hints with other mechanisms.Tor Andersson
Add an option to the structured text device to preserve images. If the PDF processor does not have ops to process images, then skip loading them in the interpreter if possible. If the device does not have any image callbacks, then don't set the image processing ops in the run device. This accomplishes the same effect as the device hints were intended to do, but without needing to expose them to the PDF interpreter which may not even have a device since we now have multiple PDF op processors.
2017-05-19Fall back to encoding the glyph index as ASCII in Type3 fonts.Tor Andersson
2017-05-09Fix leak of dictionary in CMAP.Robin Watts
2017-04-28Add support for manipulating PDF annotation vertices.Sebastian Rasmussen
2017-04-27Break line at public identifiers, making them easily grepable.Sebastian Rasmussen
2017-04-27Avoid typecasting function pointers in subclasses.Tor Andersson
Do the typecasting in the functions instead, reducing the risk of function prototype mismatches.
2017-04-27Typedef function pointers consistently.Tor Andersson
2017-04-27Clean up store debug printing.Tor Andersson
Replace fz_print_hash with fz_hash_for_each iterator. Use string formatting callback.
2017-04-27Move fz_outline and pdf_xref debug printing to pdfshow.cTor Andersson
That's where it's actually being used.
2017-04-27Use FZ_SEEK_SET macros for fz_seek.Tor Andersson
Don't depend on stdio.h for our own I/O functions.
2017-04-27Ensure we can compile as -pedantic -std=c99.Tor Andersson
2017-04-27Include required system headers.Tor Andersson
2017-04-27Remove fz_function abstract structure.Tor Andersson
There is only one implementation, so don't bother with the abstraction. Just use pdf_function directly.
2017-04-27Remove unused fz_function debug printing.Tor Andersson
2017-04-27Use fz_snprintf.Tor Andersson
2017-04-27Use namespace for AES crypto code.Tor Andersson
2017-04-21js: Extend PDF app object with a few properties.Sebastian Rasmussen
2017-04-20The default color of ink annotation is transparent.Sebastian Rasmussen
Previously the default color of ink annotations was red, but according to the pdf specification the default color should be colorless transparent if no color is given.
2017-04-20Add annotation interfaces for open state/icon name/line endings.Sebastian Rasmussen
2017-04-20Improve PDF annotation error handling.Sebastian Rasmussen
2017-04-20js: Push annotation error handling down to library.Sebastian Rasmussen
This makes is possible for JNI code to depend on the library for error handling.
2017-04-18Use splay trees for loading/merging cmaps.Robin Watts
This allows for overlaps, merges adjacent (mergeable) ranges and gets us properly searchable results. This causes 1 diff in the test suites (Bug694353.pdf), which is due to the fallback font not having a hypen present at UCS 0x2010.
2017-04-18Consistently use pdf_name_eq() where possible.Sebastian Rasmussen
2017-04-13Move extension/mimetype detection to common function.Sebastian Rasmussen
A document handler normally only exposes a list of extensions and mimetypes. Only formats that use some kind of extra detection mechnism need to supply a recognize() callback, such as xps that can handle .xps-files unpacked into a directory.
2017-04-13Change generated files to be C instead of headers.Tor Andersson
Remove AdobeCA.p7c from autogenerated files. Just include the array in the source. Simplifies makefile dependencies and makes the sizes of each bit of data easier to look at. It also paves the way for eventually using objcopy to create binary objects for the fonts instead of needing to use hexdump.
2017-04-13Fix 697725: silly typo when parsing GoToR destination.Tor Andersson
2017-04-11Bug 697662: Support named actions to first/last/next/previous page.Sebastian Rasmussen
2017-03-28pdf: Swallow unrecoverable errors and ignore rest of page.Tor Andersson
2017-03-28pdf: Use FZ_ERROR_SYNTAX code for syntax errors.Tor Andersson
2017-03-28Return fz_document from all document handlers.Sebastian Rasmussen
To make it possible to avoid casting in most cases.
2017-03-28Rejig fz_new_annot to fz_new_derived_annot.Robin Watts
More consistent with the rest of the code.
2017-03-28Rejig fz_new_device to be fz_new_derived_device.Robin Watts
In keeping with the rest of the code.
2017-03-24Ensure fz_store_types are all static const.Robin Watts
2017-03-23Introduce fz_new_derived_...Robin Watts
Instead of having fz_new_XXXX(ctx, type, ...) macros that call fz_new_XXXX_of_size etc, use fz_new_derived_... Clearer naming, and doesn't clash with fz_new_document_writer.
2017-03-23Add fz_new_writer function.Robin Watts
Moves document_writers into the same style as fz_new_{image,document,page} etc.
2017-03-22Update fz_new_page.Robin Watts
Move this into the same style as fz_new_document and fz_new_image.
2017-03-22Always use %g for short-as-possible format character.Tor Andersson
Call fz_append_string instead of fz_append_printf for static strings. Call fz_write_string instead of fz_write_printf for static strings.