0

The solution provided in this answer is correct but in my experience, a slide in 4:3 format will be saved as a pdf in the 16:9 format, which scrambles the contents.

How can I save a Google Slide to pdf and make the output pdf preserve the original slide format?

1 Answer 1

1

Simple Solution:

function SaveAsPDF() {
  var googleSlidesId = "#############################" //replace with presentation id
  var slidesBlob = UrlFetchApp.fetch("https://docs.google.com/presentation/d/"+googleSlidesId+"/export?format=pdf").getBlob();
  var pdf = DriveApp.createFile(slidesBlob);
  Logger.log(pdf.getUrl());
}

UrlFetchApp

Sign up to request clarification or add additional context in comments.

5 Comments

This does not preserve the file format. A slide formatted in 4:3 will turn into a pdf in 16:9 format.
Solution is working fine. please test it again. 4:3 slides file and PDF
Sorry I didn't test your solution 🤦‍♂️. Will do.
I tested the solution and it still outputs files in 16:9 format. Strange.
Got it. I had introduced additional steps which turned the Slide Presentation in 16:9 format, so of course the pdf was 16:9 as well. Your solution is perfectly fine. If you edit it I'll be able to remove the downvote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.