Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
The border_style field was changed from an enum to an array of enums,
but one place where it was used was not updated.
|
|
We don't support tables yet, so this is a stop gap measure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The find_accumulated_margins function should be a void return type.
|
|
|
|
This solves the issue with slivers of images appearing in the margin
at the bottom of the previous page.
|
|
Try to recover from syntax errors in CSS rules by skipping to the
end of the declaration block.
Don't abort HTML parsing on CSS errors.
|
|
|
|
|
|
|
|
Add fz_has_permission function to fz_document.
Add fz_lookup_metadata function to fz_document.
Remove fz_meta function from fz_document.
|
|
Fix bug 695922.
|
|
|
|
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.
|
|
Variables need to be defined at the top of blocks.
|
|
|
|
Add margins of 1 em at the top and bottom of every page at the top level.
TODO: This should be set from the CSS using the @page selector, and be
collapsed with the body margins at the start and end of each chapter, as well
as the left and right body margins.
|
|
|
|
|
|
Trigger the default layout when needed, but only if no manual layout has
been done. This avoids doing a pointless double layout (once with default
when loading the document, then with the manual layout call with the
desired layout options).
|
|
Fixes bug 695909.
|
|
When advancing a glyph in vertical mode, it should advance down the page.
The origin of the glyph as supplied is bottom left, not top right - allow
for this in calculations. Previously glyphs were not being collated into
spans because of this.
|
|
In vertical motion mode, when calculating bboxes we should use
horizontal rather vertical displacements from the 'axis of
movement'.
In horizontal mode, we displace by 'ascender' and 'descender'.
Those concepts don't rotate with the motion mode, so repurpose
those fields to hold bbox.x0 and bbox.x1 in vertical mode.
|
|
|
|
Just for internal use, no external interface.
|
|
Stroke segments that are horizontal or vertical get the same
antidropout treatment as filled rectangles.
|
|
This is not a complete general fix for features dropping out of
rendered line art, but merely a fix for one of the more common
cases.
When rendering rectangles (currently, specifically only those
rectangles that are actually defined as rectangles within the
path structure), if they are axis aligned, then ensure that they
always fill the subpixel line they are on.
|
|
|
|
Inspired by bug 695823. Mutool can now dump the sizes and
orientations for pages within a given file.
|
|
Michael needs to be able to call pdfclean from gsview. At the moment
he's having to do this by including the pdfclean.c file into the lib
build, and then calling pdfclean_main with a faked up command line.
This isn't nice.
pdfclean.c is implemented by pdfclean_main parsing the options/filenames
out of argv and then passing the filenames/options on to a
pdfclean_clean function.
This seems like a much nicer API to offer to the world.
We therefore pull the guts of pdfclean.c (pdfclean_clean and its
subsidiary structures/functions) into pdf-clean-file.c and include
this in the library build.
This leaves pdfclean.c just as the command line parsing.
This should not affect the size of any of the resulting binaries.
|
|
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.
|
|
They hadn't been updated with recent changes. Extract the pdf page
creation code from pdf_load_page into a new static function,
pdf_new_page, and use that from both places.
|
|
When writing a pdf page, we pass page->contents to pdf_new_pdf_device.
This object is assumed to be a dictionary (stream) that can be updated
with the Length and stream contents once the page writing process has
completed.
When we are rewriting a pdf page however, this can go wrong; page->contents
can be an array of objects. Not only this, in general it would be
possible for several pages to share the same page contents (or
maybe some of the elements of a page contents array). Updating one page
should not update the others.
We therefore update pdf_page_write to always create a new page->contents
object and use that.
Thanks to Michael Cadilhac for spotting the basic problem here.
|
|
Silly typo. Thanks to Daniel Bloemer for pointing this out.
|
|
|
|
Calling pdf_is_dict causes the file to seek. This is a bad thing
in a process that is running through the file. It's doubly bad, as
the thing it seeks to read may not be there as it might not have
been repaired yet.
So, instead of just keeping the 'most recent root that is a
dictionary', we change to keeping a list of the roots we have found
while parsing the doc. At the end we then check for the most recent
one that is a dictionary and use that.
|
|
|
|
|
|
When repairing a file we keep track of the most recent 'Root' entry
we have found. Only accept a new Root entry as a replacement if it
is a dictionary.
|
|
... and move outline printing to mutool show.
|