[GNC] [GNC-dev] PDF Reports

Adrien Monteleone adrien.monteleone at lusfiber.net
Thu Mar 19 11:59:25 EDT 2020



> On Mar 19, 2020 w12d79, at 10:43 AM, Michael Hendry <hendry.michael at gmail.com> wrote:
> 
>> On 19 Mar 2020, at 13:29, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
>> 
>> Michael,
>> 
>> Out of curiosity, does the built-in print to file (as PDF) or ‘Make PDF' features of GnuCash not produce a proper document for you?
> 
> "Print => Print to File" fails - “Operation not supported”.

Sorry, forgot there was a bug (at least on Mac), which is why this error was returned. (to direct the user to use the MakePDF button)

> "Make pdf" succeeds, but generates a horizontally split row of characters across page breaks, like this:
> 
> https://www.dropbox.com/s/t345r4ex4wfmjgb/Screenshot%202020-03-19%2015.12.47.png?dl=0

Hmmm... It doesn’t split lines for me on Catalina. I tried several reports. Maybe it’s just a hit and miss thing.

> 
> “Print ==> a selected printer” appears to bypass the Mac’s own printer drivers, and produces the same horizontally split lines across page breaks.

I still don’t understand why GnuCash has its own print (or file) dialog instead of just using a system dialog. I’m sure there are past threads about it and it was explained, I just don’t recall at the moment what the reason is. Perhaps it has something to do with not being a native app.

> 
>> 
>> Does opening the HTML in a browser or other app not create a proper document when saving to PDF via the MacOS print facility?
> 
> That works fine, as does Safari’s "File => Export as PDF…”.
> 
> My conclusion is that the problem arises when GnuCash is dealing with the pagination. When it is creating an HTML file it doesn’t have to bother with that aspect, which is dealt with by the browser.
> 
> I chose to go down the shell script route so as to avoid having to (remember to) open each HTML file in Safari and export to PDF every time I made a change in a report and exported it to HTML.

Yes, that is certainly easier.

Regards,
Adrien



More information about the gnucash-user mailing list