summaryrefslogtreecommitdiff
path: root/source/pdf
AgeCommit message (Collapse)Author
2016-02-24Add fz_show_string function and move wmode argument to end.Tor Andersson
2016-02-24Add optional scissor hint argument to text clipping functions.Tor Andersson
2016-02-24Clarify scissor argument to clip device functions.Tor Andersson
The scissor argument is an optional (potentially NULL) rectangle that can give hints to devices about the area that can be scissored. This is used by the draw device and display list device to minimize the size of temporary clip mask buffers. The scissor rectangle, if used, must have been transformed by the current transform matrix.
2016-02-22Fix leaks in pdf-device.cMichael Vrhel
The Forms object should have been dropped once the reference was created for it. Also needed to clean up the group and font objects that the device maintains.
2016-02-22Fix Annot handling in mutool clean.Robin Watts
When cleaning a file, we discard any Annot entries that no longer point to genuine pages. Or at least, we should have done, were it not for the fact that we only handled the /A form of Annots, and not the /Dest form of annots. Fixed here.
2016-02-22Fix flaw in printing objects.Robin Watts
When printing a PDF object to a file, if it was a name, then we'd output without a required \n. For example: 10 0 obj /SomeNameOrOtherendobj This would trip gs up.
2016-02-22Add some helpful debugging code to the mark and sweep code.Robin Watts
2016-02-22Rename fz_path_processor to fz_path_walker.Tor Andersson
2016-02-22Remove pointless casts from void*.Tor Andersson
Extraneous explicit type casts can mask errors, especially if a function prototype or return value changes in the future.
2016-02-22Drop const from fz_image.Tor Andersson
Image objects are immutable and opaque once constructed. Therefore there is no need for the const keyword.
2016-02-22Drop const from fz_shade.Tor Andersson
Shading objects are immutable and opaque once constructed. Therefore there is no need for the const keyword.
2016-02-22Rename fz_add_text to fz_show_glyph.Tor Andersson
Match naming of fz_moveto/lineto etc for paths.
2016-02-15Drop UNUSED macro -- it dirties the namespace and is not needed.Tor Andersson
We compile with -Wno-unused-parameters instead.
2016-02-15Fix -DNOCJK build warnings.Tor Andersson
2016-02-10Add bold/italic/monospaced/serif flags to fz_font.Tor Andersson
Use the flags when selecting a fallback font.
2016-02-09Fix 696552: Double free error in mutool clean -s.Tor Andersson
Also fix a memory leak.
2016-02-03Move pdf's lex_number routine over to use fast atof.Robin Watts
Spot (broken) values that will require special 'acrobat compatible' handling and use the old code for that.
2016-01-28Add Noto fallback fonts.Tor Andersson
Look up fallback fonts by unicode script, with a flag to select the serif or sans-serif font style where such variants exist. Move all builtin fonts into fitz namespace.
2016-01-21Drop const from fz_colorspace.Tor Andersson
It's an opaque immutable structure, that we don't expect to ever want to change after creation. Therefore the const keyword is not useful, and is only line noise.
2016-01-21Drop the const on fz_font.Tor Andersson
The font is an immutable opaque structure, no need to add the const keyword since users aren't expected or expecting to change it.
2016-01-20Various formatting cleanups.Tor Andersson
2016-01-15pdf: Consume entire token before lexing numbers.Tor Andersson
"0.00-70" should be parsed as one token, not two tokens as we did.
2016-01-13Add lots of consts.Robin Watts
In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems.
2016-01-08pdf: Add function to look up the page for a named destination.Tor Andersson
2016-01-08pdf: Fix pdf_annot memory leak.Tor Andersson
2016-01-08Tweak lex_number to avoid (or minimise) underflowRobin Watts
Keeps operations in the int domain as long as possible, and only resorts to floats if required.
2016-01-06Squash some warningsRobin Watts
2016-01-06js: Fix error handling bugs and one scoping bug.Tor Andersson
js_pcall was leaving crap on the stack in case of errors. AFSimple_Calculate needs access to the doc object, but cannot use the usual 'this' binding since it's a function. Add a global reference to the doc object MuPDF_Doc.
2016-01-05Separate pdf_drop_annots (that drops lists) and fz_drop_annot.Tor Andersson
2016-01-05Stylistic naming cleanups.Tor Andersson
2016-01-05Clean up trailing whitespace.Tor Andersson
2016-01-05Remove fz_page argument from fz_annot function calls.Tor Andersson
2015-12-28Drop 'jsimp' abstraction and use mujs directly.Tor Andersson
2015-12-28Rename fz_image_get_pixmap to fz_get_pixmap_from_image.Tor Andersson
2015-12-18Remove fz_save_document and use pdf_save_document directly instead.Tor Andersson
In preparation of adding pdf_write_document that writes a document to a fz_output stream.
2015-12-15Rename fz_buffer_cat to fz_append_buffer.Tor Andersson
2015-12-15Rename fz_write_x to fz_save_pixmap_as_x or fz_save_bitmap_as_x.Tor Andersson
Separate naming of functions that save complete files to disk from functions that write data to streams.
2015-12-11Remove text clip accumulation.Tor Andersson
We can now group all clipped text into one fz_text object and simplify the device interface.
2015-12-11Keep spans of multiple fonts and sizes in one fz_text object.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-10-21Fix signatures for files created with pdf_create_document.Simon Reinhardt
See Bug 696284. Do not set disallow_new_increments in pdf_create_document, as this breaks following calls to pdf_sign_signature. See also the comments in bug 696251.
2015-10-19Fix 695582: add knockout group for text that is both stroke and fill.Tor Andersson
2015-10-15Fix 696241: fix bracketing of begin_group/end_group for text objects.Tor Andersson
2015-10-14Remove unused variable.Michael Vrhel
2015-10-14Add proper support for when a combobox widget has options that are 2-element ↵Michael Vrhel
arrays The list box and combo box can have values that are 2-element arrays. The first element is the "export" value and the second element is the value that should be shown in the list box UI. This fix ensures that we get the proper value to show in the UI. Also, it adds the option to get the export values. These are needed if you wish to update the field dictionary's V (value) entry, which is the currently selected values(s). This fix works well with gsview. The other viewers will now display the proper content in their UI, (unlike before this fix) but may need a bit more work to ensure that the proper V (value) is updated with changes in the selections. In addition, we add selection rectangles to the selected list box items.
2015-10-14Fix incremental xref stream.Simon Reinhardt
When writing incremental xref streams, the opts->use_list entry of the last object, i.e. of the xref stream object itself, was left uninitialized. This resulted in a random value, 0 or 1, being written into the xref stream. Also, always write a newline before the endstream keyword, as that shall be done for xref streams and should be done for all other streams.
2015-10-14Fix pdf_create_document.Simon Reinhardt
In pdf_create_document set disallow_new_increments to 1. Without this, the calls to pdf_new_ref in pdf_create_document create an incremental xref section. The following call to pdf_set_populating_xref_trailer then does not set the trailer of the final xref section.
2015-10-14pdf: Handle surrogate pairs in pdf_to_utf8.Tor Andersson
2015-10-14pdf: Flush text if content stream processing is cut short by errors.Tor Andersson
2015-10-02Don't stretch CJK substitute fonts.Tor Andersson