pcorless / icepdf

PDF Rendering and Viewing API in Java
Apache License 2.0
84 stars 21 forks source link

NEWLINE in BaseWriter is CRLF #320

Closed gtache closed 12 months ago

gtache commented 1 year ago

Is there a reason it is the Windows newline instead of the "simple" LF? E.g. a file that has been modified: 2023-11-28_12h12_17

This is mostly for aesthetic reasons but if the CR is not needed by the specification or for compatibility reasons I guess it would make sense to drop it?

pcorless commented 12 months ago

Interesting comment as it just one of those things that always been done that way. I guess the output of CR LF varies a bit from text viewer to text viewer. I revisited the spec and there are a few corner cases where CR LF is expected but in general it reads like LF is just fine. I'm all for saving a few bytes of data where possible.

pcorless commented 12 months ago

Interesting comment as it just one of those things that we've always done. I guess the output of CR LF varies a bit from text viewer to text viewer. I revisited the spec an there are a few corner cases where CR LF is expected but in general it reads like LF is just fine.