summaryrefslogtreecommitdiff
path: root/source/pdf
AgeCommit message (Collapse)Author
2018-05-09Fix object formatting for null object.Tor Andersson
2018-05-09Remove incorrect assertion.Tor Andersson
A 'null' pdf_obj is also NULL.
2018-05-09Fix 699319: Apply clip path after drawing, not before.Tor Andersson
2018-04-27Use pdf_dict_get_int, etc.Tor Andersson
2018-04-27Add pdf_dict_get_int, etc.Tor Andersson
2018-04-27Add some comments.Tor Andersson
2018-04-25Don't use WMode as part of CJK font lookup.Tor Andersson
Return TTC subfont index from fz_lookup_noto_font.
2018-04-25Support creating both serif and sans-serif CJK fonts in mutool create.Tor Andersson
Also support Vertical WMode.
2018-04-25Check in generated Javascript source files.Tor Andersson
Use a sed script to strip comments and whitespace and add escapes and quote it as a C string literal.
2018-04-25Clean up javascript source.Tor Andersson
2018-04-25Check in generated CMap source.Tor Andersson
Created with the 'scripts/runcmapdump.sh' script.
2018-04-25Update CMaps to latest version.Tor Andersson
Remove UTF8 and UTF32 CMap resources that are not needed for PDF. Add Identity-H and Identity-V resources. Process UCS2/UTF16 and GBK CMaps to usecmap a common subset.
2018-04-25Fix 698779: Wrong type for arguments when creating CCITTFax images.Tor Andersson
2018-04-25Remove document argument from pdf_new_primitive functions.Tor Andersson
Also remove useless pdf_new_null and pdf_new_bool functions. Use the PDF_NULL, PDF_TRUE, and PDF_FALSE macros instead.
2018-04-25Purge unused function: pdf_new_obj_from_str.Tor Andersson
2018-04-25Tweak ordering of constant pdf_obj enums to make PDF_NULL == NULL.Tor Andersson
2018-04-24Remove need for namedump by using macros and preprocessor.Tor Andersson
Add a PDF_NAME(Foo) macro that evaluates to a pdf_obj for /Foo. Use the C preprocessor to create the enum values and string table from one include file instead of using a separate code generator tool.
2018-04-20Limit xref parser to read entry contents.Sebastian Rasmussen
Previously if an xref entry looked like: 0000000000 65535 f 1 0 n 2 the xref entry parsing would try to access the scratch buffer outside of the part populated by the read leading to possibly using uninitalized data.
2018-04-20Add isdigit convenience macro in xref parsing.Sebastian Rasmussen
2018-04-11Fix CMap parsing bug when handling unicode surrogate pair ranges.Tor Andersson
Increment the value after adding the mapping, not before.
2018-04-11Rework how we handle DynaLab tricky fonts in freetype.Tor Andersson
Force the face_flags to include TRICKY if we detect a DynaLab font name instead of trying to force hinting ourselves.
2018-04-08Set pointers to NULL so they can be safely dropped.Sebastian Rasmussen
Previously these were not set to NULL, which caused spurious segmentation errors.
2018-04-04Fix silly typo in pdf_load_compressed_inline_image.Tor Andersson
2018-04-03Don't implicitly drop in fz_open_* chained filters.Tor Andersson
2018-04-03Fix error cleanup in pdf_load_font.Tor Andersson
2018-03-22Use PDF object creation convenience functions.Tor Andersson
Use pdf_dict_put_* convenience functions. Use pdf_dict_get instead of pdf_dict_gets with constant strings.
2018-03-22Use pdf_add_new_dict family of functions.Tor Andersson
2018-03-22Add pdf_add_new_dict family of functions.Tor Andersson
Create a new empty dictionary, add it to the xref and return a new indirect reference object that points to it. This indirect reference needs to be dropped, since it was created with a function using the 'new' keyword.
2018-03-22Use pdf_dict_put_dict family of functions.Tor Andersson
2018-03-22Add pdf_dict_put_dict family of functions.Tor Andersson
pdf_dict_put_dict creates a new empty dictionary, inserts it into the parent dictionary, and returns a borrowed reference to it. These functions should simplify document creation by removing the need to wrap creation with try/catch for reference counting cleanup.
2018-03-22Clean up windows ifdefs.Tor Andersson
_WIN32 is always defined on windows (it means the WinAPI is available). _WIN64 is also defined on 64-bit targets. This means the test for defined(_WIN32) || defined(_WIN64) is redundant, since if _WIN64 is defined, then _WIN32 is always also defined. MSC_VER is only defined for MSVC, so split the ifdef sections in include/fitz/system.h into separate MSVC and WIN32 parts so that we can build with MinGW and other non-MSVC compilers on windows.
2018-03-22Load most annotations, even if they are missing appearances.Tor Andersson
Filter out Link and Popup annotations. Links are not comments, popup annotations are auxiliary information for other annotations, so neither of these types should be present in our list of annotations, but all other annotations should be there, whether they have appearance streams or not. Ensure has_new_ap is zero when first loaded, and changed if either the active AP object is changed or the current AP content stream is updated.
2018-03-22Fix 699085: Use at most 16 bytes from MD5 digests.Sebastian Rasmussen
Previously crypt->len / 8 could be 0..32. In the case of crypt->len == 256 this meant that when an 16 byte MD5 was computed, uninitalized key data would be accessed because 32 bytes of key data was accessed. Now crypt->len / 8 is limited to 0..16. So when the 16 byte MD5 is computed and later accessed only the initialized part of the key data is accessed. Because crypt->len / 8 is now limited to 0..16 the key data buffer can also be shrunk to 16 bytes without risking the code stepping over its boundaries.
2018-03-22Rearrange user password authentication code.Sebastian Rasmussen
pdf_authenticate_user_password() now looks similar to pdf_compute_user_password(), easing readability.
2018-03-22Fix leak of form object when updating text appearance.Sebastian Rasmussen
2018-03-16Fix 699026: Create missing font resource.Tor Andersson
If a widget DR is missing the font name given in the DA, create a new simple font for it.
2018-03-16Simplify PDF font creation code.Tor Andersson
Don't create a useless pdf_font_desc when writing font resources. Simplify reference counting by using fewer intermediate variables.
2018-03-16Add simple fonts with 8-bit greek and cyrillic encodings.Tor Andersson
Use KOI8-U for Cyrillic, and ISO 8859-7 for Greek. Use with 'mutool create' using an extra argument to the %%Font directive: %%Font TmRmC Times-Roman Cyrillic BT /TmRmC 16 Tf 10 10 Td <fa c4 d2 c1 d7 d3 d4 d7 d5 ca d4 c5 21> Tj ET The alternatives are "Latin", "Greek", and "Cyrillic".
2018-03-16Add simple CJK font creation.Tor Andersson
Create a non-embedded CJK font using UTF-16 encoding. This can be used in mutool create like so: %%CJKFont Ming GB1 BT /Ming 10 Tf 100 100 Td <4F60 597D> Tj ET
2018-03-16Use convenience function in pdf_set_annot_contents.Tor Andersson
2018-03-16Add simpler annotation line ending style accessors.Tor Andersson
2018-03-16Add annotation quadding accessor.Tor Andersson
2018-03-16Add annotation opacity accessor.Tor Andersson
2018-03-16Only use BS/W for border width.Tor Andersson
The Border property is long since deprecated.
2018-03-16Do not warn if there are no JBIG2 globals.Sebastian Rasmussen
2018-03-15PDF stream filtering; fix pattern/xobject resource handling.Robin Watts
Patterns and XObjects can have their own resource dictionaries. If they do, use those in preference to the page ones when filtering.
2018-03-07Distinguish between simple and CID font resources in cache.Tor Andersson
2018-02-27Remove pdf_xobject wrapper struct.Tor Andersson
Just use the pdf_obj directly. Revise ap_iteration and split annot->dirty into separate flags. One flag for needs_new_ap, and one for has_new_ap (to be used by clients who may have cached a rendered annotation).
2018-02-27Use fz_point for pdf_set_annot_ink_list and vertices too.Tor Andersson
2018-02-27Improve line ending style accessors.Tor Andersson