mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 02:49:00 +00:00
newline before endstream fix for object streams (fixes #205)
This commit is contained in:
parent
b8ccbff413
commit
078cf9bf90
@ -1,3 +1,9 @@
|
||||
2018-05-12 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* In newline before endstream mode, an extra newline was not
|
||||
inserted prior to the endstream that ends object streams.
|
||||
Fixes #205.
|
||||
|
||||
2018-04-15 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* Arbitrarily limit the depth of data structures represented by
|
||||
|
@ -1907,6 +1907,10 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object)
|
||||
pushEncryptionFilter();
|
||||
writeBuffer(stream_buffer);
|
||||
popPipelineStack();
|
||||
if (this->m->newline_before_endstream)
|
||||
{
|
||||
writeString("\n");
|
||||
}
|
||||
writeString("endstream");
|
||||
this->m->cur_data_key.clear();
|
||||
closeObject(new_id);
|
||||
|
@ -964,7 +964,7 @@ $td->runtest("check output",
|
||||
show_ntests();
|
||||
# ----------
|
||||
$td->notify("--- Newline before endstream ---");
|
||||
$n_tests += 10;
|
||||
$n_tests += 12;
|
||||
|
||||
# From issue 133, http://verapdf.org/software/ is an open source
|
||||
# package that can verify PDF/A compliance. This could potentially be
|
||||
@ -975,6 +975,8 @@ foreach my $d (
|
||||
['--qdf', 'qdf', 'qdf'],
|
||||
['--newline-before-endstream', 'newline', 'nl'],
|
||||
['--qdf --newline-before-endstream', 'newline and qdf', 'nl-qdf'],
|
||||
['--object-streams=generate --newline-before-endstream',
|
||||
'newline and object streams', 'nl-objstm'],
|
||||
)
|
||||
{
|
||||
my ($flags, $description, $suffix) = @$d;
|
||||
|
BIN
qpdf/qtest/qpdf/newline-before-endstream-nl-objstm.pdf
Normal file
BIN
qpdf/qtest/qpdf/newline-before-endstream-nl-objstm.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user