title: What are the units of QPdfDocument::pageSize?
body: <p><a href="https://doc-snapshots.qt.io/qt5-5.15/qpdfdocument-members.html" rel="nofollow noreferrer"><code>QPdfDocument</code> (5.15.2)</a>, in the <em>QtPDF</em> module (part of <em>QtWebEngine</em>), seems to not be fully documented yet (presumably because it's fairly new, first appearing in 5.14).</p>
  <p>What are the units of the size returned by <code>QPdfDocument::pageSize()</code> (don't bother checking those docs, it's not there)?</p>
  <p>It appears to be some reasonable (albeit seemingly low-res) pixel-like units except I'm not sure how it is deducing the document's DPI. Also I've only tested on a limited set of PDF's all generated from the same source, so I'm not sure how normal my observations are, especially given it's a <code>QSizeF</code> rather than a <code>QSize</code> (which raises the possibility of e.g. other non-pixel units in other as-of-yet unencountered contexts).</p>
  <p>Ultimately what I'd like to do is get the page size of a loaded document's page in physical units (e.g. inches) then determine a rendered output size in pixels given a user-specified DPI.</p>
  <hr />
  <p>An example of the values I've observed:</p>
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QDebug&gt;
  #include &lt;QtNetwork&gt;
  #include &lt;QtPdf&gt;
  
  int main (int argc, char *argv[]) {
  
      QCoreApplication app(argc, argv);
  
      QUrl url(&quot;http://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&quot;);
      QNetworkAccessManager internet;
      QNetworkReply *reply = internet.get(QNetworkRequest(url));
  
      QObject::connect(reply, &amp;QNetworkReply::finished, [reply] () {
          QPdfDocument pdf;
          pdf.load(reply);
          qDebug() &lt;&lt; reply-&gt;url() &lt;&lt; &quot;:&quot;;
          for (int k = 0; k &lt; pdf.pageCount(); ++ k)
              qDebug() &lt;&lt; k &lt;&lt; pdf.pageSize(k);
          QCoreApplication::exit();
      });
  
      return app.exec();
  
  }
  </code></pre>
  <p>Outputs:</p>
  <pre class="lang-none prettyprint-override"><code>QUrl(&quot;http://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&quot;) :
  0 QSizeF(595, 842)
  </code></pre>