void addDefaultColor(PdfName name, PdfObject obj) { if (obj == null || obj.isNull()) colorDictionary.remove(name); else colorDictionary.put(name, obj); }
void addDefaultColor(PdfName name, PdfObject obj) { if (obj == null || obj.isNull()) colorDictionary.remove(name); else colorDictionary.put(name, obj); }
void addDefaultColor(PdfName name, PdfObject obj) { if (obj == null || obj.isNull()) colorDictionary.remove(name); else colorDictionary.put(name, obj); }
void addAdditionalAction(PdfName actionType, PdfAction action) { if (additionalActions == null) { additionalActions = new PdfDictionary(); } if (action == null) additionalActions.remove(actionType); else additionalActions.put(actionType, action); if (additionalActions.size() == 0) additionalActions = null; }
void addAdditionalAction(PdfName actionType, PdfAction action) { if (additionalActions == null) { additionalActions = new PdfDictionary(); } if (action == null) additionalActions.remove(actionType); else additionalActions.put(actionType, action); if (additionalActions.size() == 0) additionalActions = null; }
private static void moveRectangle(PdfDictionary dic2, PdfReader r, int pageImported, PdfName key, String name) { Rectangle m = r.getBoxSize(pageImported, name); if (m == null) dic2.remove(key); else dic2.put(key, new PdfRectangle(m)); }
void addAdditionalAction(PdfName actionType, PdfAction action) { if (additionalActions == null) { additionalActions = new PdfDictionary(); } if (action == null) additionalActions.remove(actionType); else additionalActions.put(actionType, action); if (additionalActions.size() == 0) additionalActions = null; }
public void setMKBackgroundColor(Color color) { if (color == null) getMK().remove(PdfName.BG); else getMK().put(PdfName.BG, getMKColor(color)); }
public void setMKBorderColor(Color color) { if (color == null) getMK().remove(PdfName.BC); else getMK().put(PdfName.BC, getMKColor(color)); }
public void setMKBorderColor(Color color) { if (color == null) getMK().remove(PdfName.BC); else getMK().put(PdfName.BC, getMKColor(color)); }
/** * Sets the display duration for the page (for presentations) * @param seconds the number of seconds to display the page. A negative value removes the entry * @param page the page where the duration will be applied. The first page is 1 */ void setDuration(int seconds, int page) { PdfDictionary pg = reader.getPageN(page); if (seconds < 0) pg.remove(PdfName.DUR); else pg.put(PdfName.DUR, new PdfNumber(seconds)); markUsed(pg); }
/** * Sets the transition for the page * @param transition the transition object. A <code>null</code> removes the transition * @param page the page where the transition will be applied. The first page is 1 */ void setTransition(PdfTransition transition, int page) { PdfDictionary pg = reader.getPageN(page); if (transition == null) pg.remove(PdfName.TRANS); else pg.put(PdfName.TRANS, transition.getTransitionDictionary()); markUsed(pg); }
public void setMKBackgroundColor(Color color) { if (color == null) { getMK().remove(PdfName.BG); } else { getMK().put(PdfName.BG, getMKColor(color)); } }
public void setMKBorderColor(Color color) { if (color == null) { getMK().remove(PdfName.BC); } else { getMK().put(PdfName.BC, getMKColor(color)); } }
/** * Sets the transition for the page * @param transition the transition object. A <code>null</code> removes the transition * @param page the page where the transition will be applied. The first page is 1 */ void setTransition(PdfTransition transition, int page) { PdfDictionary pg = this.reader.getPageN(page); if (transition == null) pg.remove(PdfName.TRANS); else pg.put(PdfName.TRANS, transition.getTransitionDictionary()); markUsed(pg); }
public void setMKBackgroundColor(Color color) { if (color == null) getMK().remove(PdfName.BG); else getMK().put(PdfName.BG, getMKColor(color)); }
/** * Sets the transition for the page * @param transition the transition object. A <code>null</code> removes the transition * @param page the page where the transition will be applied. The first page is 1 */ void setTransition(PdfTransition transition, int page) { PdfDictionary pg = reader.getPageN(page); if (transition == null) pg.remove(PdfName.TRANS); else pg.put(PdfName.TRANS, transition.getTransitionDictionary()); markUsed(pg); }
void deleteOutlines() { PdfDictionary catalog = reader.getCatalog(); PRIndirectReference outlines = (PRIndirectReference)catalog.get(PdfName.OUTLINES); if (outlines == null) return; outlineTravel(outlines); PdfReader.killIndirect(outlines); catalog.remove(PdfName.OUTLINES); markUsed(catalog); }
void deleteOutlines() { PdfDictionary catalog = this.reader.getCatalog(); PRIndirectReference outlines = (PRIndirectReference)catalog.get(PdfName.OUTLINES); if (outlines == null) return; outlineTravel(outlines); PdfReader.killIndirect(outlines); catalog.remove(PdfName.OUTLINES); markUsed(catalog); }
void deleteOutlines() { PdfDictionary catalog = reader.getCatalog(); PRIndirectReference outlines = (PRIndirectReference)catalog.get(PdfName.OUTLINES); if (outlines == null) return; outlineTravel(outlines); PdfReader.killIndirect(outlines); catalog.remove(PdfName.OUTLINES); markUsed(catalog); }