In article <20171026193138.ga41...@www.stare.cz> Jan Stary <h...@stare.cz> wrote: > > > > In the ps file generated by mandoc you should have this line: > > > > > > > > %%DocumentMedia: Default 595 841 0 () () > > > > > > > > Where 595 841 correspond to A4. If you set output paper to "letter" > > > > that line will say: > > > > > > > > %%DocumentMedia: Default 612 790 0 () () > > Yes. It seems that these are just _comments_ to the PS interpreter > and the "Default" is just an arbitrary given name, right? > (Sorry, I don't know the language.) So GV just shows that, > but it does not _determine_ the actual media size, right? > Looking at term_ps.c, mandoc writes "Default ... " for every paper size. >
First of all, I'm just a user like you trying to figure out how things work. So, don't expect from me some deep analysis, for that Ingo is the right person. I answered you - based in what I intuitively observed - that mandoc honors the paper size, and explained you why I think so. I know about postcript language as much as you, as well as what gv takes in care to print the document on the screen, so first I grep in the ps file for 'a4|letter' strings and got nothing, then searching on the Internet I found the dots equivalence and repeated the search this time using '595 841|612 790'. I did the same with documents generated by GNU roff. I found the "comment" I mentioned in the other message, so I opened the ps file with vi(1), changed those numbers, and then I opened the modified file with gv. That's how I found out gv takes in care that "comment" to figure out physical page dimensions. As far as I understand postscript draws page contents using coordinates and using the postscript dot as unit (as Ingo explained). What gv does is just trying to figure out the best way to print the document on screen; when you select A4|Letter in the menu it only modifies the page, the rest of dimensions stay the same. Ingo will correct me if I'm wrong about this, we're talking specifically about how gv shows you the document in screen, it shouldn't affect how the document is printed on paper (what I *guess* gv does in this case is to send the postscript file "as is" to lpr or cups.) Finally, "default" means "default". :-) Perhaps (guessing again), since page size use is related to region settings, who designed postscript (hence gv) thought convenient to honor some wide system setting (based on locale?). > Jan > > Walter