Make the output PDF file a portion of the original | Scene7

Issue

I want to change the dimension of the file for the output PDF, so it’s a part of the whole. Do I use setAttr.rootElement to adjust viewHeight and viewWidth?

Solution

viewWidth and viewHeight settings in the root element are ignored when the group corresponding to the artboard or page contains d:pageWidth and d:pageHeight.

To diminish the viewing area on a given page or artboard, add an s7:elementID to the group corresponding to the artboard or page. Then, apply a DOM call to change d:pageWidth or d:pageHeight. You could also increment the viewable area by offsetting x and y for the group.