taskMapOSMatic - Tasks: task #11982, Automatically determining...

 
 

task #11982: Automatically determining available paper sizes

Submitted by:  Jeroen van Rijn <jvrnix>
Submitted on:  Wed 04 Apr 2012 11:17:50 AM UTC  
 
Should Start On: Wed 04 Apr 2012 12:00:00 AM UTCShould be Finished on: Thu 04 Apr 2013 12:00:00 AM UTC
Category: ocitysmapPriority: 3 - Low
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 04 Apr 2012 11:17:50 AM UTC, original submission:

$ 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.

Jeroen van Rijn <jvrnix>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jvrnix (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1