Create PDF from raw HTML via automation

How about using the <p> tag?

1 Like

Have you tried that?

AppSheet Directives need >>

A single > is and HTML tag

I assume NOBODY has ever done a real PDF file report from an HTML template using START: or IF: Appsheet directives on here? ( I mean HTML template not a Google Doc Template)

Or is there a sample somewhere proving it works as documented by AppSheet?

I did not see any documentation, BTW I tried this and worked.

In an ABCD.html file, an expression needs a tag, in my experience.

Can you share the snippet of HTML code with the START and END directives that you got working using an HTML template to create a PDF?

Many Thanks

4 Likes

Excellent, thanks to @leinharte for providing the information to reach a solution.

For other users having issues with using the HTML template, here is the summary of what is needed.

  • Enclose the START: IF: ENDIF and END Appsheet directives in a p tag

  • Do not use << or >> use & lt ; & lt ; and & gt ; & gt ; instead ( I had to include spaces because this editor reformats the tag!)

Appsheet documentation mentions this briefly in odd places, but only in passing, so it’s easy to miss

<div>

  <p>&lt;&lt;START: whatever function you want here &gt;&gt;</p>

  <li>&lt;&lt; Whatever you want to display here &gt;&gt;</li>

  <p>&lt;&lt;END&gt;&gt;</p>

</div>
4 Likes

Hi @CaptainEon ,

Thank you for posting your experience and how you solved it . It will definitely help any future reader of the post thread.
It sounds that @leinharte 's post was helpful in reaching the solution. May we request you to mark his post as solution.

It will help in A) Others searching for a solution to the similar issue locate this post faster. B) Almost all community members except Google staff contribute voluntarily. So it will help in cheering up a community member.

2 Likes

I strongly suspect you are having issues due to editing the HTML template inside GDrive.
You must use a .html file uploaded to Gdrive but never touch it directly in it. Always edit it offline using a desktop editor (VSCode, Zed.dev) or even vscode.dev; then upload to GDrive.
When doing it this way, the ruels are as stated in the docs: Use HTML entities

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.