title: Can't add ltv to PDF document. Error
body: <p>I'm sign document, using Itext. I have that method:</p>
  
  <pre><code>public static void sign(String src, String dest, Certificate[] chain,PrivateKey pk, String digestAlgorithm, String provider,CryptoStandard subfilter, TSAClient tsa )
  {
  
          // Creating the reader and the stamper
          PdfReader reader = new PdfReader(src);
          FileOutputStream os = new FileOutputStream(dest);
          PdfStamper stamper = PdfStamper.createSignature(reader, os, '\0');
  
          // Creating the appearance
          PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
          appearance.setVisibleSignature(new Rectangle(10, 20, 100, 200), 1, "sig");
  
          // Creating the signature
          ExternalDigest digest = new BouncyCastleDigest();
          ExternalSignature signature = new PrivateKeySignature(pk,
          digestAlgorithm, provider);
          MakeSignature.signDetached(appearance, digest, signature, chain, null,null, tsa, 0, subfilter);
  
  
          // ALREADY SIGNED. ADD LTB NOW.
          CrlClient crlClient = new CrlClientOnline("http://crl.mycrl.com/mycrl.crl");
          OcspClient  ocspClient=new OcspClientBouncyCastle();              
      addLtv(DEST, DEST2, ocspClient, crlClient, tsa);
  
      }
  </code></pre>
  
  <p>and I sign:</p>
  
  <pre><code>sign(SRC, String.format(DEST, 1), chain, pk, DigestAlgorithms.SHA256, provider.getName(), CryptoStandard.CMS, "For Testing", " location", tsa);
  </code></pre>
  
  <p>everything <strong>works</strong>. PDF is <strong>signed well</strong>.</p>
  
  <p>but then, I can't add  ltv. I use code from itext documentation:</p>
  
  <pre><code>public static void addLtv(String src, String dest, OcspClient ocsp, CrlClient crl,
          TSAClient tsa) throws IOException, DocumentException,
          GeneralSecurityException {
  
      PdfReader r = new PdfReader(src);
      FileOutputStream fos = new FileOutputStream(dest);
  
      PdfStamper stp = PdfStamper.createSignature(r, fos, '\0', null, true);
      LtvVerification v = stp.getLtvVerification();
  
      AcroFields fields = stp.getAcroFields();
  
      List&lt;String&gt; names = fields.getSignatureNames();
      String sigName = names.get(names.size() - 1);
  
      PdfPKCS7 pkcs7 = fields.verifySignature(sigName);
  
      if (pkcs7.isTsp()) {
              v.addVerification(sigName, ocsp, crl,
                  LtvVerification.CertificateOption.SIGNING_CERTIFICATE,
                  LtvVerification.Level.OCSP_CRL,
                  LtvVerification.CertificateInclusion.NO);
      }
  
      else {
          for (String name : names) {
              v.addVerification(name, ocsp, crl,
                      LtvVerification.CertificateOption.WHOLE_CHAIN,
                      LtvVerification.Level.OCSP_CRL,
                      LtvVerification.CertificateInclusion.NO);
          }
      }
      PdfSignatureAppearance sap = stp.getSignatureAppearance();
      LtvTimestamp.timestamp(sap, tsa, null);
  }
  </code></pre>
  
  <p><strong>EDITED:
  everything works, but at line
          LtvTimestamp.timestamp(sap, tsa, null);
  I have that error:
      Exception in thread "main" java.io.IOException: Not enough space</strong></p>
  
  <p>that's my pdf:
  <a href="https://www.dropbox.com/s/o05rw6ubiuslm4j/DOC_SIGNED.pdf" rel="nofollow">https://www.dropbox.com/s/o05rw6ubiuslm4j/DOC_SIGNED.pdf</a></p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Not enough space
  at com.itextpdf.text.pdf.security.LtvTimestamp.timestamp(LtvTimestamp.java:103)
  at ge.digital.signature.DocumentSigner.DigitalSignature.addLtv(MySignature.java:132)
  at ge.digital.signature.DocumentSigner.DigitalSignature.main(MySignature.java:163)
  </code></pre>