function getChartToPNG() {
var slides = SlidesApp.openById('YOUR SLIDES ID');
var slide = slides.getSlides()[0]; //get the first slide. if you want all the
var charts = slide.getSheetsCharts(); //gets charts embedded from or linked from sheets
var image = DriveApp.createFile(charts[0].asImage()).setName("chart.png"); //create a new file in Drive. You could do a lot more here,..
//putting images in a specific folder and over-writing existing image files, and if they were already embedded with docs, you may be done.
//from here, I inserted the image into my Classic Google Site.
//var page = SitesApp.getPageByUrl('URL TO My SITE');
//var atch = page.getAttachments();
//atch[0].setFrom(image);
//So I assume you should be able to do something similar with Docs.
}
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/PPwedmWH-ik/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/fe09b31e-2bd9-4b06-9604-fd5ff9628314%40googlegroups.com.
I was hoping by starting with sharper images, the reduction in the conversion to pdf might make them come out a bit better. Don't know if it actually would though.. lol Please post if you get something to work!
To unsubscribe from this group and all its topics, send an email to google-apps-script-community+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/fe09b31e-2bd9-4b06-9604-fd5ff9628314%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/b367d660-97bd-42da-8cc9-598eb14d0828%40googlegroups.com.