Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfString


    PdfObject o = get(fieldname);
    if (o == null)
      throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.must.set.a.value.before.adding.a.prefix"));
    PdfDictionary dict = new PdfDictionary(PdfName.COLLECTIONSUBITEM);
    dict.put(PdfName.D, o);
    dict.put(PdfName.P, new PdfString(prefix, PdfObject.TEXT_UNICODE));
    put(fieldname, dict);
  }
View Full Code Here


   * @param name    the field name
   * @param type    the field type
   */
  public PdfCollectionField(String name, int type) {
    super(PdfName.COLLECTIONFIELD);
    put(PdfName.N, new PdfString(name, PdfObject.TEXT_UNICODE));
    this.fieldType = type;
    switch(type) {
    default:
      put(PdfName.SUBTYPE, PdfName.S);
      break;
View Full Code Here

   * @param v  value  the value that has to be changed into a PdfObject (PdfString, PdfDate or PdfNumber
   */
  public PdfObject getValue(String v) {
    switch(fieldType) {
    case TEXT:
      return new PdfString(v, PdfObject.TEXT_UNICODE);
    case DATE:
      return new PdfDate(PdfDate.decode(v));
    case NUMBER:
      return new PdfNumber(v);
    }
View Full Code Here

    Enumeration<String> e =
        (Enumeration<String>) headMetaTags.propertyNames();

    while (e.hasMoreElements()) {
      String key = e.nextElement();
      PdfString val =
          new PdfString(headMetaTags.getProperty(key),
              PdfObject.TEXT_UNICODE);
      iTextRenderer.getWriter().setViewerPreferences(
          PdfWriter.DisplayDocTitle);
      if (key == null ? "title" == null : key.equals("title")) {
        iTextRenderer.getWriter().getInfo().put(PdfName.TITLE, val);
View Full Code Here

                    }
                    PdfArray indexed = new PdfArray();
                    indexed.add(PdfName.INDEXED);
                    indexed.add(PdfName.DEVICERGB);
                    indexed.add(new PdfNumber(gColor - 1));
                    indexed.add(new PdfString(palette));
                    PdfDictionary additional = new PdfDictionary();
                    additional.put(PdfName.COLORSPACE, indexed);
                    img.setAdditional(additional);
                }
                img.setOriginalType(Image.ORIGINAL_TIFF);
View Full Code Here

                    colorspace.add(new PdfNumber(len / 3 - 1));
                    ByteBuffer colortable = new ByteBuffer();
                    while ((len--) > 0) {
                        colortable.append_i(is.read());
                    }
                    colorspace.add(new PdfString(colorTable = colortable.toByteArray()));
                    additional.put(PdfName.COLORSPACE, colorspace);
                }
                else {
                    Utilities.skip(is, len);
                }
View Full Code Here

            PdfArray colorspace = new PdfArray();
            colorspace.add(PdfName.INDEXED);
            colorspace.add(PdfName.DEVICERGB);
            int len = m_curr_table.length;
            colorspace.add(new PdfNumber(len / 3 - 1));
            colorspace.add(new PdfString(m_curr_table));
            PdfDictionary ad = new PdfDictionary();
            ad.put(PdfName.COLORSPACE, colorspace);
            img.setAdditional(ad);
            if (transparency) {
                img.setTransparency(new int[]{transIndex, transIndex});
View Full Code Here

        colorspace.add(PdfName.INDEXED);
        colorspace.add(PdfName.DEVICERGB);
        byte np[] = getPalette(paletteEntries);
        int len = np.length;
        colorspace.add(new PdfNumber(len / 3 - 1));
        colorspace.add(new PdfString(np));
        PdfDictionary ad = new PdfDictionary();
        ad.put(PdfName.COLORSPACE, colorspace);
        img.setAdditional(ad);
        return img;
    }
View Full Code Here

        }
       
        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList operands) {
            PdfNumber aw = (PdfNumber)operands.get(0);
            PdfNumber ac = (PdfNumber)operands.get(1);
            PdfString string = (PdfString)operands.get(2);
           
            ArrayList twOperands = new ArrayList(1);
            twOperands.add(0, aw);
            setTextWordSpacing.invoke(processor, null, twOperands);
View Full Code Here

    /**
     * A content operator implementation (Tj).
     */
    private static class ShowText implements ContentOperator{
        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList operands) {
            PdfString string = (PdfString)operands.get(0);
           
            processor.displayPdfString(string);
        }
View Full Code Here

TOP

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

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.