<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1161308698;
        mso-list-type:hybrid;
        mso-list-template-ids:-1453158584 1074331649 1074331651 1074331653 1074331649 1074331651 1074331653 1074331649 1074331651 1074331653;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:108.0pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:144.0pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:180.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:216.0pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:252.0pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:288.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:324.0pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:360.0pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:396.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IN" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText">Hi Jukka,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I could understand from your mail that the mediabox is nothing but the image size in terms of width and height and the user unit is nothing but each pixel size.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Does it mean it is the PDF readers responsibility to dynamically resample to the given parameters in Media Box and User units? But Acrobat adobe reader is not resampling the image dynamically in displaying the image<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Few observations from my side are<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:108.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>I haven’t noticed any differences in Page size for different DPI values.<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:108.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>There is no difference of the image on the paper for different DPI values. ( I took the print out and noticed the differences physically )<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Regards<o:p></o:p></p>
<p class="MsoPlainText">Sunil<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="EN-US" style="mso-fareast-language:EN-IN">-----Original Message-----<br>
From: gdal-dev-bounces@lists.osgeo.org [mailto:gdal-dev-bounces@lists.osgeo.org] On Behalf Of Jukka Rahkonen<br>
Sent: 11 May 2015 03:21:PM<br>
To: gdal-dev@lists.osgeo.org<br>
Subject: Re: [gdal-dev] Regarding DPI in Geospatial PDF</span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Vankadara, Sunil <sunil.vankadara <at> hexagongeospatial.com> writes:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Hi Team,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I have created two PDF file with default DPI and 600 values using<o:p></o:p></p>
<p class="MsoPlainText">gdal_translate application.<o:p></o:p></p>
<p class="MsoPlainText">> Unfortunately I couldn't find any difference among these two created
<o:p></o:p></p>
<p class="MsoPlainText">> files<o:p></o:p></p>
<p class="MsoPlainText">like file size, pixel size etc.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> The input file details are<o:p></o:p></p>
<p class="MsoPlainText">> Input file type: Erdas . img file<o:p></o:p></p>
<p class="MsoPlainText">> Width of the image: 11938<o:p></o:p></p>
<p class="MsoPlainText">> Height of the image:: 14184<o:p></o:p></p>
<p class="MsoPlainText">> Datatype: UINT 8<o:p></o:p></p>
<p class="MsoPlainText">> No of Bands: 3<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> May I know the reason for not showing up the difference in created outputs?<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Regards<o:p></o:p></p>
<p class="MsoPlainText">> Sunil<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hi,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">It may be that DPI setting at the moment does not have a totally desired effect. It would feel natural that increasing DPI from the default value 72 into a bigger value like 300 would make the page size of the PDF smaller expressed as
 physical units like millimeters.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The DPI setting is not supposed to affect the image itself so the PDF file size will be the same as well as the image quality so no up/downsampling will occur.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">You can read some background from <a href="http://trac.osgeo.org/gdal/ticket/5412">
<span style="color:windowtext;text-decoration:none">http://trac.osgeo.org/gdal/ticket/5412</span></a>. In older PDF versions there was an absolute limit that page could not be bigger than 14000 units and the unit size was fixed to 1/72 inch. This limitation
 can be overridden in later PDF versions by using a UserUnit.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Create some sample PDF files with gdal_translate and you can see how the user unit behaves by opening the PDF file with a text editor and having a look at row 4 in the file.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Without -co DPI<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><< /Annots 6 0 R /Contents 4 0 R /MediaBox [ 0 0 1728 1977 ] /Parent 1 0 R /Resources 5 0 R /Type /Page /UserUnit 1 >><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">With -co DPI=300<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><< /Annots 6 0 R /Contents 4 0 R /MediaBox [ 0 0 414.72000000000008<o:p></o:p></p>
<p class="MsoPlainText">474.48000000000008 ] /Parent 1 0 R /Resources 5 0 R /Type /Page /UserUnit<o:p></o:p></p>
<p class="MsoPlainText">4.1666666666666661 >><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">With -co DPI=600 <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><< /Annots 6 0 R /Contents 4 0 R /MediaBox [ 0 0 207.36000000000004<o:p></o:p></p>
<p class="MsoPlainText">237.24000000000004 ] /Parent 1 0 R /Resources 5 0 R /Type /Page /UserUnit<o:p></o:p></p>
<p class="MsoPlainText">8.3333333333333321 >><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The image box sixe comes from (MediaBox size) x (UserUnit size) and remains the same in all three cases because GDAL is adjusting both the MediaBox and UserUnit hand in hand.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">It could be that GDAL should not touch to the size of the MediaBox if it does not exceed 14400 in either dimension.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-Jukka Rahkonen-<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">gdal-dev mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:gdal-dev@lists.osgeo.org"><span style="color:windowtext;text-decoration:none">gdal-dev@lists.osgeo.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"><span style="color:windowtext;text-decoration:none">http://lists.osgeo.org/mailman/listinfo/gdal-dev</span></a><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
</div>
</body>
</html>