Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfArray


      cb.endLayer();
      cb.beginLayer(l3);
      ColumnText.showTextAligned(cb, Element.ALIGN_LEFT, p3, 50, 500, 0);
      cb.endLayer();
      PdfOCProperties p = writer.getOCProperties();
      PdfArray order = new PdfArray();
      order.add(l1.getRef());
      PdfArray group = new PdfArray();
      group.add(new PdfString("A group of two", PdfObject.TEXT_UNICODE));
      group.add(l2.getRef());
      group.add(l3.getRef());
      order.add(group);
      PdfDictionary d = new PdfDictionary();
      d.put(PdfName.ORDER, order);
      p.put(PdfName.D, d);
    } catch (DocumentException de) {
View Full Code Here


            cb.endLayer();
            cb.endLayer();
            cb.sanityCheck();
           
            PdfOCProperties p = writer.getOCProperties();
            PdfArray order = new PdfArray();
            order.add(l1.getRef());
            order.add(l23.getRef());
            PdfArray group = new PdfArray();
            group.add(l2.getRef());
            group.add(l3.getRef());
            order.add(group);
            PdfDictionary d = new PdfDictionary();
            d.put(PdfName.ORDER, order);
            p.put(PdfName.D, d);
            // step 5
View Full Code Here

    }

    private void writeNamedDestinations(RenderingContext c) {
        Map idMap = getSharedContext().getIdMap();
        if ((idMap != null) && (!idMap.isEmpty())) {
            PdfArray dests = new PdfArray();
            try {
                Iterator it = idMap.entrySet().iterator();
                while (it.hasNext()) {
                    Entry entry = (Entry) it.next();

                    Box targetBox = (Box) entry.getValue();

                    if (targetBox.getStyle().isIdent(CSSName.FS_NAMED_DESTINATION, IdentValue.CREATE)) {
                        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();
View Full Code Here

TOP

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

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.