PDF filenames for reports

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

PDF filenames for reports

Mike Evans-3
When exporting invoices etc. to pdf to the file names are of the form Invoice-000141-23_04_14.pdf.  I want to change this to either; have the date format follow the format set in Preferences (I think it should anyway), or get rid of the date altogether.  I've tried using dconf-editor (fedora) but I can't find the key to edit this setting.  It was editable under the old settings regime using gconf-editor and the same key should be available in gsettings but it doesn't appear to be.

Any ideas?  Is this a bug/feature?

Mike E

--
Anti NSA?  Use PGP.
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x00CDB13500D7AB53 
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: PDF filenames for reports

Geert Janssens
On Wednesday 23 April 2014 10:47:44 Mike Evans wrote:

> When exporting invoices etc. to pdf to the file names are of the form
> Invoice-000141-23_04_14.pdf.  I want to change this to either; have
> the date format follow the format set in Preferences (I think it
> should anyway), or get rid of the date altogether.  I've tried using
> dconf-editor (fedora) but I can't find the key to edit this setting.
> It was editable under the old settings regime using gconf-editor and
> the same key should be available in gsettings but it doesn't appear
> to be.
>
> Any ideas?  Is this a bug/feature?
>
> Mike E

Hmm, can you remind me which setting this used to be ? Perhaps it didn't
survive the conversion to gsettings. But I don't remember deliberately
removing this.

Geert
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: PDF filenames for reports

Mike Evans-3
On Wed, 23 Apr 2014 16:46:59 +0200
Geert Janssens <[hidden email]> wrote:

> On Wednesday 23 April 2014 10:47:44 Mike Evans wrote:
> > When exporting invoices etc. to pdf to the file names are of the form
> > Invoice-000141-23_04_14.pdf.  I want to change this to either; have
> > the date format follow the format set in Preferences (I think it
> > should anyway), or get rid of the date altogether.  I've tried using
> > dconf-editor (fedora) but I can't find the key to edit this setting.
> > It was editable under the old settings regime using gconf-editor and
> > the same key should be available in gsettings but it doesn't appear
> > to be.
> >
> > Any ideas?  Is this a bug/feature?
> >
> > Mike E
>
> Hmm, can you remind me which setting this used to be ? Perhaps it didn't
> survive the conversion to gsettings. But I don't remember deliberately
> removing this.
>
> Geert

Hi Geert

using gconf-editor it's (was) in: /apps/gnucash/general/report/pdf_export/(filename_format and filename_date_format)

Mike E


--
Anti NSA?  Use PGP.
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x00CDB13500D7AB53 
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: PDF filenames for reports

Geert Janssens
On Wednesday 23 April 2014 16:01:18 Mike Evans wrote:

> On Wed, 23 Apr 2014 16:46:59 +0200
>
> Geert Janssens <[hidden email]> wrote:
> > On Wednesday 23 April 2014 10:47:44 Mike Evans wrote:
> > > When exporting invoices etc. to pdf to the file names are of the
> > > form
> > > Invoice-000141-23_04_14.pdf.  I want to change this to either;
> > > have
> > > the date format follow the format set in Preferences (I think it
> > > should anyway), or get rid of the date altogether.  I've tried
> > > using
> > > dconf-editor (fedora) but I can't find the key to edit this
> > > setting.
> > > It was editable under the old settings regime using gconf-editor
> > > and
> > > the same key should be available in gsettings but it doesn't
> > > appear
> > > to be.
> > >
> > > Any ideas?  Is this a bug/feature?
> > >
> > > Mike E
> >
> > Hmm, can you remind me which setting this used to be ? Perhaps it
> > didn't survive the conversion to gsettings. But I don't remember
> > deliberately removing this.
> >
> > Geert
>
> Hi Geert
>
> using gconf-editor it's (was) in:
> /apps/gnucash/general/report/pdf_export/(filename_format and
> filename_date_format)
>
> Mike E

Ok, in dconf you will want to look for
/org/gnucash/general/report/pdf-export/(filename-format and filename-
date-format)

Most notable path changes in dconf are:
- path now starts with /org/gnucash instead of /apps/gnucash
- underscores have become invalid characters so they are replaced with -

Note that gnucash is not installed system-wide in /usr and friends you
must make sure that dconf can find your gnucash schema.

I believe the proper way to do so is to run
XDG_DATA_DIRS="/path/to/gnucash/install/dir/share;
${XDG_DATA_DIRS};/usr/local/share;/usr/share dconf-editor

(all in one line and properly setting the path to your gnucah's share
directory)

Does that work ?

Geert
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: PDF filenames for reports

Mike Evans-3
On Wed, 23 Apr 2014 17:31:58 +0200
Geert Janssens <[hidden email]> wrote:

