title: Generate PDF with Powershell
body: <p>I'm trying to generate an array with data retrieved from SharePoint (The SharePoint part is ok) in a PDF file with PowerShell but i have literally no idea how to do this.</p>
  
  <p>I want something like this
  <a href="https://i.stack.imgur.com/epsDo.png" rel="nofollow noreferrer">PDF to generate</a></p>
  
  <p>Edit (1):</p>
  
  <pre><code># Function to query list item from SharePoint
  function Get-Items ($ListName, $BEGIN, $END, $IDUSER) {
  
      # Init variable as null
      $LibItems = $null
      $BEGIN = $BEGIN.ToString("yyyy-MM-dd")
      $END = $END.ToString("yyyy-MM-dd")
  
      $LibItems = Get-PnPListItem -List $ListName -Query "&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;And&gt;&lt;Eq&gt;&lt;FieldRef Name='id_client'/&gt;&lt;Value Type='Text'&gt;$IDUSER&lt;/Value&gt;&lt;/Eq&gt;&lt;And&gt;&lt;Geq&gt;&lt;FieldRef Name='date_intervention'/&gt;&lt;Value Type='DateTime'&gt;$BEGIN&lt;/Value&gt;&lt;/Geq&gt;&lt;Leq&gt;&lt;FieldRef Name='date_intervention'/&gt;&lt;Value Type='DateTime'&gt;$END&lt;/Value&gt;&lt;/Leq&gt;&lt;/And&gt;&lt;/And&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;"
  
      # Return value
      return $LibItems
  }
  </code></pre>
  
  <p>That's what i get from SharePoint (I didn't query all the fields on purpose).</p>
  
  <p>It gives me an Object.</p>
  
  <pre><code>Id    Title                                              GUID                                                           
  --    -----                                              ----                                                           
  586                                                      cee9a0f7-206b-4240-ac42-fbb04e9c44b0                           
  587                                                      cc402248-64cb-4e43-9164-1a42bc893cca                           
  588                                                      eec5fc30-2408-42c1-aba2-c545600d9777                           
  589                                                      6220ddb9-ad96-4c92-bc63-f57b93be18e2                           
  652                                                      8433f5fb-70dc-4f96-904f-5376156d6e3d                           
  653                                                      76ef46f4-ee6a-4e34-9244-011d0a6022aa                           
  654                                                      d399f517-3fe8-43d0-abc9-6f022d66000c                           
  656                                                      3f2e5db9-d122-4275-872d-2c5bbcb9f9db                           
  657                                                      69b5a90f-bd8e-4735-beef-e13c7903cc47                           
  702                                                      03010fc1-c386-4941-9446-ba67cd840260                           
  703                                                      4759b602-07ed-4980-bee4-f4d3af36836a                           
  704                                                      322aa276-b690-47c3-a401-60ade7b4f187                           
  705                                                      96a0b295-6a55-40cd-9880-e580cefde5f1
  
  System.Object[]                           
  </code></pre>
  
  <p>I tried iTextSharp but i didn't manage to get it work properly...</p>