I have same problem..
When i make signature certified whith the same pdf there is no "3 miscellaneous changes"
If you will find a solution post it here please
Alex

On 03/08/06, Herman Sushkevich <[EMAIL PROTECTED]> wrote:
>Hi,
>what's mean miscellaneous changes in pdf files?
>I don't need to show any logo in signature. But I get "3 miscellaneous
>changes" in "modifications list".
>What is it?

Pls hlp....

I don't need to show any logo in signature. But I get "3 miscellaneous
changes" in "modifications list" in Acrobat Reader.

My code of PDFSigner here:

using System;
using System.IO;
using System.Collections;
using org.bouncycastle.pkcs;
using org.bouncycastle.crypto;
using org.bouncycastle.x509;
using iTextSharp.text;
using iTextSharp.text.pdf;

namespace PDFSignerNS
{
/// <summary>
/// Signs PDF documents with a certificate (PFX)
/// </summary>
public class PDFSigner
{
        /// <summary>
        /// Stores pfx certificate
        /// </summary>
        protected PKCS12Store pk12 = null;
  protected X509Certificate[] chain;
  protected AsymmetricKeyParameter akp;
  public    string Reason = "";
  public    string Location = "";

        /// <summary>
        /// Loads pfx certificate from file into certificate collection
        /// </summary>
        /// <param name="pfxFileName">pfx file</param>
        /// <param name="pfxPassword">password</param>
        public void LoadPFXCert(string pfxFileName, string pfxPassword)
        {
            pk12 = new PKCS12Store(
                new FileStream(
                pfxFileName,
                FileMode.Open,
                FileAccess.Read),
                pfxPassword.ToCharArray());
   IEnumerator i = pk12.aliases();
   string alias = "";
   while (i.MoveNext())
   {
    alias = ((string)i.Current);
    if (pk12.isKeyEntry(alias))
     break;
   }
   akp = pk12.getKey(alias).getKey();
   X509CertificateEntry[] ce = pk12.getCertificateChain (alias);
   chain = new X509Certificate[ce.Length];
   for (int k = 0; k < ce.Length; ++k)
    chain[k] = ce[k].getCertificate();
  }

        /// <summary>
        /// Signs pdf document
        /// </summary>
        /// <param name="plainPdfStream"></param>
        /// <param name="signPdfStream"></param>
        public void SignPFD(Stream plainPdfStream, Stream signPdfStream)
        {
            PdfReader  reader  =  new PdfReader(plainPdfStream);
            PdfStamper stamper = PdfStamper.CreateSignature(reader,
signPdfStream, '\0');

            SignPFDInternal(stamper, pk12 as PKCS12Store);
            stamper.Close();
        }


        protected void SignPFDInternal(PdfStamper st, PKCS12Store pk12)
        {

            PdfSignatureAppearance sap = st.SignatureAppearance;
             sap.SetCrypto(akp, chain, null,
PdfSignatureAppearance.WINCER_SIGNED);
            sap.Reason = Reason;
            sap.Location = Location;
            sap.SetVisibleSignature(new Rectangle(100, 100, 200, 200), 1,
null);
        }
}
}



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to