Example #1
0
 /**
  * Sets the page size to the given <code>Dimension</code> object.
  *
  * @param pgSize page size
  */
 public void setPageSize(Dimension pgSize) {
   CTSlideSize sz = CTSlideSize.Factory.newInstance();
   sz.setCx(Units.toEMU(pgSize.getWidth()));
   sz.setCy(Units.toEMU(pgSize.getHeight()));
   _presentation.setSldSz(sz);
 }
Example #2
0
 /**
  * Returns the current page size
  *
  * @return the page size
  */
 public Dimension getPageSize() {
   CTSlideSize sz = _presentation.getSldSz();
   int cx = sz.getCx();
   int cy = sz.getCy();
   return new Dimension((int) Units.toPoints(cx), (int) Units.toPoints(cy));
 }