Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PdfString


   * you need to specify the name of the page (or use setFileAttachmentPage to specify the page number).
   * Once you have specified the page, you still need to specify the attachment using another method.
   * @param name  the named destination referring to the page with the file attachment.
   */
  public void setFileAttachmentPagename(String name) {
    put(PdfName.P, new PdfString(name, null));
  }
View Full Code Here


   * you need to specify the page with setFileAttachmentPage or setFileAttachmentPageName,
   * and then specify the name of the attachment added to this page (or use setFileAttachmentIndex).
   * @param name    the name of the attachment
   */
  public void setFileAttachmentName(String name) {
    put(PdfName.A, new PdfString(name, PdfObject.TEXT_UNICODE));
  }
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

   * Identifies the document that will be initially presented
   * in the user interface.
   * @param description  the description that was used when attaching the file to the document
   */
  public void setInitialDocument(String description) {
    put(PdfName.D, new PdfString(description, null));
  }
View Full Code Here

        byte[] paddedSig = new byte[estimatedSize];
        System.arraycopy(encodedSig, 0, paddedSig, 0, encodedSig.length);

        PdfDictionary dic2 = new PdfDictionary();
        dic2.put(PdfName.CONTENTS, new PdfString(paddedSig).setHexWriting(true));
        sap.close(dic2);
    }
View Full Code Here

        byte[] paddedSig = new byte[estimatedSize];
        System.arraycopy(encodedSig, 0, paddedSig, 0, encodedSig.length);

        PdfDictionary dic2 = new PdfDictionary();
        dic2.put(PdfName.CONTENTS, new PdfString(paddedSig).setHexWriting(true));
        sap.close(dic2);
    }
View Full Code Here

        List<String> list = fields.getSignatureNames();
        if ((list != null) && (!list.isEmpty())) {
          for (String str : list) {
            PdfPKCS7 pk = fields.verifySignature(str);

            PdfString string = fields.getSignatureDictionary(str).getAsString(PdfName.CONTENTS);
            byte[] content = string.getBytes();

            X509Certificate certificate = pk.getSigningCertificate();

            byte[] encoded = content;
            TimeStamp timeStamp = null;
View Full Code Here

   * @return  true if the dictionary should be removed
   */
  private boolean isToBeRemoved(PdfDictionary ocg, Set<String> names) {
    if (ocg == null)
      return false;
    PdfString n = ocg.getAsString(PdfName.NAME);
    if (n == null)
      return false;
    return names.contains(n.toString());
  }
View Full Code Here

      properties = resources.getAsDict(PdfName.PROPERTIES);
      xobj = new HashSet<PdfName>();
      PdfDictionary xobjects = resources.getAsDict(PdfName.XOBJECT);
      PRStream xobject;
      PdfDictionary oc;
      PdfString ocname;
    if (xobjects != null) {
      // remove XObject (form or image) that belong to an OCG that needs to be removed
      for (PdfName name : xobjects.getKeys()) {
        xobject = (PRStream)xobjects.getAsStream(name);
        oc = xobject.getAsDict(PdfName.OC);
        if (oc != null) {
          ocname = oc.getAsString(PdfName.NAME);
          if (ocname != null && ocgs.contains(ocname.toString())) {
            xobj.add(name);
          }
        }
      }
      for (PdfName name : xobj) {
View Full Code Here

TOP

Related Classes of com.itextpdf.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.