summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2018-10-23Drop hash table upon exception.Sebastian Rasmussen
2018-10-23Drop page upon exception cleaning content streams.Sebastian Rasmussen
2018-10-23Don't clobber old xref section when pdf_replace_xref fails.Sebastian Rasmussen
2018-10-23Drop new object upon exception grafting objects.Sebastian Rasmussen
2018-10-23Avoid fz_var declaration of variable.Sebastian Rasmussen
2018-10-23Drop state and context upon exception.Sebastian Rasmussen
2018-10-23Throw when page number is out of range.Sebastian Rasmussen
Other code depends on this and does not handle a page pointer being NULL well.
2018-10-23Remember to drop group colorspace.Sebastian Rasmussen
2018-10-23Fix cleanup upon exception in the tiff filters.Sebastian Rasmussen
2018-10-23Reformat list of constants.Tor Andersson
2018-10-23Drop the page dictionary upon exception in mutool merge.Sebastian Rasmussen
2018-10-23Drop loaded object while writing hint stream.Sebastian Rasmussen
This covers both the case of no error and a thrown exception.
2018-10-23Remove extra blank lines.Tor Andersson
2018-10-23Drop reference upon exception in mutool extract.Sebastian Rasmussen
2018-10-23When copying streams drop resources upon exception.Sebastian Rasmussen
2018-10-23murun: Fix cleanup upon exeception when converting PDF array/dict to JS.Tor Andersson
2018-10-23Dynamically allocate colorspace name, to allow arbitrary lengths.Sebastian Rasmussen
2018-10-23Remember to drop group colorspace.Sebastian Rasmussen
2018-10-23Fix text used as clip mask in pdfwrite device.Tor Andersson
Push the clip state, and pass the correct text rendering mode state.
2018-10-23Fix leak in pdfwrite pdf_dev_end_mask.Tor Andersson
2018-10-23Use DeviceGray colorspace for soft masks in pdfwrite output.Tor Andersson
2018-10-23Avoid being smart about keeping only a single reference to the buffer.Sebastian Rasmussen
When pdf_dev_pop() is called it will drop the reference to the buffer. pdf_dev_push_new_buf() will either create a new buffer reference or take a reference to the existing buffer. When pdf_dev_pop() is called unbalance this creates a problem as the top level buffer will be unreferenced too many times. fails-32.pdf
2018-10-23Fix typo in pdf write device.Tor Andersson
2018-10-23Remove unused variables in output-pcl.cTor Andersson
2018-10-23Add fz_write_pixmap_as_data_uri helper function.Tor Andersson
Also include "data:" schema in the data uri for fz_write_image_as_data_uri.
2018-10-23Allow SVG output to keep ID numbers unique across pages.Tor Andersson
This is required if embedding multiple SVG documents in a web page, for example.
2018-10-23Don't rely on CSS classes in HTML5 text output.Tor Andersson
This allows the output to be more easily embedded in other HTML documents.
2018-10-18Bug 699971. Fix bad read of mask type from display list.Robin Watts
We pack the mask type and the color parameters into a byte. We were unpacking it incorrectly, resulting in all masks being treated as luminosity ones.
2018-10-18Bug 699967: Follow ons.Robin Watts
1) Reset the margins at the start of each PCL job to avoid offsetting the page contents. 2) Fix height/band_height confusion in mono band writing.
2018-10-18Bug 699967: Fix crash with wide format output to color PCL.Robin Watts
Writing to wide format output was causing uncompressed lines of more than 32K to be written to a 32K buffer. I now recognise that there is an inherent limitation in PCL where image data can't be larger than 32K, so we'll have to split page output into subimages and hope they register well enough. This new commit does that (and solves the overwrite). I am seeing problems when feeding the output from this into gpcl due to the delta compression. We believe this is a bug in gpcl, and is being investigated as bug 699969.
2018-10-16Fix line spacing bug in rewriting PDF files.Robin Watts
The filter op for Tz was reading the scale in and dividing by 100 as we do elsewhere. The buffer op was then forgetting to multiply by 100 before rewriting it.
2018-10-15Update lcms2 to lcms2mt.Robin Watts
Pull in the latest changes from mainline lcms2, and bugfixes from gs. This should now be the definitive version.
2018-10-12Corrected stream reference counting.Sebastian Rasmussen
2018-10-12Drop separation pixmap upon exception.Sebastian Rasmussen
2018-10-12Drop xref subsection upon exception.Sebastian Rasmussen
2018-10-12Set separation reference count early.Sebastian Rasmussen
This makes it easier to test failure inside the succeeding fz_try().
2018-10-12Drop CMAP upon exception.Sebastian Rasmussen
2018-10-12Drop display list upon exception.Sebastian Rasmussen
2018-10-12Drop default colorspaces upon exception.Sebastian Rasmussen
2018-10-12Drop resources in mudraw upon exception.Sebastian Rasmussen
2018-10-12Drop default colorspaces upon exception.Sebastian Rasmussen
2018-10-12Revert to no CMM if the new CMM engine fails midway.Sebastian Rasmussen
The exception is still thrown, however. This just ensures that CMM is not left in an unknown state.
2018-10-12Keep cmm instance around until all colorspaces have been dropped.Sebastian Rasmussen
By setting ctx->cmm_instance == NULL we actively made sure that fz_cmm_fin_profile() would never call ->fin_profile() to actually clean up the ICC profiles. This could be triggered by doing mutool draw -N even without a file name, triggering a memory leak.
2018-10-12Rethrow exception when unable to create new ICC colorspace.Sebastian Rasmussen
2018-09-21Add fz_lookup_cjk_font_by_name to create builtin CJK fonts.Tor Andersson
2018-09-21Regularize language and script names.Tor Andersson
Drop the unused 'serif' argument to the CJK lookup functions. Use the BCP 47 names for CJK scripts and languages: zh-Hant for traditional Chinese, zh-Hans for simplified Chinese, ja for Japanese, ko for Korean. The lookup function also allows commonly used language+country codes: zh-TW and zh-HK for traditional Chinese, zh-CN for simplified Chinese.
2018-09-20Be consistent in use of #if FZ_ENABLE_...Robin Watts
Using #ifdef FZ_ENABLE_ means we build code in, even if we have defined FZ_ENABLE_WHATEVER to be 0 (as we do in config.h).
2018-09-20Bug 699798: Avoid removing page from list if page was not loaded.Sebastian Rasmussen
MuPDF may attempt to load a page but fail to do so, e.g. due to a circular page tree. When this happens the page will never be introduced into the document's list of pages. Its next and prev pointers are both NULL, but the code in fz_drop_page() falsely assumed that the prev pointer was always set. Thanks to oss-fuzz for reporting.
2018-09-19Add accessor for field text label.Tor Andersson
2018-09-19Make fz_page objects singleton.Tor Andersson
Keep a list of currently open pages for each document. Attempting to load a page that is already loaded will return the same instance again.