Age | Commit message (Collapse) | Author |
|
New PDF Portfolio manipulation API.
Simple mutool 'portfolio' tool for listing/extracting/embedding
files.
|
|
|
|
When saving a PDF to the same file name as the one that is open,
we risk clobbering it by truncating the source file. Remove the old
file first! Removing an open file will not work on windows,
but there we will throw an EACCESS error rather than clobber the file!
|
|
|
|
We were incorrectly calling pdf_update_object to try to make sure that
an edited array was going to be saved during incremental saves.
This call was both buggy and unnecessary.
|
|
pdf_array_delete and pdf_dict_put_val_null weren't calling this function.
|
|
It's only used to 'fix' duff indirect references when cleaning PDF
files. Writing general values into dictionaries should be done by key,
not by internal index.
|
|
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.
|
|
We use pdf_mark_obj/pdf_unmark_obj to catch cycles when
traversing PDF structures. In some cases we were failing
to actually test the return code, making it pointless.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sorting with LC_ALL set to anything other than "C" is folly!
|
|
Saves having the same threading code repeatedly.
|
|
|
|
|
|
|
|
Silences unused variable warnings on gcc.
|
|
|
|
|
|
|
|
Ignore invalid page references in outlines.
This was shown by a file that had [null 0 0 1] as a link dest.
Attempting to parse that threw an error, which caused the whole
outline load to fail.
|
|
Only libcrypto is used to do checking of digital signatures.
The SSL library openssl is never used.
|
|
|
|
Actually an assert. This is caused by a paragraph separator in the
text. The Unicode Bidirectional Algorithm says we should operate
paragraph by paragraph, and includes code to split paragraphs
at paragraph markers, changing their type to boundary neutrals
as it goes.
The use of this code was left "as an exercise for the reader" in
the example code, so we simply hook it up here.
|
|
As per Adobe's recommendation:
https://helpx.adobe.com/acrobat/kb/link-html-pdf-page-acrobat.html
|
|
We would not create a link box for the "bar" text in links of the form:
<a href="foo"><span>bar</span></a>.
|
|
|
|
Also expose the argument to JS and JNI.
|
|
first used.
|
|
's' is char * and unsigned char * is expected.
|
|
Don't try handling them both as links and form widgets.
|
|
|
|
|
|
Hide pdf_is_hidden_ocg from the public interface.
Ensure that RBGroups and Order properly fall back to the default
entries if they are missing in the OCCDs.
Add pdf_set_layer_config_as_default. This sets the default
layer config to be current one. This destroys the current
default dictionary, but we leave the other configs intact.
|
|
Move internal functions from public to private headers.
|
|
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.
|
|
A line width of 0 has special meaning in PDF files. SVGs don't
understand it, so modify our SVG output device to send all line
widths smaller than 1 as being 1.
|
|
Correctly transformed target coordinates for PDF.
Target coordinates for EPUB and HTML.
|
|
|
|
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.
|
|
Add API to:
* allow enumeration of layer configs (OCCDs) within PDF files.
* allow selection of layer configs.
* allow enumeration of the "UI" (or "Human readable") form of layer
configs.
* allow selection/toggling of entries in the UI.
|