> On Wednesday 23 April 2014 16:01:18 Mike Evans wrote:
> > On Wed, 23 Apr 2014 16:46:59 +0200
> >
> > Geert Janssens <[hidden email]> wrote:
> > > On Wednesday 23 April 2014 10:47:44 Mike Evans wrote:
> > > > When exporting invoices etc. to pdf to the file names are of the
> > > > form
> > > > Invoice-000141-23_04_14.pdf.  I want to change this to either;
> > > > have
> > > > the date format follow the format set in Preferences (I think it
> > > > should anyway), or get rid of the date altogether.  I've tried
> > > > using
> > > > dconf-editor (fedora) but I can't find the key to edit this
> > > > setting.
> > > > It was editable under the old settings regime using gconf-editor
> > > > and
> > > > the same key should be available in gsettings but it doesn't
> > > > appear
> > > > to be.
> > > >
> > > > Any ideas?  Is this a bug/feature?
> > > >
> > > > Mike E
> > >
> > > Hmm, can you remind me which setting this used to be ? Perhaps it
> > > didn't survive the conversion to gsettings. But I don't remember
> > > deliberately removing this.
> > >
> > > Geert
> >
> > Hi Geert
> >
> > using gconf-editor it's (was) in:
> > /apps/gnucash/general/report/pdf_export/(filename_format and
> > filename_date_format)
> >
> > Mike E
>
> Ok, in dconf you will want to look for
> /org/gnucash/general/report/pdf-export/(filename-format and filename-
> date-format)
>
> Most notable path changes in dconf are:
> - path now starts with /org/gnucash instead of /apps/gnucash
> - underscores have become invalid characters so they are replaced with -
>
> Note that gnucash is not installed system-wide in /usr and friends you
> must make sure that dconf can find your gnucash schema.
>
> I believe the proper way to do so is to run
> XDG_DATA_DIRS="/path/to/gnucash/install/dir/share;
> ${XDG_DATA_DIRS};/usr/local/share;/usr/share dconf-editor
>
> (all in one line and properly setting the path to your gnucah's share
> directory)
>
> Does that work ?
>
> Geert

Thanks Geert.  I needed to add the path to my gnucash-master installation.  Thanks I can edit my prefs. now.

Regards
Happy Mike E



--
Anti NSA?  Use PGP.
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x00CDB13500D7AB53 
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] PDF filenames for reports

Matthijs Kooijman
In reply to this post by Geert Janssens
Hi folks,

I'm replying to this old thread, adding a bit more info for anyone
searching for this on Google (hopefully the mailing list archive will
add this post to the existing thread...).

> Ok, in dconf you will want to look for
> /org/gnucash/general/report/pdf-export/(filename-format and filename-
> date-format)

I've found these dconf values and changing them works (gnucash 2.6.15).

However, I wanted to use just the invoice number as the filename, so I
changed the value from the default "%1$s-%2$s-%3$s" to "%2$s". Clicking
PDF export on an invoice then crashed Gnucash, with an assertion
failure: *** invalid %N$ use detected ***

This is because printf does not support skipping arguments (when there
is no format string for an argument, printf has no idea how big it is on
the stack, so it cannot tell where the next argument begins).

In this case, I found a simple workaround in the "precision" specifier
of printf format strings. For string arguments, the precision is used as
the maximum string width, truncating any longer strings. So you can add
a zero-width specifier for any arguments that you want to skip. E.g. it
works with "%1$.0s%2$s" (note that argument 3 can be left out, since it
is at the end).

Just in case anyone else runs into this :-)

Gr.

Matthijs

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] PDF filenames for reports

Geert Janssens-4
Op zondag 20 januari 2019 12:32:34 CET schreef Matthijs Kooijman:

> Hi folks,
>
> I'm replying to this old thread, adding a bit more info for anyone
> searching for this on Google (hopefully the mailing list archive will
> add this post to the existing thread...).
>
> > Ok, in dconf you will want to look for
> > /org/gnucash/general/report/pdf-export/(filename-format and filename-
> > date-format)
>
> I've found these dconf values and changing them works (gnucash 2.6.15).
>
> However, I wanted to use just the invoice number as the filename, so I
> changed the value from the default "%1$s-%2$s-%3$s" to "%2$s". Clicking
> PDF export on an invoice then crashed Gnucash, with an assertion
> failure: *** invalid %N$ use detected ***
>
> This is because printf does not support skipping arguments (when there
> is no format string for an argument, printf has no idea how big it is on
> the stack, so it cannot tell where the next argument begins).
>
> In this case, I found a simple workaround in the "precision" specifier
> of printf format strings. For string arguments, the precision is used as
> the maximum string width, truncating any longer strings. So you can add
> a zero-width specifier for any arguments that you want to skip. E.g. it
> works with "%1$.0s%2$s" (note that argument 3 can be left out, since it
> is at the end).
>
> Just in case anyone else runs into this :-)
>
> Gr.
>
> Matthijs

Cool tip :)

Thanks!

Geert



_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.