| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
There are several places where we overflow a signed integer calculation of
"planestride * comp_num" when the transparency buffer exceeds 2Gb when doing
the alpha blending suring put_image. Fix by forcing the calculation to
uint64_t.
|
|
|
|
|
|
|
|
|
|
|
| |
Linux sends a UEL at the end of a job, windows does not. This
causes files that end in (for example):
<UEL>@PJL LPORTROTATE
(with no trailing return) to give an error.
Windows and linux now behave the same.
|
|
|
|
|
| |
The ijs device initialize_device proc allocates memory, thus the
dev->memory must be set up prior to this call in gx_device_init.
|
|
|
|
|
|
|
|
|
| |
Bug #703862 "Feature request: adapt lib/zugferd.ps to newer versions of the ZUGFeRD standard"
In the bug Adrian Devries has considerably expaneded on the
original zugferd.ps program, fixing a bug or two and adding the
ability to choose between production of several different versions
of the ZUGFeRD (aka Factur-X) standard.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FAPI "refined" (replaced!) the FontBBox with one read from the FAPI server.
For example, with TTF it will use the values from the "head" table.
That is required, to get an accurate bounding box for, for example, TTF fonts
or MicroType fonts.
But it can cause problems in certain cases: one is when a Type42 font includes
a "customised" FontBBox for specific purposes (which may not be strictly "legal"
but should work). In a case more in-line with the spec, the values from the
TTF "head" table will be drawn from the complete, original font, which may not
be accurate for a subset font.
Type 42 and Type 1/2 fonts are *always* serialized in the FAPI API, never
handled as a file or full font buffer.
So, this changes FAPI to only do the "refinement" when it's dealing with an
entire font (either in a memory buffer, or direct from a font file).
|
|
|
|
|
| |
If the font is symbolic, just ignore the invalid encoding. If not, return
an error (as before).
|
|
|
|
|
|
| |
The problem is caused by incorrect name table in the font. Following the
existing case of 0-lenth table, this patch quietly returns "not found" if the
search fails for any reason.
|
|
|
|
| |
It had been mistyped as ARCH_SIZEOF_SIZET
|
|
|
|
|
| |
Older gcc versions give the error:
"#pragma GCC diagnostic not allowed inside functions",
|
| |
|
|
|
|
|
|
|
|
| |
Fixed on Windows, Linux, and Mac where the build scripts would
use the wrong manifest file. The Windows build script for gsviewer
now builds and copies gsjava.
Updated READMEs to reflect these changes.
|
|
|
|
|
| |
To turn off aniti-aliasing need to set TextAlphaBits and GraphicsAlphaBits to
one, not zero.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PDF/A requires that the XMP metadata and the Document information
dictionary entries which have corresponding XMP keys must be the same.
Byte for byte the same. This means that characters in document
information dictionary strings which must be escaped, or represented in
octal, can't be used.
However, 'arbitrary keys', as defined in the pdfmark reference, do not
correlate with keys in the XMP Metadata and do not need to conform to
this restriction.
This commit checks the keys to see if they are XMP keys before checking
to see if they need to be escaped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug #703787 "Extending the catalog /Names entry"
The bug is nothing to do with the actual description :-(
If a name for a Key/Value contains 'non regular' characters then it is
converted to an internal form with two preceding and one terminating
NULLs. I don't know why we do this, I don't really believe it's
required (as noted in gdevpdfm.c line 875). However I'm loath to
alter it without a good reason because there is no practical way to
test this.
When emitting that name, the pdfmark code stripped the two preceding
NULLs, but omitted to strip the terminating NULL, leading to an invalid
string, in this case for the /Dest.
Strip the terminating NULL as well to avoid this.
|
|
|
|
|
|
|
| |
This came from an expanded version of the BEGIN_ARRAY_PARAM/
END_ARRAY_PARAM macros. Interesting that it didn't complain
about them in macro form (or maybe someone has marked the
macros in coverity already?)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2103d52da9519ded2af60f10aceab0ecd74da6a8.
While the concept of using 'upcalls' works, in that "higher" devices
can be correctly informed of changes in "lower" devices, it hits
problems in what you can actually do when the upcalls happen.
In this instance, we have an Nup device subclassing an epo device
subclassing a png16m device. Then png16m device spots a change in
mediasize, and so has to reallocate the memory its using. So
it sends an upcall.
The Nup device recieves the upcall, and decides to act on it, by
flushing the nest, thus sending outputpage to the epo device.
The epo device sends the fillpage and outputpage on, and unsubclasses
to remove itself from the chain. Due to the nature of unsubclassing
the png16m device moves from it's current allocated block INTO the
block previously used for the epo device. The old block is then
freed.
Upon return from the upcall, the png16m device tries to actually do
the realloc that it had been signalling for, but the pointer it
was holding is out of date, and we crash.
We have so far been protected from this by the fact that we're
always picking up the reallocs before they happen, and so nothing
happened on the upcalls. Attempting to remove that code showed
up the problem.
So we remove the upcall code entirely and will rely on the old
method of spotting parameter changes. If inspiration strikes us
as to how to make this work safely, we can pull this back out of
git.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Document its existence!
Add notes about NEWPDF
Document those PostScript functions that we (or I) have promised to
maintain.
Still to do: document the new PostScript operators for the new
interpreter, come up with some example programs
|
|
|
|
|
|
| |
Allowed .md file (Java .jar manifest files) to have blank lines at
the end of the file; this was required by Java to be a valid
manifest file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This script installs the required libraries in
/usr/lib so projects using it can be run.
Fixed build scripts on Mac
Added install_darwin.sh and fixed start_darwin.sh allowing Mac
instances of the viewer to run correctFixed build scripts on Mac
Renamed Manifest.txt files to have .md extension
This will be to allow newline characters at en of line, and to match
the internal extension of Java JAR manifest files.
Updated names of build scripts
Done to improve clarity of which scripts are used for which
operating system.
|
|
|
|
|
| |
The build scripts are named the same as the Linux build
scripts except they are suffixed with "_darwin".
|
|
|
|
|
|
| |
in callbacks.cpp, a JNI function was being called requiring variadic
arguments. The function was passed a non-primitive type (a Reference
object). Fixed by calling its object() member function.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Prompted by a Coverity report: fonts contain a key_name and font_name entry
which, in theory, can be different, but in pdfi (currently) never are.
Nevertheless, it makes sense to ensure the buffers are sufficient individually,
rather than assume the two are, and always will be, the same.
|
| |
|
|
|
|
| |
Move null pointer check to the start of the function.
|
|
|
|
| |
Ensure we've created a valid C string before making a PDF name out of it
|
|
|
|
| |
Moving the null pointer check hopefully keeps coverity happy.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a chain of problems. Firstly we were unconditionally setting
the 'init_graphics' parameter to pdfi_check_page() which caused it to
close and reopen the device. This throws away the Media Size, CTM and
any cropping/rotation etc which we set up in the PostScript world.
Resolving that then showed that we were not resetting the number of
spots on each page.
Resolving that then showed up a failure to determine that a device was
spot colour capable, because we were doing the pdfi_check_page() call
to retrieve the per-page transparency and spot information when the
PDF graphics state wasn't pointing to the PostScript graphics state,
which meant we were using the nulldevice.
This commit fixes all of the above problems. The various spot-capable
devices now render their content to the correct size/orientation/clip
and get the correct number of spots.
|
| |
|
|
|
|
|
| |
Norbert Janssen spotted this regression with fixing 703885, see
comment #14 in the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here, we add a generic mechanism for child devices to send information
to parent devices, and introduce the first use of it.
Using the dev_spec_op mechanism, together with the 'parent' pointers
kept for subclassing, we define a new 'gx_upcall' function that
sends information up to the topmost device (where it can then trickle
down again using the usual dev_spec_op handling).
We define the first such use of this facility as being the
'gx_upcall_device_realloc' event. This should be sent by a device
just before it reallocates the memory it is using for the page
buffer. This allows the Nup device to spot this, and know that it
should flush the nest to avoid rendered pages being lost.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In merging master to pdfi in the past, it appears a couple of changes
got dropped by accident. Reintroduce them here.
Firstly, in gdevp14.c, Michael had removed the gx_device *dev param
to pdf14_find_backdrop_buf as it was unused in commit
b1ac0686eea6adcf ("Bug 702117 Knockout groups containing non-isolated
groups").
Secondly, in gdevppla.c, I'd removed a blunt force memset in favour
of a more nuanced check in commit: e21027b895f3 ("Better fix for
psdcmyk indeterminisms").
|
|
|
|
|
| |
We never use the 'flush' parameter to nup_flush_nest_to_output,
so remove it.
|
|
|
|
|
|
|
|
|
|
| |
This prevents us suddenly having to flush the nest when
PageUsesTransparency changes. This would otherwuse result
in unexpected changes in the way pages are laid out.
This obviously affects whether we use clist or not in some
cases, but does not (currently at least), I believe, cause
extra work with transparency blending.
|
|
|
|
|
| |
This got turned on, and accidentally left on, in the pdfi branch. Turn
it off again.
|
|
|
|
|
|
| |
These are freed when the text enumerator is released, they need to be
set to NULL so that we don't try and free uninitialised pointers if we
never received any real text.
|
|
|
|
|
| |
Properly calculate the size of the spot function table for us as a
loop counter bounds check.
|
|
|
|
| |
Silences a compiler warning
|
|
|
|
| |
Drop calculation of offset which will be overwritten.
|