🚨 HTML2PDF Deprecated [UPDATE + ALTERNATIVES]

Why are there now 5 tables?
Your issue is error 414 because the content in your template is too long. I have temporarily removed your table 4. Later, you can create it again using the same procedure just to print table.
Try copying the following code to test it first:

<style>
table, #table1, #table2, #table3, #table4, #table5 {font-family: Calibri; width: 100%}

#table1 {border-bottom: 1px solid #ddd;}

#table2 {color: black; border: 1px solid #000;border-collapse: collapse;}
</style>

<h2>BOOM LIFTS INSPECTION REPORT</h2>
<table id="table1">
<tr>
<td>Report No</td>
<td colspan="2">{{reportno}}</td>
<td>Date</td>
<td colspan="2">{{date}}</td>
</tr>
<tr>
<td>Model</td>
<td colspan="2">{{modelno}} {{equipmentid}}</td>
<td>Hour Meter</td>
<td colspan="2">{{hourmeter}}</td>
</tr>
<tr>
<td>Serial No</td>
<td colspan="2">{{serialno}}</td>
<td>Customer</td>
<td colspan="2">{{customer}}</td>
</tr>
<tr>
<td>PMA No</td>
<td colspan="2">{{pmano}}</td>
<td>Site Location</td>
<td colspan="2">{{sitelocation}}</td>
</tr>
<tr>
<td>PMA Cert. Expiry</td>
<td colspan="2">{{pmaexpiry}}</td>
<td>Inspection Type</td>
<td colspan="2">{{inspectiontype}}</td>
</tr>
<tr>
<td>Inspected By</td>
<td colspan="2">{{inspectedby}}</td>
<td>Job Type</td>
<td colspan="2">{{jobtype}}</td>
</tr>
</table>
<p></p>
<p></p>
<table id="table2">
{{table2}}
</table>
<p></p>
<table id="table3">
{{table3}}
</table>
<p></p>
<table id="table5">
<tr>
<th colspan="10">PHOTO</th>
<th colspan="2">RESULTS</th>
</tr>
<tr>
<th colspan="12">TIRE CONDITION</th>
</tr>
<tr>
<td><img class="fit-picture" src="{{PQ1}}" alt="Forward Right" /></td>
<th></th>
</tr>
</tr>
<tr>
<td colspan="1">67</td>
<td colspan="9">Forward Left</td>
<td colspan="2">{{PQ2}}</td>
</tr>
<tr>
<td colspan="1">68</td>
<td colspan="9">Rear Right</td>
<td colspan="2">{{PQ3}}</td>
</tr>
<tr>
<td colspan="1">69</td>
<td colspan="9">Rear Left</td>
<td colspan="2">{{PQ4}}</td>
</tr>
</table>

I added code to count the number of characters so you can monitor your condition.

1 Like

Hi @Loqode!

Am I correct in saying that none of the options work anymore? Seems to have been disabled today / over the weekend.

Do you have any suggestions for hosted alternatives?

Thanks,

1 Like

I’m working on a free plugin for everyone, stay tuned :+1:

The options above should still work, the only one that won’t is probably the dev link.

5 Likes

First off, thanks for putting this together. I have a suggestion for your consideration - making the timeout for the print function a parameter… either in the querystring or as a configurable option in the plug-in (if possible).

Here’s why I’m asking… I recently added an image tag to my template, which passes a deeplink to yet another URL (similar to what you are doing) to generate a qr image from the deeplink passed in the querystring. Often, the image does not appear before the print function kicks off, thus it is not included in the print dialog. I have to click cancel and the second time it works perfectly. Changing the timeout from 500 to something like 1000 should fix this by allowing just enough time for the image to load before kicking off the print function.

I had planned to take your code and self host with the necessary timeout tweak implemented. Just sharing in case you may want to include a configurable timeout in any future enhancements.

Thanks again!

1 Like

Here’s the plugin!

Enjoy! :nerd_face:

2 Likes

Hi there. thank you so much for your help.the plugin works perfectly one but there is one issue. since we are using glide free plan we can;t have a web-embed component , instead we have to use a button as this is the only alternative. but it seems every time we click the button when it tries to direct us to the url we get a blank page and we need to refresh it manually before the report with the download option appears.this has to be done every time. can you help us to fix this issue and maybe update the code so we don’t need to refresh the page manually everytime.I have tried several changes in the code but nth seems to fix the issue.

i get the URL TOO LARGE message when I try to print after adding 5 replacements to the bottom of the HTML column editor in Glide. when I remove the other four replacements, one replacement template prints (with its filler text, but no content is printing–separate issue). i also want to print multiple pdf generated labels from one print command, not just individual labels. that would take forever.

En realidad si es posible usarlo en modo gratuito solo que debes seguirlo al pie de la letra:

  1. crea el html.
  2. añade el html a la función de código experimental.
  3. crea un botón en la pantalla que necesites y asigna la opción de open link que abra la información de la columna de código experimental.
  4. Si es para usarlo en móvil asigna que el link de abra desde google chrome, al abrir saldrá una pantalla en blanco la cual simplemente le darás en actualizar y Listo!! tendrás tu PDF. para web es exactamente igual.