rel_graph custom size paper

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

rel_graph custom size paper

brian fitzgerald
I see that the user dialog for rel_graph allows a custom paper size to be entered and, sure enough, the size is captured in the "report options.xml" file, but the command line version complains when anything but the specific sizes are chosen. Maybe there is an undeclared format option for choosing custom size paper. Anyone know of it?

brian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: rel_graph custom size paper

prculley
Gramps CLI deliberately excludes the use of a 'Custom Size' paper as one of the choices.  At this time there is no code to allow the definition or use of a custom paper size via the CLI.

Paul C.

On Wed, May 2, 2018 at 7:48 PM, brian fitzgerald <[hidden email]> wrote:
I see that the user dialog for rel_graph allows a custom paper size to be entered and, sure enough, the size is captured in the "report options.xml" file, but the command line version complains when anything but the specific sizes are chosen. Maybe there is an undeclared format option for choosing custom size paper. Anyone know of it?

brian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: rel_graph custom size paper

Paul Franklin-5
> On Wed, May 2, 2018 at 7:48 PM, brian fitzgerald <[hidden email]> wrote:
>> I see that the user dialog for rel_graph allows a custom paper size to be
>> entered ... but the command line version complains when anything but the
>> specific sizes are chosen. ...

While it's true that you can't enter any custom paper size via the CLI,
nor even select one earlier defined in the GUI, a workaround exists.

It is not recommended for ordinary users, but it could be argued that
any CLI user is somewhat of a "power user" already.

Search for a file called papersize.xml on your computer.  (It may be in
a directory/folder called "data" but that is o.s.-dependent.)

Open it with your favorite text editor and you will see it defines all the
paper sizes gramps knows about, so if you only have a small number
of custom sizes you can just enter them there, as many as you want.

Each additional line should have a unique name and the height is
typically made larger than the width, and both are in centimeters.

I suppose gramps shouldn't be running when you do that.

That will add the additional paper sizes and they will then be available
in both the GUI and CLI.

I don't know if it will get overwritten if you upgrade gramps.  YMMV.

HTH.


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: rel_graph custom size paper

Rich Lakey
In Linuxmint 18.3 with Gramps 4.2.8 I could not find a file papersize.xml, but I did find paper.py. This file makes a reference to an XML file but seems to have the papersizes within it. It needs root permissions to edit. Found at /usr/lib/python3/dist-packages/gramps/gen/plug/report/paper.py
Is this the same file? Contains:

#-------------------------------------------------------------------------
#
# Parse XML file. If it fails, use the default
#
#-------------------------------------------------------------------------
try:
    parser = make_parser()
    parser.setContentHandler(PageSizeParser(paper_sizes))
    the_file = open(PAPERSIZE)
    parser.parse(the_file)
    the_file.close()
    paper_sizes.append(PaperSize("Custom Size", -1, -1)) # always in English
except (IOError, OSError, SAXParseException):
    paper_sizes = [
        PaperSize("Letter",27.94,21.59),
        PaperSize("Legal",35.56,21.59),
        PaperSize("A0",118.9,84.1),
        PaperSize("A1",84.1,59.4),
        PaperSize("A2",59.4,42.0),
        PaperSize("A3",42.0,29.7),
        PaperSize("A4",29.7,21.0),
        PaperSize("A5",21.0,14.8),
        PaperSize("B0",141.4,100.0),
        PaperSize("B1",100.0,70.7),
        PaperSize("B2",70.7,50.0),
        PaperSize("B3",50.0,35.3),
        PaperSize("B4",35.3,25.0),
        PaperSize("B5",25.0,17.6),
        PaperSize("B6",17.6,12.5),
        PaperSize("B",43.18,27.94),
        PaperSize("C",55.88,43.18),
        PaperSize("D",86.36, 55.88),
        PaperSize("E",111.76,86.36),
        PaperSize("Custom Size",-1,-1) # always in English
    ]

Rich

On 09/14/2018 01:06 AM, Paul Franklin wrote:
On Wed, May 2, 2018 at 7:48 PM, brian fitzgerald [hidden email] wrote:
I see that the user dialog for rel_graph allows a custom paper size to be
entered ... but the command line version complains when anything but the
specific sizes are chosen. ...
While it's true that you can't enter any custom paper size via the CLI,
nor even select one earlier defined in the GUI, a workaround exists.

It is not recommended for ordinary users, but it could be argued that
any CLI user is somewhat of a "power user" already.

Search for a file called papersize.xml on your computer.  (It may be in
a directory/folder called "data" but that is o.s.-dependent.)

Open it with your favorite text editor and you will see it defines all the
paper sizes gramps knows about, so if you only have a small number
of custom sizes you can just enter them there, as many as you want.

Each additional line should have a unique name and the height is
typically made larger than the width, and both are in centimeters.

I suppose gramps shouldn't be running when you do that.

That will add the additional paper sizes and they will then be available
in both the GUI and CLI.

I don't know if it will get overwritten if you upgrade gramps.  YMMV.

HTH.


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org




_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: rel_graph custom size paper

Paul Franklin-5
On 9/14/18, Rich <[hidden email]> wrote:
> In Linuxmint 18.3 with Gramps 4.2.8 I could not find a file papersize.xml,
> but I did find paper.py. This file makes a reference to an XML file but
> seems to have the papersizes within it. It needs root permissions to edit.
> Found at /usr/lib/python3/dist-packages/gramps/gen/plug/report/paper.py
> Is this the same file?

No.  The paper.py file is part of the gramps code, part of the
gramps program itself.  Its paper size definitions are used
if the papersize.xml file cannot be read, for whatever reason.

As I said, it is operating system dependent, but I would think
that papersize.xml would be in the same place as other files
like lds.xml and holidays.xml and tips.xml -- none of which
have equivalent data inside the gramps code proper.


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: rel_graph custom size paper

Ron Johnson
In reply to this post by Paul Franklin-5
ron@haggis:~$ locate papersize.xml
/usr/share/gramps/papersize.xml

On 09/14/2018 09:24 AM, Rich wrote:
In Linuxmint 18.3 with Gramps 4.2.8 I could not find a file papersize.xml, but I did find paper.py. This file makes a reference to an XML file but seems to have the papersizes within it. It needs root permissions to edit. Found at /usr/lib/python3/dist-packages/gramps/gen/plug/report/paper.py
Is this the same file? Contains:


--
Angular momentum makes the world go 'round.


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: rel_graph custom size paper

Rich Lakey
Thanks Ron

On 09/14/2018 01:55 PM, Ron Johnson wrote:
ron@haggis:~$ locate papersize.xml
/usr/share/gramps/papersize.xml

On 09/14/2018 09:24 AM, Rich wrote:
In Linuxmint 18.3 with Gramps 4.2.8 I could not find a file papersize.xml, but I did find paper.py. This file makes a reference to an XML file but seems to have the papersizes within it. It needs root permissions to edit. Found at /usr/lib/python3/dist-packages/gramps/gen/plug/report/paper.py
Is this the same file? Contains:


--
Angular momentum makes the world go 'round.




_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org



_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org