Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #200788 > unrolled thread

Paper size reported in Document Viewer.

Started bypeter@easthope.ca
First post2018-10-01 08:40 +0200
Last post2018-10-01 19:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  Paper size reported in Document Viewer. peter@easthope.ca - 2018-10-01 08:40 +0200
    Re: Paper size reported in Document Viewer. Reco <recoverym4n@gmail.com> - 2018-10-01 08:50 +0200
      Re: SVG in SVG. peter@easthope.ca - 2018-10-01 18:40 +0200
        Re: SVG in SVG. Reco <recoverym4n@gmail.com> - 2018-10-01 19:00 +0200

#200788 — Paper size reported in Document Viewer.

Frompeter@easthope.ca
Date2018-10-01 08:40 +0200
SubjectPaper size reported in Document Viewer.
Message-ID<wE025-3P2-1@gated-at.bofh.it>
Hi,

Debian 9 with Document Viewer 3.22.1 here.

Given 
http://easthope.ca/AIGAbusIconScaled.svg 
the file 
http://easthope.ca/AIGAbusIconScaled.pdf 
is obtained by
rsvg-convert -f pdf AIGAbusIconScaled.svg > AIGAbusIconScaled.pdf .

The svg file has attributes 'width="8.5in" height="11in"' in the outermost svg element.
The PDF is displayed with Document Viewer and there Properties 
shows "Paper Size 270 x 349 mm".  That is 10.62 x 13.74 inches.

I don't understand that paper size.  The numbers have no apparent 
connection to the svg specification or to the PDF file.  

Ideas?

Thanks,                                 ... Peter E.
-- 
Message composed and transmitted by software designed to avoid the 
need, overhead and vulnerability of antivirus software.

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                                                 
http://easthope.ca/Peter.html              Bcc: peter at easthope. ca

[toc] | [next] | [standalone]


#200789

FromReco <recoverym4n@gmail.com>
Date2018-10-01 08:50 +0200
Message-ID<wE0bM-3Sr-1@gated-at.bofh.it>
In reply to#200788
	Hi.

On Sun, Sep 30, 2018 at 10:56:05PM -0700, peter@easthope.ca wrote:
> Hi,
> 
> Debian 9 with Document Viewer 3.22.1 here.
> 
> Given 
> http://easthope.ca/AIGAbusIconScaled.svg 

8.5/11 = .7727272...

> the file 
> http://easthope.ca/AIGAbusIconScaled.pdf 

pdfinfo AIGAbusIconScaled.pdf says it's 765 x 990 pts.

765/990 = .7727272...

> is obtained by
> rsvg-convert -f pdf AIGAbusIconScaled.svg > AIGAbusIconScaled.pdf .

So rsvg-convert seem to preserve aspect ratio.


> The svg file has attributes 'width="8.5in" height="11in"' in the outermost svg element.

'S' in SVG stands for 'Scalable'. These sizes can be transformed into
anything.


> The PDF is displayed with Document Viewer and there Properties 
> shows "Paper Size 270 x 349 mm".  That is 10.62 x 13.74 inches.

rsvg-convert(1) says that it uses 90dpi by default.

8.5*90 = 765
11*90 = 990

> I don't understand that paper size.  The numbers have no apparent 
> connection to the svg specification or to the PDF file.  

They do. You define aspect ratio in SVG. You define actual size by
specifying (or using default) DPI.

Reco

[toc] | [prev] | [next] | [standalone]


#200795 — Re: SVG in SVG.

Frompeter@easthope.ca
Date2018-10-01 18:40 +0200
SubjectRe: SVG in SVG.
Message-ID<wE9oJ-106-9@gated-at.bofh.it>
In reply to#200789
Reco,

Thanks for the reply.

    From: Reco <recoverym4n@gmail.com>
    Date: Mon, 1 Oct 2018 09:48:21 +0300
> 8.5/11 = .7727272...
> 765/990 = .7727272...

OK

> So rsvg-convert seem to preserve aspect ratio.

OK.

> 8.5*90 = 765
> 11*90 = 990

OK.

> You define actual size by specifying (or using default) DPI.

OK.

Also FWIIW (270 mm/25.4 mm/in) x 90 px/in ~= 956.69 px (?)
and (349 mm/25.4 mm/in) x 90 px/in ~= 1236.61 px (?)
and 270/349 = .7736390 ~= .7727272   8~) (aspect ratio again)
and 270/90 = 3 .   8~)

Sorry for being dense.  3 is a nice whole number but I still haven't 
found how Document Viewer derives the numbers "270 x 349". 

Regards,                       ... Peter E.
-- 
Message composed and transmitted by software designed to avoid the 
need, overhead and vulnerability of antivirus software.

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                                                 
http://easthope.ca/Peter.html              Bcc: peter at easthope. ca

[toc] | [prev] | [next] | [standalone]


#200798 — Re: SVG in SVG.

FromReco <recoverym4n@gmail.com>
Date2018-10-01 19:00 +0200
SubjectRe: SVG in SVG.
Message-ID<wE9I5-17b-9@gated-at.bofh.it>
In reply to#200795
On Mon, Oct 01, 2018 at 08:54:43AM -0700, peter@easthope.ca wrote:
> Reco,
> 
> Thanks for the reply.
> 
>     From: Reco <recoverym4n@gmail.com>
>     Date: Mon, 1 Oct 2018 09:48:21 +0300
> > 8.5/11 = .7727272...
> > 765/990 = .7727272...
> 
> OK
> 
> > So rsvg-convert seem to preserve aspect ratio.
> 
> OK.
> 
> > 8.5*90 = 765
> > 11*90 = 990
> 
> OK.
> 
> > You define actual size by specifying (or using default) DPI.
> 
> OK.
> 
> Also FWIIW (270 mm/25.4 mm/in) x 90 px/in ~= 956.69 px (?)
> and (349 mm/25.4 mm/in) x 90 px/in ~= 1236.61 px (?)

Here's your mistake. rsvg-convert assumes 90 DPI by default, and it can
be changed by the user if needed.

In the case of Evince ("Document Viewer" in GNOME-speak), 72 DPI is
assumed and hardcoded (see shell/ev-window.c and libview/ev-view.c for
some examples) without any possibility of user changes.
Note that libpoppler - the library that evince uses to render PDF - does
not make such assumptions, it's all pixels for them.

Therefore, 765 pixels equals 269.88 GNOME millimeters and 10.63 GNOME
inches.
Likewise, 990 pixels equals 349.25 GNOME millimeters and exactly 13.75
GNOME inches.

Note that all those mm and inches are not the units of measurement we
common people are accustomed for. They are special GNOME units of
measurement, hence your confusion.


> Sorry for being dense.

I see nothing to be sorry for. They say that mathematics is the
universal language for a reason :)

Reco

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web