maposmatic-dev
[Top][All Lists]
Advanced

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

[Maposmatic-dev] [task #11982] Automatically determining available paper


From: Jeroen van Rijn
Subject: [Maposmatic-dev] [task #11982] Automatically determining available paper sizes
Date: Wed, 04 Apr 2012 11:17:51 +0000
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:13.0) Gecko/20120329 Firefox/13.0a2

URL:
  <http://savannah.nongnu.org/task/?11982>

                 Summary: Automatically determining available paper sizes
                 Project: MapOSMatic
            Submitted by: jvrnix
            Submitted on: Wed 04 Apr 2012 11:17:50 AM GMT
         Should Start On: Wed 04 Apr 2012 12:00:00 AM GMT
   Should be Finished on: Thu 04 Apr 2013 12:00:00 AM GMT
                Category: ocitysmap
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

$ paperconf -c -s -p a4 # show size of a4 in centimetres
21 cm 29.7 cm

$ paperconf -m -s -p a4 # show size of a4 in millimetres
210 mm 297 mm

$ paperconf -s # show size of default paper (a4 in my case) in Postscript
units (1/72th of an inch)
595.276 841.89

$ paperconf -a # list all paper sizes by name, quite a few

I imagine it wouldn't be hard to write a python class to encapsulate this
knowledge. A dict keyed on paper name holding a tuple of dimenions, at its
base. The configuration could then be simplified to listing minimum and
maximum dimensions you want ocitysmap to tackle, on the basis of design/layout
and runtime.

Indeed, if libpaper is installed on the system, this python class might even
be built on the fly during a 'make install' pass and defer to a supplied
version if libpaper is missing.

So if the ocitysmap configuration to do with paper sizes was limited to:
[paper-sizes-in-mm]
minWidth = 150
minHeight = 150
maxWidth = 4000
maxHeight = 4000

Then ocitysmap could be given a paper size to use which needn't be hardcoded.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?11982>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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