Age | Commit message (Collapse) | Author |
|
|
|
|
|
Return TTC subfont index from fz_lookup_noto_font.
|
|
Also support Vertical WMode.
|
|
Also remove useless pdf_new_null and pdf_new_bool functions.
Use the PDF_NULL, PDF_TRUE, and PDF_FALSE macros instead.
|
|
|
|
|
|
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.
|
|
|
|
Force the face_flags to include TRICKY if we detect a DynaLab font
name instead of trying to force hinting ourselves.
|
|
If Bitmap.lockPixels fails with an allocation error, scavenge in
the store.
|
|
Ken reports that a VS2008 import of the projects fails with
complaints about __restrict whereever stdlib.h is included.
Fix the #ifdeffery so that we don't mess with it on VS2008.
|
|
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.
|
|
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.
|
|
|
|
|
|
_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.
|
|
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.
|
|
Don't create a useless pdf_font_desc when writing font resources.
Simplify reference counting by using fewer intermediate variables.
|
|
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".
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the absence of C99 (fz_rect){0,0,1,1} syntax, this will have to do.
|
|
Avoids the silliness of fz_annot_type pdf_annot_type().
|
|
|
|
Call these from the PDF interpreter. Make the DisplayList and
Trace devices cope.
Use these in the SVG output device.
|
|
|
|
Use a FZ_PRINTFLIKE macro instead.
|
|
|
|
|
|
The mupdf build included an implimentation of the pkcs7 functions that
are needed for signing documents and verifying signatures, the
implementation being either an openssl-based one, or a stub that returned
errors. This commit removes the pkcs7 functions from the main mupdf
library.
For the sake of verification, there wasn't really a need for the pkcs7
functions to be part of mupdf. It was only the checking function that used
them. The checking function is now provided as a helper, outside of the
main build. The openssl-based pkcs7 functions area also supplied as a
helper. Users wishing to verify signatures can either use the checking
function directly, or use the source on which to base their own.
Document signing requires more integration between mupdf and pkcs7
because part of the process is performed at time of signing and part when
saving the document. Mupdf already had a pdf_pkcs7_signer object that
kept information between the two phases. That object has now been extended
to include the pkcs7 functions involved in signing, and the signing
function now requires such an object, rather than a file path to a
certificate. The openssl-based pkcs7 helper provides a function that, given
the path to a certificate, will return a pdf_pkcs7_signer object.
The intention is that different implementations can be produced for
different platforms, based on cryptographic routines built into the
operationg system. In each case, for the sake of document signing, the
routines would be wrapped up as a pdf_pkcs7_signer object.
|
|
|
|
Rather than provide a stream and an explicitly defined set of byte ranges
within that stream, provide a stream that gives access to just the bytes in
the ranges.
|
|
This is needed to simplify the way the bytes for hashing are
passed to pkcs7 functions.
|
|
Previously, pdf-pkcs7.c contained mishmash of functions required
for creating and checking signatures, with no separation between
the parts relating to pdf and those relating to pkcs7. This
commit introduces pdf_signature.c which contains the pdf
specifics, leaving pdf-pkcs7.c to be purely pkcs7 functions.
This should more easily allow the use of pkcs7 solutions other
than openssl. The pkcs7 api is declared in pdf-pkcs7.h. It is
entirely free of mupdf specifics, other than using an fz_stream
to specify the bytes to be hashed.
|
|
Previously, errors were reported with a boolean function return
with a char buffer filled out with the reason in the failure
case. Now an enum is used to report the various failure cases.
The function pdf_check_signature has been left as is so that
existing apps will not need changing.
|