Minor question about style sheet footer
Howard M. Fried
cursorsci at gmail.com
Fri Oct 28 07:38:08 EDT 2016
Splendid. Thank you Mr. Ralls. Obviously the significance of "HTML" in
"Select New HTML Style Sheet" just went by me!
On 10/27/16 7:38 PM, John Ralls wrote:
>> On Oct 27, 2016, at 3:41 PM, Howard M. Fried <cursorsci at gmail.com> wrote:
>> Mac OS 9.5, GnuCash 2.6.14: In the Footer field of my style sheet, I’ve have two lines of text, with a carriage return between. However, when I display, print, or save as PDF an invoice using this style sheet, the two lines appear as one (same behavior with the supplied Footer style sheet). Conversely, when I select Print Invoice-->Options, and insert the two lines in the Options Footer field, the output is as desired. However, Options cannot be saved, so the text must be entered for every invoice.
>> I opened the stylesheets-2.0 file with a plain text editor (only way I could do so) and spotted the two lines separated by “\r” (no quotes), which I assume is “return.” For good measure, I added a second return, and stylesheets-2.0 then contained “\n\r”. But everything still appeared on one line.
>> It’s not a problem, just wondering why the \r is ignored when printing directly, but it’s not ignored when using Options.
> Both the \r and \n and any other whitespace characters are converted to a single space because the report is being processed by an HTML renderer and that's what they do. You can use HTML markup to do what you want: Insert <br/> where you want a line break or wrap each line in <p>...</p>. No need to open the stylesheet in an outside editor, either: Just go to Edit>Stylesheets, pick your stylesheet, and click "Edit", then insert your markup in the "Footer" text-entry and click "Apply" or "OK".
> John Ralls
More information about the gnucash-user