0

I converted Google Sheets file to PDF with scripts:

var source = DriveApp.getFilesByName('template').next();
var temp = source.getAs('application/pdf').setName(new_name);
var newFile = folder.createFile(temp);

Unfortunately the destination file PDF lost all margins it originally had. I have set the correct margins in Google Sheets.

How do I keep the same margin values in the destination file?

Aerials
  • 4,231
  • 1
  • 16
  • 20
Augustus
  • 1
  • 1
  • Perhaps this will help: https://stackoverflow.com/a/45211625/7215091 – Cooper Feb 27 '20 at 21:00
  • look into [this answer](https://stackoverflow.com/questions/46088042/margins-parameters-for-spreadsheet-export/46312255) – Aerials Mar 02 '20 at 08:45
  • Does this answer your question? [Google apps script getAs('application/pdf') layout](https://stackoverflow.com/questions/45209619/google-apps-script-getasapplication-pdf-layout) – Aerials Mar 02 '20 at 08:48

0 Answers0