The following codes are for educational purpose only and not intended to be used / submitted as your own solutions. Cheating violates the Academic Honesty of the course, not to mention it's totally ...
It essentially takes your GUI input and turns it into the following Ghostscript command: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH ...