Age | Commit message (Collapse) | Author |
|
|
|
Given a document, generate a gproof file from it. This encapsulates
the name of the file, the desired resolution for proofing, and the
page dimensions of all the pages in the file.
The idea is that an app will call this when it is asked to go into
'proofing' mode, and will reinvoke itself on this file. This gives
the gprf document handler just enough information to fake up a
document of n pages of the required sizes. Each page will then be
autogenerated on demand.
|
|
Doesn't actually trigger generation from ghostscript, or load
images from files generated by ghostscript yet.
|
|
In android, we can't write to '.', and we don't have
TMP defined. Therefore use the path of the supplied file as
a hint.
|
|
MuPDF (the win32/linux viewer) leaks a span_soup each time it
is run, even if (seemingly to the user) no text extraction
operations are done.
This is because the view does a text extraction pass silently,
during which 'begin_page' is called for both page contents and
annotation contents. This causes a leak of a span_soup.
Change the implementation to allocate the span_soup just in time
instead.
|
|
Bug 696061 showed GhostXPS crashing with a SEGV. Checking MuPDF
showed that a fix had already been applied here, but Memento
shows that the fix was causing a leak.
We therefore patch the leak here.
|
|
Important for gproof files.
|
|
Include code to free the list of separation names.
|
|
Hopefully this clarifies the intent.
|
|
This way an app can query the separations on a page, turn them on/off
etc.
|
|
Simple set of functions for managing sets of separations. Separations
have names, equivalent rgb/cmyk colors, and can be enabled/disabled.
|
|
Ensure that subsampling and caching happen in the generic image
code, not in the specific.
Previously, the subsampling happened only for images that were
decoded from streams. Images that were loaded direct were never
subsampled and hence were always cached at full size. After this
change both classes of image are correctly subsampled, and
the subsampled version kept in the cache.
This produces various image diffs in the cluster, none of which
are noticable to the naked eye.
|
|
Previously, we had people calling image->get_pixmap directly. Now we
have them all call fz_image_get_pixmap, which will look for a cached
version in the store, and only call get_pixmap if required.
Previously fz_image_get_pixmap used to look for the cached version
in the store, and decode if not - hence the decoding code is now
extracted out into standard_image_get_pixmap.
This was the original intent of the code, it just somehow didn't end
up like that.
This nicely queues us up for being able to have fz_images that use
a different get_pixel implementation, such as that which will be
required for the gprf code.
|
|
This will be required for the gprf work.
|
|
fz_read_int16le, fz_read_int32le, fz_read_int64le.
|
|
Previously, only the unix executable had been updated to take
command line flags; update the windows one in line with it.
We have to cope with the argv being in Unicode; add a windows
specific version of getoptw for this.
Also note that that fprintf's in the windows mupdf exe won't work
as GUI apps don't have a console window, and can't write to the
parent one. Fixing that is a larger project than I have time
for right now.
|
|
If libcrypto is installed then the Make system will cause
HAVE_OPENSSL to be defined during the build. This pulls in
dependencies on libcrypto, so this needs to be included in
the link.
|
|
We were allocating the ofs array as ints and then filling it
with fz_off_t's.
|
|
When replacing the xref_index, lose the old one.
|
|
MuPDF only.
Call SetProcessDPIAware if it's available; this stops Windows
doing its own horrible scaling causing blurriness.
Also, interrogate the screen display to get the real dpi and use that
as our basis.
|
|
People worrying about the minimal extra memory this takes can
disable it if required.
|
|
I'd missed converting some int's to fz_off_t's.
|
|
MUDRAW_STANDALONE forces mudraw_main to be just main. Set this
in the mudraw VS project.
|
|
They are skipped during layout, so should also be skipped here.
Fixes bug 695943.
|
|
mudraw.c must be included into mutool.
|
|
Use "mutool draw" or symlink mutool to mudraw to use mudraw.
|
|
Only affects EPUB and HTML.
|
|
|
|
Fir typo in pdf_dict_del. Issue and fix both provided by Willus
(William Menninger).
|
|
|
|
Fixes bug 695994 where multiple child selectors would not match properly.
The "a > b > c" rule should be interpreted as ((a > b) > c) in order
to match properly.
|
|
Add -U option to mupdf and mudraw to set a user stylesheet.
Uses a context to store user the stylesheet, just like the AA level.
|
|
|
|
|
|
|
|
|
|
Ignore inheritance on font-size properties altogether. Since we already
inherit the font-size during the 'em' calculations when laying out text,
inheriting the font-size property textually will result in doubling
the effect of any scaling.
|
|
|
|
|
|
|
|
|
|
Add 'break' nodes to flow list for forced line breaks.
|
|
When doing pdf_dict_put, we first call pdf_dict_find to hunt for an
existing entry we can just update.
Recently we introduced a 'location' return from pdf_dict_find that
would (in the non-found case) return the location of where such an
entry should be inserted.
It's just dawned on me that we don't need a separate variable for
this. We continue to return negative numbers for 'not found', but
these negative numbers can contain the insertion point.
|
|
Sebras and Tor spotted that we could get occasional 'warning: cannot seek
backwards' messages. An example command that shows this is:
mutool show pdf_reference17.pdf grep
They further tracked the problem down to the 'sorted' side of the
pdf_dict_find function.
In the binary search, I calculate c to be the comparison value between
pairs of keys. In the case where both keys (names) are in the special
case 'known' range below PDF_OBJ__LIMIT, I use pointer arithmetic for
this. Unfortunately, I was forgetting that the compiler thinks that
pdf_obj *'s are 4 (or 8) bytes in size, so was doing (a-b)/4.
To workaround this I cast both keys to char *'s. This solves the bug.
Thanks to Sebras and Tor for doing the hard work in tracking this down.
|
|
Firstly, when displaying a list of nested blocks, don't suppress
outputting a block just because it contains a pointer to itself.
Various valgrind fixes from the gs version of memento.
Experimental C++ operators. See writeup in memento.h comments for
how to integrate.
|
|
Use: "make largefile=yes" to force largefile support on. At the moment
it defaults to off.
|
|
If FZ_LARGEFILE is defined when building, MuPDF uses 64bit offsets
for files; this allows us to open streams larger than 2Gig.
The downsides to this are that:
* The xref entries are larger.
* All PDF ints are held as 64bit things rather than 32bit things
(to cope with /Prev entries, hint stream offsets etc).
* All file positions are stored as 64bits rather than 32.
The implementation works by detecting FZ_LARGEFILE. Some #ifdeffery
in fitz/system.h sets fz_off_t to either int or int64_t as appropriate,
and sets defines for fz_fopen, fz_fseek, fz_ftell etc as required.
These call the fseeko64 etc functions on linux (and so define
_LARGEFILE64_SOURCE) and the explicit 64bit functions on windows.
|
|
|
|
|
|
|