Age | Commit message (Collapse) | Author |
|
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
|
|
|
|
A nicer fix wouldn't require this #ifdeffery everywhere. Maybe
later.
|
|
That's where it's actually being used.
|
|
|
|
If DISABLE_MUTHREADS is set, don't include the thread helper library.
If FZ_ENABLE_PDF is 0, don't include mupdf/pdf.h.
|
|
Don't use FMT_zu macro for fz_throw/fz_warn, since we can portably handle '%zu'
in our own printf formatting.
|
|
This makes is possible for JNI code to depend on the
library for error handling.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In keeping with the rest of the code.
|
|
It seems odd for a document writer to pass a device pointer
out, and then require it to be passed back in.
Hide that in the public API.
|
|
Allow mutool convert to output all image formats we can write.
Add sanity checks for pbm and pkm writers.
|
|
|
|
Rename fz_write to fz_write_data.
Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*.
Be consistent in naming:
fz_write_* calls write to fz_output.
fz_append_* calls append to fz_buffer.
Update documentation.
|
|
|
|
|
|
Update mutool to call it.
|
|
Annoyingly TGA requires lines to be written from bottom to top,
so require callers to flip the image.
Also fix TGA to cope with alpha or not.
Update mutool draw to use band writer interface for TGA.
|
|
Remove needless parameter passing in fz_band_writer API.
We always know the bandstart, so why make the caller keep track
of it and pass it in?
Similarly, we know when we hit the end of the page, so why
require us to trigger the trailer writing manually?
|
|
|
|
Not number of coordinates.
|
|
Also add explicit viewBox and width/height to image symbol and use
elements, to work around a strange clipping/image scaling issue
with firefox.
|
|
Now mutool convert can write SVG documents.
|
|
|
|
This avoids allowing 0,z as a valid selection.
|
|
|
|
This was leading to memory leaks on the dev board.
|
|
|
|
Valgrind doesn't know realloc(p, 0) is equivalent to free(p), so
unfortunately we can't reduce all calls to just realloc().
|
|
|
|
SVG output in mutool produces a file per page; attempting to
reopen the same file each time was tripping the new fz_remove
call. Now only open a page at a time.
|
|
This moves dropping the converted pixmap into fz_convert_pixmap(),
which relieves every caller from doing so. Moreover resolution,
position and interpolation are kept.
|
|
|
|
|
|
Windows cannot remove open files, so we can't save non-incrementally
to the same file name as the open document. Force incremental saves
if the input and output file names are the same.
NOTE: We will also create corrupt files if saving a new document incrementally,
so take care not to turn on incremental saves if we have created a new blank
document.
|
|
Will overwrite input file unless a separate output file is specified.
|
|
New PDF Portfolio manipulation API.
Simple mutool 'portfolio' tool for listing/extracting/embedding
files.
|
|
|
|
Previously, attempting to put an object beyond the end of
an array would throw an error. Here we update the code to
allow objects to be placed *exactly* at the end (i.e. to
extend the length by 1).
Update js use of pdf_array_put.
|