Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfIndirectReference


    }
    PdfObject object = node.getPdfObject();
    PdfObjectTreeNode leaf;
    switch (object.type()) {
    case PdfObject.INDIRECT:
      PdfIndirectReference ref = (PdfIndirectReference)object;
      leaf = getNode(ref.getNumber());
      addNodes(node, leaf);
      if (leaf instanceof PdfPagesTreeNode)
        expandNode(leaf);
      return;
    case PdfObject.ARRAY:
View Full Code Here


                        String anchorName = (String) entry.getKey();
                        dests.add(new PdfString(anchorName, PdfString.TEXT_UNICODE));

                        PdfDestination dest = createDestination(c, targetBox);
                        if (dest != null) {
                            PdfIndirectReference ref = _writer.addToBody(dest).getIndirectReference();
                            dests.add(ref);
                        }
                    }
                }

                if (!dests.isEmpty()) {
                    PdfDictionary nametree = new PdfDictionary();
                    nametree.put(PdfName.NAMES, dests);
                    PdfIndirectReference nameTreeRef = _writer.addToBody(nametree).getIndirectReference();

                    PdfDictionary names = new PdfDictionary();
                    names.put(PdfName.DESTS, nameTreeRef);
                    PdfIndirectReference destinationsRef = _writer.addToBody(names).getIndirectReference();

                    _writer.getExtraCatalog().put(PdfName.NAMES, destinationsRef);
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PdfIndirectReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.