title: How to select the nth() page of a document section with PDFreactor?
body: <p>I am evaluating PDFreactor to produce PDF from HTML &amp; CSS.</p>
  
  <p>However I have run into a problem - I need to set the page background image different for the 1st and 2nd and 3rd pages of a document section. The only way it seems to be possible (looking in the <a href="http://www.pdfreactor.com/product/doc_html/index.html" rel="nofollow">PDFreactor manual</a>), is to explicitly give the fixed document page number, rather than a number that is relative to the document section.</p>
  
  <p><a href="https://www.w3.org/TR/css-gcpm-3/#document-sequence-selectors" rel="nofollow">CSS Generated Content for Paged Media Module</a> suggests I would use this notation;</p>
  
  <p>CSS:</p>
  
  <pre><code>@page:-nth(1 of PPSid1117) {
      background: url("http://example.com/bg1-section1.png") no-repeat center center;
  }
  @page:-nth(2 of PPSid1117) {
      background: url("http://example.com/bg2-section1.png") no-repeat center center;
  }
  @page:-nth(3 of PPSid1117) {
      background: url("http://example.com/bg3-section1.png") no-repeat center center;
  }
  
  #PPSid1117 {
      page: PPSid1117;
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="PPSid1117"&gt;Up comes 10 pages of lorem ipsum, the first three pages having different backgrounds... etc etc ...end of section.&lt;/div&gt;
  </code></pre>
  
  <p>But it does not work at all - it throws a parse error;</p>
  
  <pre><code>Parse error in resource "main_css.php?doc=50"
  Encountered '1' at position 11 in rule '@page:-nth(1 of PPSid1117)
  </code></pre>
  
  <p>BTW, -ro-nth DOESN'T throw an error but still does not work - ie.</p>
  
  <pre><code>@page:-ro-nth(1 of PPSid1117) {
      background: url("http://example.com/bg1-section1.png") no-repeat center center;
  }
  </code></pre>
  
  <p>This code puts the it on every left page of the section (so it proves the named page selector works at a basic level) but is not what I want at all.</p>
  
  <pre><code>@page PPSid1117:left {
      background: url("http://example.com/bg1-section1.png") no-repeat center center;
  }
  </code></pre>
  
  <p>This works but it means I have to hard-code the page number. Not what I want to do...</p>
  
  <pre><code>@page:-ro-nth(4) {
      background: url("http://example.com/bg1-section1.png") no-repeat center center;
  }
  </code></pre>
  
  <p>This puts it on page 1 of the document, not page 1 of the section.</p>
  
  <pre><code>@page PPSid1117:-ro-nth(1) {
      background: url("http://example.com/bg1-section1.png") no-repeat center center;
  }
  </code></pre>
  
  <p>This does what I want in Prince XML.</p>
  
  <pre><code>#PPSid1117 {
      page: PPSid1117;
      prince-page-group: start;
  }
  
  @page PPSid1117:nth(1) {
      background: url("http://example.com/bg1-section1.png") no-repeat center center;
  }
  </code></pre>
  
  <p>Does anyone have any helpful suggestions? Thanks. </p>