Hi, In former pdftex verions 'endstream' was on a line of its own, which is more handy when looking into a pdf file that the current 'end of line' method. Is there a reason for this change? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Sun, 24 Jul 2005, Hans Hagen wrote:
In former pdftex verions 'endstream' was on a line of its own, which is more handy when looking into a pdf file that the current 'end of line' method.
AFAIK, when the patch was tried, sometimes spurious completely empty lines appeared, so the patch was reverted. To be reconsidered... Regards, Hartmut
On 2005-07-24 23:52:18 +0200, Hans Hagen wrote:
In former pdftex verions 'endstream' was on a line of its own, which is more handy when looking into a pdf file that the current 'end of line' method.
The only places where endstream is written without explicit newline before it are in pdftoepdf.cc and writejpg.c and haven't changed since 1.11a ... Actually the newline before endstream is recommended by the PDF reference. I'll look into it. Best Martin -- http://www.tm.oneiros.de
On 2005-07-25 02:04:16 +0200, Martin Schröder wrote:
On 2005-07-24 23:52:18 +0200, Hans Hagen wrote:
In former pdftex verions 'endstream' was on a line of its own, which is more handy when looking into a pdf file that the current 'end of line' method.
The only places where endstream is written without explicit newline before it are in pdftoepdf.cc and writejpg.c and haven't changed since 1.11a ...
And these aren't responsible here. ---------------------------------------- procedure pdf_end_stream; {end a stream} begin if pdf_compress_level > 0 then zip_write_state := zip_finish else pdf_stream_length := pdf_offset - pdf_save_offset; pdf_flush; write_stream_length(pdf_stream_length, pdf_stream_length_offset); pdf_print_nl; pdf_print_ln("endstream"); pdf_end_obj; end; @ Basic printing procedures for PDF output are very similiar to \TeX\ basic printing ones but the output is going to PDF buffer. Subroutines with suffix |_ln| append a new-line character to the PDF output. @d pdf_new_line_char == 10 {new-line character for UNIX platforms} @d pdf_print_nl == {output a new-line character to PDF buffer} if (pdf_ptr > 0) and (pdf_buf[pdf_ptr - 1] <> pdf_new_line_char) then pdf_out(pdf_new_line_char) ---------------------------------------- This would be fine, but pdf_flush sets pdf_ptr := 0, which makes the call to pdf_print_nl a nop. :-( Which doesn't matter in non-compressed state, as pdf_end_text puts a nl after an "ET". Replaced with a direct call to pdf_out(pdf_new_line_char) if pdf_compress_level > 0. This is a mess -- just look at samplepdf.pdf: \pdfobj stream {Hello} creates ---------------------------------------- stream Helloendstream endobj ---------------------------------------- Best Martin -- http://www.tm.oneiros.de
Martin Schröder wrote:
On 2005-07-24 23:52:18 +0200, Hans Hagen wrote:
In former pdftex verions 'endstream' was on a line of its own, which is more handy when looking into a pdf file that the current 'end of line' method.
The only places where endstream is written without explicit newline before it are in pdftoepdf.cc and writejpg.c and haven't changed since 1.11a ...
it was indeed an old file I diffed with (in the process of uncovering another bug [png inclusion vs colorspace access] that taco is now looking into )
Actually the newline before endstream is recommended by the PDF reference.
thanks, Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Hartmut Henkel
-
Martin Schröder