Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
|
|
Saves having the same threading code repeatedly.
|
|
Also expose the argument to JS and JNI.
|
|
Move the definition of the structure contents into new fitz-imp.h
file. Make all code outside of fitz access the buffer through the
defined API.
Add a convenience API for people that want to get buffers as
null terminated C strings.
|
|
|
|
Add missing API comments.
Move private definitions to implementation headers or C files.
Move internal functions to implementation headers.
|
|
This commit adds a new -y flag to mutool draw. -y takes an
additional argument - this can either be a single 'l' meaning
"list the layer configs available", or a comma separated list
of numbers.
The first number in the list says which "layer config" to
select. Subsequent numbers identify lines in the config to
toggle.
For instance I might do:
mutool draw -y l -o out.png layers.pdf
and this will list me the layer configs in the file (as well
as rendering normally).
From this I might choose layer config 0:
mutool draw -y 0 -o out.png layers.pdf
This will select layer config 0, and show a table (max 1 layer
per numbered line) that shows which layers are on or off.
If I then decide that I want layers 3 and 4 to be toggled from
their default state, I can run:
mutool draw -y 0,3,4 -o out.png layers.pdf
Short of implementing an interactive configuration mode, this
is the simplest way to demonstrate the layer functionality.
|
|
|