GNOME Bugzilla – Bug 307315
Paper size in properties dialog
Last modified: 2006-12-04 11:53:31 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.
I guess we need to show both paper format and orientation. Bryan any idea on how to implenent this ui wise?
/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.
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.
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.
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 ;)
Good questions
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?
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.
We just need a patch for that
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.
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.
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.
Great, I'll certainly apply it after string freeze end.
ping...
change the evince version to 0.6.x
pdfinfo from poppler-utils displays the paper size correctly. why can't this be added to evince as well?
pong
I'll look into it soon.
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).