/** * Set the page of the <CODE>PdfDestination</CODE>-object. * * @param pageReference indirect reference to the page * @return <CODE>true</CODE> if this page was set as the <CODE>PdfDestination</CODE>-page. */ public boolean setDestinationPage(PdfIndirectReference pageReference) { if (destination == null) { return false; } return destination.addPage(pageReference); }
/** * Set the page of the <CODE>PdfDestination</CODE>-object. * * @param pageReference indirect reference to the page * @return <CODE>true</CODE> if this page was set as the <CODE>PdfDestination</CODE>-page. */ public boolean setDestinationPage(PdfIndirectReference pageReference) { if (destination == null) { return false; } return destination.addPage(pageReference); }
/** * Set the page of the <CODE>PdfDestination</CODE>-object. * * @param pageReference indirect reference to the page * @return <CODE>true</CODE> if this page was set as the <CODE>PdfDestination</CODE>-page. */ public boolean setDestinationPage(PdfIndirectReference pageReference) { if (destination == null) { return false; } return destination.addPage(pageReference); }
/** * Adds one named destination. * @param name the name for the destination * @param page the page number where you want to jump to * @param dest an explicit destination * @since iText 5.0 */ public void addNamedDestination(String name, int page, PdfDestination dest) { dest.addPage(getPageReference(page)); pdf.localDestination(name, dest); }
/** * Adds one named destination. * @param name the name for the destination * @param page the page number where you want to jump to * @param dest an explicit destination * @since iText 5.0 */ public void addNamedDestination(String name, int page, PdfDestination dest) { dest.addPage(getPageReference(page)); pdf.localDestination(name, dest); }
/** * Creates an Annotation with a PdfDestination. * * @return A PdfAnnotation */ public static PdfAnnotation createLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest) { PdfAnnotation annot = createLink(writer, rect, highlight); PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); annot.put(PdfName.DEST, dest); return annot; }
public void initializePage(PdfContentByte currentPage, float height) { _currentPage = currentPage; _pageHeight = height; _currentPage.saveState(); _transform = new AffineTransform(); _transform.scale(1.0d / _dotsPerPoint, 1.0d / _dotsPerPoint); _stroke = transformStroke(STROKE_ONE); _originalStroke = _stroke; _oldStroke = _stroke; setStrokeDiff(_stroke, null); if (_defaultDestination == null) { _defaultDestination = new PdfDestination(PdfDestination.FITH, height); _defaultDestination.addPage(_writer.getPageReference(1)); } _linkTargetAreas = new HashSet(); }
public void initializePage(PdfContentByte currentPage, float height) { _currentPage = currentPage; _pageHeight = height; _currentPage.saveState(); _transform = new AffineTransform(); _transform.scale(1.0d / _dotsPerPoint, 1.0d / _dotsPerPoint); _stroke = transformStroke(STROKE_ONE); _originalStroke = _stroke; _oldStroke = _stroke; setStrokeDiff(_stroke, null); if (_defaultDestination == null) { _defaultDestination = new PdfDestination(PdfDestination.FITH, height); _defaultDestination.addPage(_writer.getPageReference(1)); } _linkTargetAreas = new HashSet(); }
public void initializePage(PdfContentByte currentPage, float height) { _currentPage = currentPage; _pageHeight = height; _currentPage.saveState(); _transform = new AffineTransform(); _transform.scale(1.0d / _dotsPerPoint, 1.0d / _dotsPerPoint); _stroke = transformStroke(STROKE_ONE); _originalStroke = _stroke; _oldStroke = _stroke; setStrokeDiff(_stroke, null); if (_defaultDestination == null) { _defaultDestination = new PdfDestination(PdfDestination.FITH, height); _defaultDestination.addPage(_writer.getPageReference(1)); } _linkTargetAreas = new HashSet(); }
public void initializePage(PdfContentByte currentPage, float height) { _currentPage = currentPage; _pageHeight = height; _currentPage.saveState(); _transform = new AffineTransform(); _transform.scale(1.0d / _dotsPerPoint, 1.0d / _dotsPerPoint); _stroke = transformStroke(STROKE_ONE); _originalStroke = _stroke; _oldStroke = _stroke; setStrokeDiff(_stroke, null); if (_defaultDestination == null) { _defaultDestination = new PdfDestination(PdfDestination.FITH, height); _defaultDestination.addPage(_writer.getPageReference(1)); } _linkTargetAreas = new HashSet(); }
/** * Creates an Annotation with a PdfDestination. * @param writer * @param rect * @param highlight * @param page * @param dest * @return A PdfAnnotation */ public static PdfAnnotation createLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest) { PdfAnnotation annot = createLink(writer, rect, highlight); PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); annot.put(PdfName.DEST, dest); return annot; }
/** * Creates an Annotation with a PdfDestination. * @param writer * @param rect * @param highlight * @param page * @param dest * @return A PdfAnnotation */ public static PdfAnnotation createLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest) { PdfAnnotation annot = createLink(writer, rect, highlight); PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); annot.put(PdfName.DEST, dest); return annot; }
/** Creates a GoTo action to an internal page. * @param page the page to go. First page is 1 * @param dest the destination for the page * @param writer the writer for this action * @return a GoTo action */ public static PdfAction gotoLocalPage(int page, PdfDestination dest, PdfWriter writer) { PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName.GOTO); action.put(PdfName.D, dest); return action; }
/** Creates a GoTo action to an internal page. * @param page the page to go. First page is 1 * @param dest the destination for the page * @param writer the writer for this action * @return a GoTo action */ public static PdfAction gotoLocalPage(int page, PdfDestination dest, PdfWriter writer) { PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName.GOTO); action.put(PdfName.D, dest); return action; }
/** Creates a GoTo action to an internal page. * @param page the page to go. First page is 1 * @param dest the destination for the page * @param writer the writer for this action * @return a GoTo action */ public static PdfAction gotoLocalPage(int page, PdfDestination dest, PdfWriter writer) { PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName.GOTO); action.put(PdfName.D, dest); return action; }
private PdfDestination createDestination(RenderingContext c, Box box) { PdfDestination result = null; PageBox page = _root.getLayer().getPage(c, getPageRefY(box)); if (page != null) { int distanceFromTop = page.getMarginBorderPadding(c, CalculatedStyle.TOP); distanceFromTop += box.getAbsY() + box.getMargin(c).top() - page.getTop(); result = new PdfDestination(PdfDestination.XYZ, 0, page.getHeight(c) / _dotsPerPoint - distanceFromTop / _dotsPerPoint, 0); result.addPage(_writer.getPageReference(_startPageNo + page.getPageNo() + 1)); } return result; }
private PdfDestination createDestination(RenderingContext c, Box box) { PdfDestination result = null; PageBox page = _root.getLayer().getPage(c, getPageRefY(box)); if (page != null) { int distanceFromTop = page.getMarginBorderPadding(c, CalculatedStyle.TOP); distanceFromTop += box.getAbsY() + box.getMargin(c).top() - page.getTop(); result = new PdfDestination(PdfDestination.XYZ, 0, page.getHeight(c) / _dotsPerPoint - distanceFromTop / _dotsPerPoint, 0); result.addPage(_writer.getPageReference(_startPageNo + page.getPageNo() + 1)); } return result; }
private PdfDestination createDestination(RenderingContext c, Box box) { PdfDestination result; PageBox page = _root.getLayer().getPage(c, getPageRefY(box)); int distanceFromTop = page.getMarginBorderPadding(c, CalculatedStyle.TOP); distanceFromTop += box.getAbsY() + box.getMargin(c).top() - page.getTop(); result = new PdfDestination( PdfDestination.XYZ, 0, page.getHeight(c) / _dotsPerPoint - distanceFromTop / _dotsPerPoint, 0); result.addPage(_writer.getPageReference(_startPageNo + page.getPageNo()+1)); return result; }
private PdfDestination createDestination(RenderingContext c, Box box) { PdfDestination result; PageBox page = _root.getLayer().getPage(c, getPageRefY(box)); int distanceFromTop = page.getMarginBorderPadding(c, CalculatedStyle.TOP); distanceFromTop += box.getAbsY() + box.getMargin(c).top() - page.getTop(); result = new PdfDestination( PdfDestination.XYZ, 0, page.getHeight(c) / _dotsPerPoint - distanceFromTop / _dotsPerPoint, 0); result.addPage(_writer.getPageReference(_startPageNo + page.getPageNo()+1)); return result; }
private PdfDestination createDestination(RenderingContext c, Box box) { PdfDestination result; PageBox page = _root.getLayer().getPage(c, getPageRefY(box)); int distanceFromTop = page.getMarginBorderPadding(c, CalculatedStyle.TOP); distanceFromTop += box.getAbsY() + box.getMargin(c).top() - page.getTop(); result = new PdfDestination( PdfDestination.XYZ, 0, page.getHeight(c) / _dotsPerPoint - distanceFromTop / _dotsPerPoint, 0); result.addPage(_writer.getPageReference(_startPageNo + page.getPageNo()+1)); return result; }