title: QPdfWriter and page size
body: <p>I'm setting page size to <code>QPdfWriter</code>, but it seems like requested size is applied only to pages created with <code>newPage()</code>, which doesn't apply for the first page. Is there a way to change size of the first page, or is it a bug in Qt?</p>
  
  <p>Qt version: 5.2.1.</p>
  
  <p>Here's small code snippet to reproduce the problem:</p>
  
  <pre><code>void MainWindow::on_pushButton_clicked()
  {
      QFile f("/tmp/test.pdf");
      f.open(QIODevice::WriteOnly);
      QPdfWriter* writer = new QPdfWriter(&amp;f);
      QPainter* p = new QPainter(writer);
      writer-&gt;setPageSize(QPagedPaintDevice::A5);
      p-&gt;drawText(QRect(100, 100, 2000, 200), "test");
      writer-&gt;newPage();
      p-&gt;drawText(QRect(100, 100, 2000, 200), "test");
      delete p;
      delete writer;
      f.close();
  }
  </code></pre>
  
  <p>Created PDF file has first page in A4 format and second in A5 format, but they should both be in A5 format.</p>