Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PdfString


        return;
      }
      PdfDictionary ocdict = properties.getAsDict(ocref);
      if (ocdict == null)
        return;
      PdfString ocname = ocdict.getAsString(PdfName.NAME);
      if (ocname == null)
        return;
      if (ocgs.contains(ocname.toString()))
        mc_balance++;
    }
View Full Code Here


        }

        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList<PdfObject> operands) {
            PdfNumber aw = (PdfNumber)operands.get(0);
            PdfNumber ac = (PdfNumber)operands.get(1);
            PdfString string = (PdfString)operands.get(2);

            ArrayList<PdfObject> twOperands = new ArrayList<PdfObject>(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<PdfObject> operands) {
            PdfString string = (PdfString)operands.get(0);

            processor.displayPdfString(string);
        }
View Full Code Here

      byte[] output = new byte[(contentSize - 2) / 2];

      System.arraycopy(encodedPkcs7, 0, output, 0, encodedPkcs7.length);

      PdfDictionary newDictionary = new PdfDictionary();
      PdfString content = new PdfString(output);
      content.setHexWriting(true);
      newDictionary.put(PdfName.CONTENTS, content);
      appearance.close(newDictionary);

      return outputStream.toByteArray();
    } catch (Exception e) {
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();
            Certificate[] chain = pk.getSignCertificateChain();

            byte[] encoded = content;
View Full Code Here

      byte[] output = new byte[(contentSize - 2) / 2];

      System.arraycopy(encodedPkcs7, 0, output, 0, encodedPkcs7.length);

      PdfDictionary newDictionary = new PdfDictionary();
      PdfString content = new PdfString(output);
      content.setHexWriting(true);
      newDictionary.put(PdfName.CONTENTS, content);
      appearance.close(newDictionary);

      return outputStream.toByteArray();
    } catch (Exception e) {
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();
            Certificate[] chain = pk.getSignCertificateChain();

            byte[] encoded = content;
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

    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

   * If this dictionary refers to a child that is a document level attachment,
   * you need to specify the name that was used to attach the document.
   * @param  target  the name in the EmbeddedFiles name tree
   */
  public void setEmbeddedFileName(String target) {
    put(PdfName.N, new PdfString(target, null));
  }
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.