How can we translate the text of a signature

When we add a signature to a PDF document we can define the reason, location and date fields of the signature, but in the document it always appear some fixed text before the text we put in this fields, for example:


Digitaly signed by
Date:

Is there a way to translate or hide these texts?.

In the file attached there is an image with an example of this behavior.

Thanks.

Hi Joan Maria,


Thanks for contacting support.

As per my understanding, you need to hide or translate the informative text which appears with digital signature rather than the contents of complete signature. Pleas acknowledge, so that we can reply accordingly.

Hi,


Exactly, what we need is to translate or hide the texts that are added automatically by aspose.

Digitally signed by: CN=…
Date: 2017.06.14 18:24
Reason: …
Location:…

We need this to be like this in Spanish:
Firmado por: …
Fecha: 2017.06.14 18:24
Razón: …
Localización: …

Or whatever text is necessary in any given language.

If it’s not possible to translate these texts, hiding them is also an option, we would add the corresponding text to the content.


doliveras:
Hi,

Exactly, what we need is to translate or hide the texts that are added automatically by aspose.

Digitally signed by: CN=…
Date: 2017.06.14 18:24
Reason: …
Location:…

We need this to be like this in Spanish:
Firmado por: …
Fecha: 2017.06.14 18:24
Razón: …
Localización: …

Or whatever text is necessary in any given language.

If it’s not possible to translate these texts, hiding them is also an option, we would add the corresponding text to the content.
Hi Joan Maria,

Thanks for sharing the details.

I am afraid the above stated feature is already logged as PDFNET-42001 in our issue tracking system. We will further look into the details of this requirement and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Hello José María.

I think I was the first to detect the problem that has, so they opened the PDFNET-42001 incidence, for now I solved the problem by showing how to sign an image that I compose according to the need.

I put part of a test code I did at the time, a pity not having read your post before.

A greeting.

// CODE…

                        Aspose.Pdf.Document document = new Aspose.Pdf.Document(openFileDialog1.FileName);
                        PdfFileSignature signature = new PdfFileSignature(document);
                        // Preparamos la firma PKCS7
                        string clave = "SGRSoft";
                        byte[] pkcs10 = objCert.Export(X509ContentType.Pfx, clave);                            
                        
                        MemoryStream memStream = new MemoryStream();
                        BinaryWriter binWriter = new BinaryWriter(memStream);
                        binWriter.Write(pkcs10);
                        memStream.Position = 0;

                        PKCS7 pkcs = new PKCS7(memStream, clave);
                        
                        pkcs.Reason = "Firmar documento";
                        pkcs.ContactInfo = "Información Contacto";
                        pkcs.Location = "Ayamonte (Huelva)";
                        pkcs.Date = DateTime.Now;
                        pkcs.ShowProperties = false;

                        // Componemos la apariencia específica que queremos para la firma a partir de una imagen base, imagen en blanco o imagen con el logo corporativo como fondo, etc.
                        System.Drawing.Image bitmap = (System.Drawing.Image)Bitmap.FromFile("C:\\Pruebas\\Aspose.jpg"); // Cogemos la base de la firma
                        Graphics oGrafico = Graphics.FromImage(bitmap);
                        PointF posicion = new PointF(10, 10); // Se crea un PointF para posicionar el texto en la imagen de base.
                        Font fuente = new Font("Tahoma", 14, System.Drawing.FontStyle.Bold); // Fuente
                        // Preparemos el texto a escribir
                        string textoFirma = "";
                        string nombreFirmante = objCert.SubjectName.Name.ToString().Substring(objCert.SubjectName.Name.ToString().IndexOf("=") + 1, objCert.SubjectName.Name.ToString().IndexOf(",") - 3);

                        textoFirma = nombreFirmante + "\nRazón: " + pkcs.Reason + "\nLocalización: " + pkcs.Location + "\nFecha: " + pkcs.Date;
                        // Se escribe la cadena de texto en la fotografía
                        oGrafico.DrawString(textoFirma, fuente, Brushes.DarkBlue, posicion);
                        bitmap.Save("C:\\Pruebas\\AsposeFirma.jpg");

                        
                        System.Drawing.Rectangle rect = new System.Drawing.Rectangle(50, 50, bitmap.Width, bitmap.Height);
                        
                        //Buscamos final del documento PDF para insertar la firma digital --> (signature.Document.Pages.Count)
                        signature.SignatureAppearance = "C:\\Pruebas\\AsposeFirma.jpg";
                        signature.Sign(signature.Document.Pages.Count, true, rect, pkcs);
     
                        signature.Save(saveFileDialog1.FileName);

                        objStore.Close();
                        
                        MessageBox.Show("Documento con firma digital creado.");
                        
                        // Abrimos documento
                        System.Diagnostics.Process.Start(saveFileDialog1.FileName);

@MiguelRE,

Thank you for sharing a workaround. We will also notify you once the linked ticket ID PDFNET-42001 is fixed.

The issues you have found earlier (filed as PDFNET-42001) have been fixed in Aspose.PDF for .NET 19.4.