From 781b5a6198aef300bb8f1fdc6681d4756001d3b4 Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Fri, 24 Mar 2017 13:51:36 +0100 Subject: Fix generation of gradient shader function in PDF Add the missing endobj tag for the shader function object. Change-Id: Ieb3cfa5a5d0e27d04164a80b028d41371507fb94 Reviewed-by: Lars Knoll --- src/gui/painting/qpdf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 84e18a64dd..7b53966f81 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -2073,7 +2073,8 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from for (int i = 0; i < gradientBounds.size(); ++i) s << gradientBounds.at(i).function << "0 R "; s << "]\n" - ">>\n"; + ">>\n" + "endobj\n"; write(data); } else { function = functions.at(0); -- cgit v1.2.3