bugPSPP - Bugs: bug #21128, Fix paper size support

 
 

bug #21128: Fix paper size support

Submitted by:  Ben Pfaff <blp>
Submitted on:  Thu 20 Sep 2007 04:30:27 AM UTC  
 
Category:  Output Driver Severity:  5 - Average
Status:  Fixed Assigned to:  Ben Pfaff <blp>
Open/Closed:  Closed Release:  Before 0.6.0
Effort:  0.00

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Sun 23 Sep 2007 05:59:20 AM UTC, comment #10: 

>This latest patch (file #14011) seems fine.


Whew!

Thanks, I checked this in.

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Sun 23 Sep 2007 05:04:32 AM UTC, comment #9: 

This latest patch (file #14011) seems fine.
Thanks.

John Darrington <jmd>
Project Administrator
Sun 23 Sep 2007 04:51:02 AM UTC, comment #8: 

>This one is missing tests/output/paper-size.sh


I must be having a bad patch day.  Here's one with paper-size.sh also.

(file #14011)

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Sun 23 Sep 2007 02:40:15 AM UTC, comment #7: 

This one is missing tests/output/paper-size.sh

John Darrington <jmd>
Project Administrator
Sun 23 Sep 2007 02:28:50 AM UTC, comment #6: 

I seem to have a talent today for screwing up patches.  Here's an even-more-fixed version of the one from comment #5.

(file #14009)

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Sun 23 Sep 2007 02:20:25 AM UTC, comment #5: 

Thanks for the comments, John.  Here's an updated patch that makes all of the changes you requested and includes paper-size.c.  I don't know what happened in postscript.c; the patch didn't include a couple of changes that I had in fact made.

(file #14008)

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Sun 23 Sep 2007 02:06:29 AM UTC, comment #4: 

> +The path used to search for the driver definition file file.


The second "file" is not correct.

In src/ui/terminal/main.c, I think we could remove the line
  setlocale (LC_MONETARY, "");

Your patch lacks the file src/language/tests/paper-size.c

I had to change line 382 of src/output/postscript.c before I could
compile it (too many arguments).

John Darrington <jmd>
Project Administrator
Sun 23 Sep 2007 12:55:46 AM UTC, comment #3: 

And here's the actual patch :-)

(file #14007)

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Sun 23 Sep 2007 12:55:08 AM UTC, comment #2: 

OK.  Here's a patch that replaces the whole clump of code.  It honors LC_PAPER as well as PAPERSIZE, PAPERCONF, and /etc/papersize that come along with libpaper.  It drops the PSPP-specific papersize file (which I doubt anyone ever cared about) and reduces the documentation from a whole silly and absurd section to a paragraph in the PostScript driver section.  It also adds a test.

If no paper size default exists, the new code falls back on A4.  I had to think about that a while, since I'm not sure I've ever actually seen a ream of A4 paper living here in the U.S., but in the end I decided that it is better to support international standards than provincial ones.

Ben Pfaff <blp>
Project AdministratorIn charge of this item.
Sat 22 Sep 2007 01:17:55 AM UTC, comment #1: 

One more suggestion:

Debian has a /etc/papersize file, which contains the name of the system's default paper.  We could read that file to set the size.
It's not the way they intend you to use it; you're supposed to link against their libpaper library, but we can't do that, because it's GPLv2 only.

John Darrington <jmd>
Project Administrator
Thu 20 Sep 2007 04:30:27 AM UTC, original submission:  

John Darrington writes:

> How do I set the paper-size for the postscript driver?
>
> I've tried "paper-size=a4", in which case I get the error
>  bad dimension "a4"
>
> I've tried "paper-size=297x210 which gives:
>   unit "x210" is unknown in dimension "297x210"
>
> I've tried "paper-size=297 x 210" which gives
>   `x' expected in paper size `297'
>
> What do I have to do to make it work?  Better still, is there any way
> to make it respect the LC_PAPER locale category?


I've confirmed that it's broken.

Ben Pfaff <blp>
Project AdministratorIn charge of this item.

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #14011:  paper-size-fix.patch added by blp (31KiB - text/x-diff)
file #14007:  paper-size-fix.patch added by blp (26KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by blp (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-09-23 blp StatusReady for Test/Review => Fixed
        Open/ClosedOpen => Closed
    2007-09-23 blp Attached File#14009 => Removed
    2007-09-23 blp Attached File- => Added paper-size-fix.patch, #14011
    2007-09-23 blp Attached File- => Added paper-size-fix.patch, #14009
    2007-09-23 blp Attached File#14008 => Removed
    2007-09-23 blp Attached File- => Added paper-size-fix.patch, #14008
    2007-09-23 blp Attached File- => Added paper-size-fix.patch, #14007
    2007-09-23 blp StatusNone => Ready for Test/Review
    2007-09-20 blp ReleaseNone => Before 0.6.0

    Back to the top


    Powered by Savane 3.6