Age | Commit message (Collapse) | Author |
|
pdf_parse_file_spec sometimes extracts the wrong path from a FileSpec:
E.g. the /DOS path should never be returned under Unix systems, neither
should be the old /Mac paths.
For consistency, this patch also converts filesystem paths under
Windows into a format applications will expect (e.g. from "/C/path/..."
to "C:\path\...").
Finally, pdf_parse_file_spec is exposed to callers (SumatraPDF requires
that for manually processing FZ_ANNOT_FILEATTACHMENT and embedded files).
|
|
When watermarking, we may want to use the PDF device on an
existing buffer. In this case, we have no 'contents' object.
|
|
In order to be able to watermark etc, we want the ability to
add more operators/resources after page cleaning.
Add a post processing hook to enable this to be done more
easily.
|
|
Add missing initialisation of glo.ctx required due to API
change.
|
|
A few casts are required within the code, along with a few #ifdef
changes.
Some tweaks to curl are required too.
|
|
|
|
|
|
This silences this warning:
thirdparty/jbig2dec/jbig2_text.c:899:73: warning: for loop has empty body [-Wempty-body]
for (SBSYMCODELEN = 0; (1 << SBSYMCODELEN) < SBNUMSYMS; SBSYMCODELEN++);
^
thirdparty/jbig2dec/jbig2_text.c:899:73: note: put the semicolon on a separate line to silence this warning
|
|
There are a fair number of warnings about unused functions, mostly in
third-party modules, and we would like the build to be warning free.
We need to change the main Makefile, as -Wall is currently added in
Makerules, and we need our -Wno-unused-function in XCFLAGS to be
after -Wall on the command line for it to have any effect.
|
|
|
|
|
|
Silly oversight.
|
|
Update android Core.mk file for html document handler, and fix a
stray fz_free_page that didn't get updated.
|
|
We were not filling in the matrix and bbox fields for images
collected as part of the text extraction device. Fixed here.
|
|
When we meet cached tiles when rendering the display list, we need to
skip over their contents. Previously we did this by skipping
display list nodes in their entirety.
With the new display list scheme however, we cannot simply skip
nodes completely as the graphic state changes must be remembered.
We therefore update the list playback routine to keep track of the
clip depth and to skip the function calls as required.
|
|
I was testing an untransformed rectangle. This was not being picked up
as our cluster tests use the identity matrix.
|
|
Add the new source files to the solution.
Windows builds whinge about float->double conversions. Fix these
with explicit casts.
Avoid calling strtof and strcasecmp.
|
|
The example file for this bug has an invalid font bbox. The current
code uses this bbox (or some multiple of it) to clip the glyphs
size.
In the new code, when we convert the glyphs to display lists we
watch for the bbox given in any d1 operator used. If we find one,
we gather the rectangle specified and store it as the glyph rectangle
in the fz_font.
If we then attempt to bound a glyph that used d1, it happens instantly
without needing to run the list. This seems to match acrobats behaviour.
Tests indicate that Acrobat never clips d0 glyphs, so our behaviour
is still different here, but I am not changing this at the moment.
Also, I note that t3flags should be a un unsigned short but are currently
just a char. Fix that too.
Also fix some missing code in fz_new_font that would cause leaks if mallocs
failed.
|
|
Move the logic in pdf_show_char to use the same idiom as used
elsewhere. Specifically this ensures that empty rects are
handled correctly.
|
|
This avoids up problems with a forthcoming commit.
|
|
|
|
Conflicts:
Makefile
|
|
|
|
|
|
Whenever we fz_keep a path, it's an indication that we're going to be
keeping the path around for a while (anod not changing it any more).
We therefore take the opportunity to trim the path buffers down.
|
|
Rather than a linked list of display nodes, we use solid block of
serialised data. We send a 32bit word, which contains various bitfields.
These bitfields indicate the command type, and the presence or absence
of various fields (such as paths, colorspaces, colors etc).
If these fields are not present, they are held to be the same as the
previous values.
|
|
Thanks to malc for pointing out the problem.
|
|
|
|
|
|
|
|
|
|
|
|
Add locks around fz_path and fz_text reference counting.
|
|
fz_open_file does not return NULL on failure -- it throws an exception!
|
|
Purge several embedded contexts:
Remove embedded context in fz_output.
Remove embedded context in fz_stream.
Remove embedded context in fz_device.
Remove fz_rebind_stream (since it is no longer necessary).
Remove embedded context in svg_device.
Remove embedded context in XML parser.
Add ctx argument to fz_document functions.
Remove embedded context in fz_document.
Remove embedded context in pdf_document.
Remove embedded context in pdf_obj.
Make fz_page independent of fz_document in the interface.
We shouldn't need to pass the document to all functions handling a page.
If a page is tied to the source document, it's redundant; otherwise it's
just pointless.
Fix reference counting oddity in fz_new_image_from_pixmap.
|
|
Rename fz_close to fz_drop_stream.
Rename fz_close_archive to fz_drop_archive.
Rename fz_close_output to fz_drop_output.
Rename fz_free_* to fz_drop_*.
Rename pdf_free_* to pdf_drop_*.
Rename xps_free_* to xps_drop_*.
|
|
|
|
Disallow modification of shared fz_path and fz_text objects.
They should follow a create once, consume often pattern, and as such should
be immutable once created.
|
|
|
|
We end up trying to scale the JPEG up 72 times and fail a malloc.
A better plan is to make the image handler disbelieve any xres or
yres values less than 72dpi. We take care to still preserve aspect
ratios etc.
|
|
If this release is not done, the previous documents
pages appear in the preview and bad things happen if
you try to step through the pages in the preview.
|
|
image.
Currently if the source was a png, jpeg or cbz file we can't do conversions with
ghostscript and also we can't print. So I will disable the controls for now and
we can look into adding that functionality later if we want.
Disable printing capability for image based formats.
Currently printing is all XPS based. If the source
document is JPG, PNG or CBZ we don't currently have
a method for creating the XPS content for these. We
could do a bitmap print or possibly wrap up the images
in a XPS file or just do a direct bitmap print via some
C# magic. I need to investigate. For the short time,
though it is simply disabled.
|
|
|
|
Addition of license information. Also changes to ensure registry keys used
by application are removed during the uninstall. Many changes in the
installer code to ensure that the file type associations are made and the
proper icons are displayed for each file type.
|
|
Add the new URW base fonts that include greek and cyrillic scripts.
These new fonts remove the need for DroidSans as a generic fallback font.
|
|
|
|
The form of delete should match the form that is used in the new command.
Otherwise the behavior is undefined.
|
|
|
|
|
|
The commit fc05b51c2b198dcc5553f6de1b8fb0e22e7d28ae cleaned up a few issues in the
display list cache but it introduced issues when multiple threads are using the lists.
In particular one thread could be using a list at the tail of the cache list, while
another thread is adding one to the cache, and removing the entry at the tail. The
solution is to make sure the ref count of the list is incremented when someone is using the list
and making sure that it gets decremented when they are done with the list.
|