Pdf formatting with header and footer

Hi,

I worked 7 days on a project.

And I discovered that Appsheet cannot generate PDF files with a header and a footer ? Seriously?

And It cannot generate Google Docs files ?

I'm so disappointed !!

 

Solved Solved
0 12 440
2 ACCEPTED SOLUTIONS

I posted some example Html here https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/If-You-Have-Not-Tried-HTML-Templates-You-Should... that includes code to make a header and footer. I know this is a no-code/low-code platform, so this would be considered a bit more advanced.

View solution in original post

That is the one I followed and to eliminate the last blank page I ended up removing the <div class="page"/> tags.

Markus_Malessa_0-1708092604992.png

 

View solution in original post

12 REPLIES 12

Yes, unfortunately that's true.. almost. There are some workarounds how to do it, or with the html, but it's a little bit bigger job to do.

As Aleksi mentioned it is not currently possible with AppSheet native features.

However, it can be possible with workarounds by using some other Google tools such as GAS.

Some relevant tips to evaluate below

Part 1 - Almost pixel perfect pdf reports from aut... - Google Cloud Community

Export to Google Docs from AppSheet - Google Cloud Community

Use GAS : Create reports having different backgrou... - Google Cloud Community

 

I posted some example Html here https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/If-You-Have-Not-Tried-HTML-Templates-You-Should... that includes code to make a header and footer. I know this is a no-code/low-code platform, so this would be considered a bit more advanced.

Hi @Markus_Malessa 
Yes, that's great. I found this Medium article. This is the same approach !!
https://medium.com/@Idan_Co/the-ultimate-print-html-template-with-header-footer-568f415f6d2a

The only  issue : I always obtain an extra blank page at the end of the generated pdf ?

 

 

That is the one I followed and to eliminate the last blank page I ended up removing the <div class="page"/> tags.

Markus_Malessa_0-1708092604992.png

 

Thank you guys ! ๐Ÿ™‚
I'm going to run some tests using the links provided and I'll get back to you.

Any update Eric?

I am having difficulty when i try to group the output (ie I have an external start to order the data by category , as I want to create a subtotal) The grouping works, but every 'break in category throws a new page

Hi,
I used this Medium article. And it works great
https://medium.com/@Idan_Co/the-ultimate-print-html-template-with-header-footer-568f415f6d2a

I don't know the length of my document in advance and the header and footer are created perfectly.
I create HTML output and then print as a PDF from Chrome

Hi Eric -

thanks for the update. I am suing this type of construct

<p>&lt;&lt;Start:FILTER(Quote Detail, [Line ID]=MAXROW(Quote Detail,_Rownumber,AND( [_THISROW] = [QUOTE ID] ,[Category]=[_THISROW-1].[Category])))&gt;&gt;</p>
<p>CAT: &lt;&lt;[QPR ID].[Category].[Category]&gt;&gt;</p>

<table>
<tr><td><p><span>Item</span></p></td><td><p><span>Category</span></p></td><td><p><span>Quantity</span></p></td><td><p><span>Precio</span></p></td><td><p><span>Total</span></p></td></tr>
<tr>
<td><p><span>&lt;&lt;Start:FILTER(Quote Detail,AND([_THISROW] = [QUOTE ID],[QPR ID].[Category]=[_THISROW-1].[Category]))&gt;&gt;&lt;&lt;[QPR ID].[DESCRIPCIร“]&gt;&gt;</span></p></td>
<td><p><span>&lt;&lt;[QPR ID].[Category].[Category]&gt;&gt;</span></p></td>
<td><p><span>&lt;&lt;[Qty]&gt;&gt;</span></p></td>
<td><p><span>&lt;&lt;[P.Unitat]&gt;&gt;</span></p></td>
<td><p><span>&lt;&lt;[Line Total]&gt;&gt;&lt;&lt;End&gt;&gt;</span></p></td>
</tr>
</table>
<p>&lt;&lt;End&gt;&gt;</p>
<div style="line-height: 3;">

and the document is paging on every break in category- What i will do is go back to the original guide and start again.

Thanks again for the quick reply

Matt

(apologies for the formatting - i need to practise posting code!)

Can you provide the HTML output ? (html + css code)

Hi Eric ,

thanks for your help with the link. I have re written the page from scratch and it is now working as expected! I have also moved to using tables for layout (I know ๐Ÿ˜…) , but as this is only for a printing template , it probably is not a bad idea. Thanks again

Ok !
Glad to hear that ๐Ÿ˜€

Top Labels in this Space