Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfArray.listIterator()


      }
      for (int k = 1; k <= reader.getNumberOfPages(); ++k) {
        PdfArray annots = reader.getPageN(k).getAsArray(PdfName.ANNOTS);
        if (annots == null)
          continue;
        for (Iterator<PdfObject> i = annots.listIterator(); i.hasNext();) {
          PdfDictionary annot = (PdfDictionary) PdfReader
              .getPdfObject(i.next());
          PdfName subType = annot.getAsName(PdfName.SUBTYPE);
          if (!PdfName.FILEATTACHMENT.equals(subType))
            continue;
View Full Code Here


              }
            }
            for (int k = 1; k <= pdfReader.getNumberOfPages(); ++k) {
              PdfArray annots = (PdfArray) PdfReader.getPdfObject(pdfReader.getPageN(k).get(PdfName.ANNOTS));
              if (annots != null){
                for (Iterator iter = annots.listIterator(); iter.hasNext();) {
                  PdfDictionary annot = (PdfDictionary) PdfReader.getPdfObject((PdfObject) iter.next());
                  PdfName subType = (PdfName) PdfReader.getPdfObject(annot.get(PdfName.SUBTYPE));
                  if (PdfName.FILEATTACHMENT.equals(subType)){
                    PdfDictionary filespec = (PdfDictionary) PdfReader.getPdfObject(annot.get(PdfName.FS));
                    unpackedFiles += unpackFile(filespec, inputCommand.getOutputFile(), inputCommand.isOverwrite());
View Full Code Here

      for (int k = 1; k <= reader.getNumberOfPages(); ++k) {
        PdfArray annots = (PdfArray) PdfReader.getPdfObject(reader
            .getPageN(k).get(PdfName.ANNOTS));
        if (annots == null)
          continue;
        for (Iterator i = annots.listIterator(); i.hasNext();) {
          PdfDictionary annot = (PdfDictionary) PdfReader
              .getPdfObject((PdfObject) i.next());
          PdfName subType = (PdfName) PdfReader.getPdfObject(annot
              .get(PdfName.SUBTYPE));
          if (!PdfName.FILEATTACHMENT.equals(subType))
View Full Code Here

      }
      for (int k = 1; k <= reader.getNumberOfPages(); ++k) {
        PdfArray annots = reader.getPageN(k).getAsArray(PdfName.ANNOTS);
        if (annots == null)
          continue;
        for (Iterator<PdfObject> i = annots.listIterator(); i.hasNext();) {
          PdfDictionary annot = (PdfDictionary) PdfReader
              .getPdfObject(i.next());
          PdfName subType = annot.getAsName(PdfName.SUBTYPE);
          if (!PdfName.FILEATTACHMENT.equals(subType))
            continue;
View Full Code Here

     */
    private static class ShowTextArray implements ContentOperator{
        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList operands) {
            PdfArray array = (PdfArray)operands.get(0);
            float tj = 0;
            for (Iterator i = array.listIterator(); i.hasNext(); ) {
              Object entryObj = i.next();
                if (entryObj instanceof PdfString){
                    processor.displayPdfString((PdfString)entryObj, tj);
                    tj = 0;
                } else {
View Full Code Here

      if (leaf instanceof PdfPagesTreeNode)
        expandNode(leaf);
      return;
    case PdfObject.ARRAY:
      PdfArray array = (PdfArray)object;
      for (Iterator it = array.listIterator(); it.hasNext(); ) {
        leaf = PdfObjectTreeNode.getInstance((PdfObject)it.next());
        addNodes(node, leaf);
        expandNode(leaf);
      }
      return;
View Full Code Here

            case PdfObject.ARRAY:
              // Stitch together all content before calling processContent(), because
              // processContent() resets state.
              final ByteArrayOutputStream allBytes = new ByteArrayOutputStream();
              final PdfArray contentArray = (PdfArray) contentObject;
              final ListIterator iter = contentArray.listIterator();
              while (iter.hasNext())
              {
                final PdfObject element = (PdfObject) iter.next();
                allBytes.write(getContentBytesFromContentObject(element));
              }
View Full Code Here

     */
    private static class ShowTextArray implements ContentOperator{
        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList operands) {
            PdfArray array = (PdfArray)operands.get(0);
            float tj = 0;
            for (Iterator i = array.listIterator(); i.hasNext(); ) {
              Object entryObj = i.next();
                if (entryObj instanceof PdfString){
                    processor.displayPdfString((PdfString)entryObj);
                    tj = 0;
                } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.