title: how to duplicate pdf page
body: <p>There is a source file pdf.  I need to transfer the contents of the page to another file. I use the LitePDF library:</p>
  
  <pre><code>SrcPDF := TLitePDF.Create;
  SrcPDF.LoadFromFile(FList[PagesManager.List[i].FileIndex].Name, '', True);
  PageRes := ResPDF.PageToResource(PagesManager.List[i].PageNo - 1);
  SrcPDF.DrawResource(PageRes, 0 , LitePDFUnit_mm, 0, 0 , 200, 200);
  ResPDF.FinishPage(PDFPage);
  
  SrcPDF.Free;
  SourcePDF.Free;
  </code></pre>
  
  <p>On DrawResource crreate exception
  litePDF_DrawResource: Resource ID is out of range.</p>
  
  <p>What exactly am I doing wrong?</p>