title: Table rowspan render problem with Chromium headless generate PDF - chrome-php / chrome
body: <p>I have encountered a problem that when using chromium headless pdf generator.</p>
  <p>The arrow shows the background the table rowspan. and it will not cut correctly by pdf generator(Headless chromium), the setting for this one is A4, portrait. also have the header and footer for each page.</p>
  <p>I used the chrome-php/chrome library to trigger chromium headless to run.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;body&gt;
  &lt;div class="background-white"&gt;
      &lt;figure class="advgb-table "&gt;
          &lt;table class="wp-block-advgb-table advgb-table-frontend is-style-padding"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color:#6e6f71;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Tasks and Steps Involved&lt;/td&gt;&lt;td style="background-color:#6e6f71;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Hazards and Risks&lt;/td&gt;&lt;td style="background-color:#6e6f71;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Risk Control Measures&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" rowspan="4" data-border-color="#ffffff"&gt;Planning&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Unknown hazards:  &lt;br&gt;
                      Injury to workers, plant, equipment and property&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Consultation in relation to hazards and risks. Ensure:&lt;br&gt;
                      All required construction industry induction &amp;amp; training completed (Site Induction and General Industry Induction, and Asbestos Awareness)&lt;br&gt;
                      Complete Pre-Start Risk Assessment with all workers involved in the activity before starting works&lt;br&gt;
                      When applicable, ensure any site rules are followed and understood by all workers. &lt;br&gt;
                      All personnel are signed onto the SWMS&lt;br&gt;
                      Consult with the client/person you are carrying out the work for on the potential hazards and risks associated with the task. &lt;br&gt;
                      Any other persons on site (trade or otherwise) who is affected by the same matter is consulted and co-operative arrangements are made (e.g. co-ordination or alternative measures).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Unauthorised entry to building/site:&lt;br&gt;
                      Injury to workers, plant, equipment and property&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- All workers are to make sure they shut doors after they enter a building when applicable&lt;br&gt;
                      All workers are to have access to a mobile phone at all times&lt;br&gt;
                      Ensure workers tag/sig&lt;br&gt;
                      -in and tag/sig&lt;br&gt;
                      -out where applicable (as per client requirements)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Unusual or Special Working Hours:&lt;br&gt;
                      Injury to workers due to fatigue&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Ensure all workers have a break every 4 hour (break for 20 minutes)&lt;br&gt;
                      Ensure adequate lighting is available for staff working at night (external and internal)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Working Near Moving Mobile Plant&lt;br&gt;
                      Serious injury to workers&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- When applicable, site vehicle/plant movement plan followed (workers on foot) and local traffic management and controls plans adhered to at all times.&lt;br&gt;
                      All workers are to maintain a safe approach distance to all moving mobile plant. &lt;br&gt;
                      Whenever possible, establish an exclusion zone between workers and moving mobile plant.&lt;br&gt;
                      Do not walk in front or behind mobile plant&lt;br&gt;
                      All workers in the work area to wear high visibility clothing and mandatory PPE.&lt;br&gt;
                      Only approach the operator of the plant when you have got their attention from a safe distance and they have stopped operating the plant and signaled (confirmed) for you to approach.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" rowspan="3" data-border-color="#ffffff"&gt;Unloading and loading of tools and equipment&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Communication:&lt;br&gt;
                      Injury to workers, the public and damage to plant, property and equipment&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Communicate with other work parties, all understand works to be undertaken and emergency protocols&lt;br&gt;
                      Communication channels establish with Principle Contractor and or client of work activities &lt;br&gt;
                      Emergency procedures known by all workers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Vehicles and Pedestrians:&lt;br&gt;
                      Injury to public and workers&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- All reasonable steps to be taken to secure work area areas against easy access by an unauthorised person&lt;br&gt;
                      Ensure safe work area is maintained  -  barricades, danger tape, witches '  hats and signage installed as visible indicators&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Manual handling:&lt;br&gt;
                      Injury to workers musculoskeletal&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Ensure the area is clear and free of obstructions&lt;br&gt;
                      Evaluate the size and weight of the gear.&lt;br&gt;
                      Use mechanical aids or team lifts for heavy items. &lt;br&gt;
                      Avoid twisting or over extension&lt;br&gt;
                      Bend your knees not your back&lt;br&gt;
                      Training employees in manual handling&lt;br&gt;
                      Deliver materials as close to the work location as possible&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Pre-Inspections&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Unsafe, faulty electrical equipment and tools:&lt;br&gt;
                      Serious injury to workers due to electric shock  &lt;br&gt;
                  &lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Electrical Tools and Leads to be inspected and tagged three monthly and visually prior to use&lt;br&gt;
                      Power circuits, tools and leads to be protected by RCD&lt;br&gt;
                      Leads not to exceed 30m &lt;br&gt;
                      Mandatory PPE  - including Hardworking Gloves,  &lt;br&gt;
                      Flexible extension cords to be kept off the ground by insulted hangers or stable stands.&lt;br&gt;
                      No Double Adaptors to be used on site&lt;br&gt;
                      Do not run leads between floors&lt;br&gt;
                      Do not join 2 leads together&lt;br&gt;
                      All extension cords heavy duty &amp;amp; fitted with no&lt;br&gt;
                      -rewireable or transparent plugs &amp;amp; sockets.&lt;br&gt;
                      Electrical equipment kept out of and away from, water at all times&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#f4f4f4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" rowspan="10" data-border-color="#ffffff"&gt;Installation and Servicing of Swing, Sliding and Revolving Doors&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Incorrect set up of ladder and step ladder:&lt;br&gt;
                      Injury to worker due to fall from heights&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Only use industrial rated ladders &lt;br&gt;
                      Do not exceed manufacturers maximum load rating&lt;br&gt;
                      Do not leave tools on the ladder&lt;br&gt;
                      Position the ladder facing the work area and keep three points of contact&lt;br&gt;
                      Inspect the ladder for damage before using&lt;br&gt;
                      Do not use closer than 2m to any penetrations or edges&lt;br&gt;
                      Always have a second person to ensure work area is free from unauthorised persons entering and assist when working from a ladder&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Incorrect electrical isolation of door:&lt;br&gt;
                      Injury to workers&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Switch off power source at GPO and disengage PowerPoint during work activities&lt;br&gt;
                      Inform all workers of electrical isolation prior to work taking place&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Slips, Trips and Falls:&lt;br&gt;
                      Injury, musculoskeletal&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Avoid running electrical leads across walkways, corridors etc. &lt;br&gt;
                      Use signage to let others know you are working in the area&lt;br&gt;
                      Ensure appropriate foot wear is worn (fully enclosed with no&lt;br&gt;
                      -slip soles)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Manual handling:&lt;br&gt;
                      Injury to workers musculoskeletal&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Ensure the area is clear and free of obstructions&lt;br&gt;
                      Use mechanical aids or team lifts for heavy items. &lt;br&gt;
                      Avoid twisting or over extension&lt;br&gt;
                      Bend your knees not your back&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Debris from onsite modifications to doors:&lt;br&gt;
                      Injury  -  skin lacerations, eyes&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Always wear working gloves, googles and or face protection during operation of powered equipment and hand tools&lt;br&gt;
                      Maintain an appropriate/safe distance between equipment and surface being modified&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Noise:&lt;br&gt;
                      Hearing Impairment&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Mandatory PPE including hearing protection to be worn when using or in the vicinity of power tools &lt;br&gt;
                      Ensure the equipment is in good working order&lt;br&gt;
                      Ensure noisy activity is conducted away from others, public etc.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Powered tools/electricity:&lt;br&gt;
                      Electric Shock&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Electrical Tools and Leads to be inspected and tagged three monthly and visually prior to use&lt;br&gt;
                      Power circuits, tools and leads to be protected by RCD&lt;br&gt;
                      Leads not to exceed 30m &lt;br&gt;
                      Mandatory PPE  - including Hardworking Gloves,  &lt;br&gt;
                      Flexible extension cords to be kept off the ground by insulted hangers or stable stands.&lt;br&gt;
                      No Double Adaptors to be used on site&lt;br&gt;
                      Do not run leads between floors&lt;br&gt;
                      Do not join 2 leads together&lt;br&gt;
                      All extension cords heavy duty &amp;amp; fitted with no&lt;br&gt;
                      -rewireable or transparent plugs &amp;amp; sockets.&lt;br&gt;
                      Electrical equipment kept out of and away from, water at all times&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Powered tools/equipment moving parts:&lt;br&gt;
                      Struck or caught up in rotating/moving object&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Make sure all guards are in place and emergency stop works where applicable&lt;br&gt;
                      Ensure operating manual are followed when changing tooling on equipment&lt;br&gt;
                      Mandatory PPE, including working gloves to be worn at all times&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Poor housekeeping:&lt;br&gt;
                      Injury to workers, the public and damage to plant, property and equipment&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- All reasonable steps to be taken to secure site against easy access to unauthorised person&lt;br&gt;
                      Ensure working area is cleaned of materials and rubbish&lt;br&gt;
                      Barrier off any unsafe areas when unattended&lt;br&gt;
                      Tools and equipment accounted for and properly secured on site&lt;br&gt;
                  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Hazardous substances:&lt;br&gt;
                      Illness, poisoning, allergic reaction&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- SDS onsite (within five years of publication), instructions followed for all hazardous substances used or come into contact with&lt;br&gt;
                      Mandatory PPE worn correctly with Task-specific PPE, as required by SDS&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Restoration of work area  -  Leave site&lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;Unfinished works:&lt;br&gt;
                      Injury to workers, the public and damage to, property and equipment &lt;br&gt;
                  &lt;/td&gt;&lt;td style="background-color:#F4F4F4;border-width:2px;border-top-color:#ffffff;border-right-color:#ffffff;border-bottom-color:#ffffff;border-left-color:#ffffff;vertical-align:top;text-align:left" data-border-color="#ffffff"&gt;- Signs and barriers to be removed as appropriate&lt;br&gt;
                      Barricade off any unsafe areas&lt;br&gt;
                      Site Supervisor to ensure site is left in a safe and satisfactory condition&lt;br&gt;
                      All reasonable steps to be taken to secure site against easy access to unauthorised person&lt;br&gt;
                  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
      &lt;/figure&gt;
  
      
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p><a href="https://i.stack.imgur.com/qB3GP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qB3GP.png" alt="enter image description here" /></a></p>