I need to create an App Script function, to export square pictures from our table automatically, as PNG.
When i use the export API, with the link:
"
https://docs.google.com/spreadsheets/d/{spreadsheet_id}/export?&exportFormat=pdf&format=pdf&size=1x1&fzr=false&portrait=true&fitw=true&sheetnames=false&printtitle=false&pagenum=RIGHT&gridlines=false&attachment=false&horizontal_alignment=CENTER&vertical_alignment=MIDDLE&alt=media&top_margin=0&bottom_margin=0&left_margin=0&right_margin=0&gid={sheet_id}&c1=4&r1=3&c2=5&r2=4"
It's just not looks good.
The problem is an error (status 500, internal server error), when i change top_margin into any positive number to fix the picture.
Maybe it's a bug, but anyway, I need your help for an alternative way to go now.
Using top_margin="0" does not fits my needs, because it puts my photo too high, outside of the top-border.
Then i changed top_margin (just to test), but i keep getting that error.