After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 307315 - Paper size in properties dialog
Paper size in properties dialog
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
0.3.x
Other All
: Urgent normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-11 19:04 UTC by Grant Farnsworth
Modified: 2006-12-04 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds a paper size field to the properties dialog. (11.03 KB, patch)
2006-08-09 15:22 UTC, Kasper Svendsen
none Details | Review
Adds a paper size field to the properties dialog. (11.43 KB, patch)
2006-08-10 14:30 UTC, Kasper Svendsen
accepted-commit_after_freeze Details | Review

Description Grant Farnsworth 2005-06-11 19:04:42 UTC
Something I really liked about acrobat was the presence of the paper size
attribute in the properties dialog.  Seems like I'm always accidentally creating
a4 documents instead of letter or vice versa.  I would love it if evince had this.
Comment 1 Marco Pesenti Gritti 2005-06-17 11:58:23 UTC
I guess we need to show both paper format and orientation. Bryan any idea on how
to implenent this ui wise?
Comment 2 Bryan W Clark 2005-07-08 15:53:47 UTC
/me feels the number of items in properties creaping up

Could we do this as something like, 
    <b>Paper:</b>    A4, Landscaped

Maybe put it after number of pages.
Comment 3 Grant Farnsworth 2005-07-12 20:33:26 UTC
I tend to like acroread's implementation...

<b>Paper Size:</b>  5.04 x 3.78 in

That way we know exactly what the size is.  In my opinion there's no need to map
from inches or milimeters to a4, letter, etc.
Comment 4 Marco Pesenti Gritti 2005-07-12 22:21:57 UTC
Personally I feel a4, letter etc useful. I have no idea how many millimeters an
a4 is, but I know I have a4 paper around.
Comment 5 Marco Pesenti Gritti 2005-07-12 22:25:10 UTC
Obviously I'm not that clear on what is the use case of paper size in the
dialog. Is it useful only for developers? If so do we really need it?
For normal user I guess this sort of information would be better provided by the
print dialog.

Sorry, just more questions and no strong opinions ;)
Comment 6 Bryan W Clark 2005-07-13 15:17:56 UTC
Good questions
Comment 7 Bryan W Clark 2005-07-21 15:54:17 UTC
Is PDF keeping only the exact sizes and not the paper types?  Meaning, would we
need to do the translation of 5 x 3 in -> A4 ourselves?
Comment 8 Sergej Kotliar 2006-04-18 17:39:02 UTC
IMHO, size is very important, and just today I had to open up Adobe Reader just to get that info.

Use case?
I'm programming computer-generated pdf files, which embed other PDF's. And for these, I need to know the exact sizes and proportions when I get them by email.

@Marco: Yes, when dealing with documents, I agree that standard formats such as A4 and Letter are much more useful. This should be in here too. 
I'd like this format:
if(size_is_regular_document()): Paper size: A4, Landscape (297 x 210mm)
else: Paper size: 90 x 60mm.

This only takes up one silly line of space, and provides very useful info. Just as useful as any of the other fields in the properties dialog. So yes, this should be in. 

And no matter what format you choose, please please pretty please get this in for the next release! It _is_ a very important piece of information! Even plain showing the measurements would suffice, but at least show something in the meantime.
Comment 9 Nickolay V. Shmyrev 2006-05-13 11:08:07 UTC
We just need a patch for that
Comment 10 Kasper Svendsen 2006-08-09 15:22:02 UTC
Created attachment 70556 [details] [review]
Adds a paper size field to the properties dialog.

The attached patch adds a paper size field to the properties dialog. If the paper size is a standard size, it prints it as text along with the exact size, otherwise only the exact size is printed. 

A couple of quick points:
- I could not find the tolerances for US paper sizes so I have just set these to 3mm by default. 
- Sizes are always printed in millimeters, maybe this should automatically be converted to more appropriate unit according to the locale?
- The paper size is only filled in for PostScript and PDF-files. I guess it does not even make sense to talk about paper-sizes for images and presentations.

Finally, this is the first time I have ever used the C programming language and Gtk+; I hope the code is not too bad as a result.
Comment 11 Nickolay V. Shmyrev 2006-08-09 22:53:53 UTC
Very nice patch Kasper. 

Unfortunately it's quite hard to apply it right now since GNOME is very close to 2.16 release and we have string freeze now. Read about it here:

http://live.gnome.org/MaintainersCorner/StringFreeze

So I think we'll commit it to the new development release as soon as possible. Let me comment a bit:

> Sizes are always printed in millimeters, maybe this should automatically be
converted to more appropriate unit according to the locale?

Surely it should use locale units. Another thing I wonder is that you are using 72 dpi, while it should be different in theory. Is it possible to get exact page size name from poppler? Great work though, so if you are interested in some other evince bug, just ask.


Comment 12 Kasper Svendsen 2006-08-10 14:30:43 UTC
Created attachment 70647 [details] [review]
Adds a paper size field to the properties dialog.

This patch chooses an appropriate unit for printing the paper size.

As far as I can tell, it is not possible to get the exact paper size from poppler. 

It could be that it isn't 72 dpi, I haven't been able to find any documentation about the units of the numerical values returned by the "poppler_page_get_size" function.
Comment 13 Nickolay V. Shmyrev 2006-08-14 00:23:26 UTC
Great, I'll certainly apply it after string freeze end.
Comment 14 Wouter Bolsterlee (uws) 2006-11-04 21:03:15 UTC
ping...
Comment 15 petrosyan 2006-11-06 01:35:29 UTC
change the evince version to 0.6.x
Comment 16 petrosyan 2006-11-20 16:49:27 UTC
pdfinfo from poppler-utils displays the paper size correctly. why can't this be added to evince as well?
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2006-12-04 08:39:41 UTC
pong
Comment 18 Wouter Bolsterlee (uws) 2006-12-04 11:39:26 UTC
I'll look into it soon.
Comment 19 Wouter Bolsterlee (uws) 2006-12-04 11:53:31 UTC
2006-12-04  Wouter Bolsterlee  <wbolster@cvs.gnome.org>

    * backend/ev-document-info.h:
    * data/evince-properties.glade:
    * pdf/ev-poppler.cc:
    * properties/ev-properties-view.c: (ev_regular_paper_size),
    (ev_properties_view_set_info):
    * ps/ps-document.c: (ps_document_get_info):

    Adds a paper size field to the properties dialog. Fixes
    bug #307315. Patch by Kasper Svendsen (with some i18n
    changes done by me).