lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Logo on group quotes but not illustrations


From: Greg Chicares
Subject: Re: [lmi] Logo on group quotes but not illustrations
Date: Thu, 23 Aug 2018 00:00:44 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-08-09 14:24, Vadim Zeitlin wrote:
> On Thu, 9 Aug 2018 13:18:59 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> On 2018-08-09 12:32, Vadim Zeitlin wrote:
> GC> > On Thu, 9 Aug 2018 12:21:32 +0000 Greg Chicares <address@hidden> wrote:
> GC> > 
> GC> > GC> I see no logo whatsoever, on any page.
> GC> > 
> GC> >  I'm sorry, I don't know what's going on here. Could you perhaps remove 
> the
> GC> > "wxLogNull" line from ledger_pdf_generator_wx.cpp to see if you get any
> GC> > errors when trying to load the image?
> GC> 
> GC> Thanks. Now it's fixed. I see:
> GC> 
> GC> 12:50:53: can't open file 'Z:/opt/lmi/data/company_logo.png' (error 2: 
> File not found.)
> GC> 12:50:53: Failed to load image from file 
> "Z:/opt/lmi/data/company_logo.png".
> GC> 
> GC> [repeats sixteen times]
> GC> 
> GC> I think I'll change the code so that it handles failure there in the
> GC> same way that it handles failure to load a similar file elsewhere:
> GC> i.e., showing an explicit diagnostic.
> 
>  Just as a reminder, we'd explicitly decided that the absence of the image
> file shouldn't result in an error before. AFAIR I didn't really understand
> the rationale for it back then and, even if I had, I must have forgotten it
> because I definitely don't know what could it be today. But there was some
> reason to do it like this.

Your recollection is correct. I wanted to maintain the invariant that lmi
is immediately and fully usable as published, without any proprietary
extra files such as these graphics. OTOH, production PDFs should always
have such graphics: in production, their absence should be a hard error.
Well, if dogs can venture into the cosmos, then surely I can solve a
problem like this. Now all I need to do is move those cosmic PNGs from
gwc/ into its parent directory, and then make their absence a hard error,
i.e., alarum() instead of warning().

But I can't do that until they fit on the cover page: if I do it now,
I can't create illustration PDFs myself. What's a tidy solution to that
problem? Must I really shrink 'company_logo.png', e.g., with the GIMP?
Is the PNG height the crucial parameter? For instance, would any PNG with
a height of forty pixels be enough to avoid assertion failures?

> GC> $ls /opt/lmi/bin/company_logo*                            
> GC> /opt/lmi/bin/company_logo.jpg  /opt/lmi/bin/company_logo.png
> GC> $ls /opt/lmi/data/company_logo*                          
> GC> zsh: no matches found: /opt/lmi/data/company_logo*
> GC> 
> GC> All graphics files reside in data/ except these:
> GC> 
> GC> /opt/lmi/src/lmi[0]$ls /opt/lmi/bin/*.png       
> GC> /opt/lmi/bin/company_logo.png  /opt/lmi/bin/group_quote_banner.png
> GC> /opt/lmi/src/lmi[0]$ls /opt/lmi/data/*.png |wc -l
> GC> 109
> 
>  Sorry, I had totally failed to realize this. How did it happen exactly,
> anyhow? The "install" target in workhorse.make seems to copy all .png files
> (which are part of $(data_files)) to $(datadir), not $(bindir).

It was more an accident than a choice. This is one of probably hundreds
of dubious aspects of the XSL-FO design, all of which can now be
reconsidered and replaced by rational design decisions.

> GC> and, curiously, for the "cover page", which has a logo for other
> GC> ledger types, but not this one (most likely because the original
> GC> XSLT behaved that way).
> 
>  Yes, the original XSL-OF just didn't use the image for the cover page for
> this particular kind of illustrations and I've copied this.

I think the logo is missing for the 'sample2?pp.*' products. It should
be on the cover page for all formats. If you're looking for things to
do, this needs doing.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]