Margin not honored in creating PDF from AppSheet

Hello, I made a bot that allows you to create a pdf from a Google Doc template. When the content is on a page, its ok. On the other hand, as soos as the content is on 2 pages, the top margin of the 2nd page doesn't exit. The tontent is at the edge of the page. Do you have a solution to fix this problem ? Thanks

 

Solved Solved
2 7 1,910
1 ACCEPTED SOLUTION

Top and bottom margins in the template document will only be honored for the top margin on the first page, and the bottom margin on the last page. Set the top/bottom margins in the template doc to 0, then use the "custom margins" setting in the Task itself for control over the per-page top and bottom margins.

View solution in original post

7 REPLIES 7

Margins should be honored.  Headers will only show on first page and footers on last page.

What are your margin settings?  Do you have any table that may be overriding the page margin?  Can you provide an example of your generated result?

I removed the header and footer elements after reading some posts on the subject. 

My data is in a 2 column by 9 row table. I used this to put on eachline a text field and in the 2nd column the corresponding image on the same line....

I just did a test without a tble by putting each field one afater the other. Same result.

The margins of my template document are : Top and bottom = 2.

Attached is a screenshot showing the footer of the 1st page and the top of the second page which is the problem.Capture dโ€™รฉcran 2022-02-12 145527.jpg

Top and bottom margins in the template document will only be honored for the top margin on the first page, and the bottom margin on the last page. Set the top/bottom margins in the template doc to 0, then use the "custom margins" setting in the Task itself for control over the per-page top and bottom margins.

I set the margins to zero on my template. And on my app's task 'Create PDF', I put the following margins.

Capture dโ€™รฉcran 2022-02-12 180701.jpg

This is the result and still the problem. Grrrr I believed it !

Capture dโ€™รฉcran 2022-02-12 180759.jpg

Hmmm. 10 points is pretty small, it's 72 points to an inch, IIRC. Are you sure you just didn't set them high enough?

Great ! I'm used to putting the margins in centimeters... suddenly I had exagerates... but not at all.

Indeed by putting the right measures in point, it works much better !

Thank you very much!!

Super, thank you so much for this information!

Top Labels in this Space