diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-05-14 19:34:35 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-05-31 13:26:00 +0100 |
commit | 65b8ae915465849babc1fa712971c701136f4ed5 (patch) | |
tree | 9724b5951eb266f7192c647d4fb26a127cd901fd /pdf/pdf_nametree.c | |
parent | 97716e53a6fa6947a183ed88df54702f96ba97b5 (diff) | |
download | mupdf-65b8ae915465849babc1fa712971c701136f4ed5.tar.xz |
Add linearization to pdf_write function.
Extend mupdfclean to have a new -l file that writes the file
linearized. This should still be considered experimental
When writing a pdf file, analyse object use, flatten resource use,
reorder the objects, generate a hintstream and output with linearisaton
parameters.
This is enough for Acrobat to accept the file as being optimised
for Fast Web View. We ought to add more tables to the hintstream
in some cases, but I doubt anyone actually uses it, the spec is so
badly written. Certainly acrobat accepts the file as being optimised
for 'Fast Web View'.
Update fz_dict_put to allow for us adding a reference to the dictionary
that is the sole owner of that reference already (i.e. don't drop then
keep something that has a reference count of just 1).
Update pdf_load_image_stream to use the stm_buf from the xref if there
is one.
Update pdf_close_document to discard any stm_bufs it may be holding.
Update fz_dict_put to be pdf_dict_put - this was missed in a renaming
ages ago and has been inconsistent since.
Diffstat (limited to 'pdf/pdf_nametree.c')
-rw-r--r-- | pdf/pdf_nametree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf/pdf_nametree.c b/pdf/pdf_nametree.c index b24d2c24..73755e22 100644 --- a/pdf/pdf_nametree.c +++ b/pdf/pdf_nametree.c @@ -134,12 +134,12 @@ pdf_load_name_tree_imp(pdf_obj *dict, pdf_document *xref, pdf_obj *node) if (pdf_is_string(key)) { key = pdf_to_utf8_name(ctx, key); - fz_dict_put(dict, key, val); + pdf_dict_put(dict, key, val); pdf_drop_obj(key); } else if (pdf_is_name(key)) { - fz_dict_put(dict, key, val); + pdf_dict_put(dict, key, val); } } } |