Hola
tengo un problema tras firmar pdf’s
creo un pdf desde una plantilla de word con mergemail y todo ok
PdfSaveOptions opts = new PdfSaveOptions();
opts.SaveFormat = Aspose.Words.SaveFormat.Pdf;
opts.Compliance = PdfCompliance.PdfA1a;
doc.Save(ruta,opts);
lo guardo como pdf/a-1a y todo ok
pero tras firmarlo con este metodo:
using (var pdfFileSignature = new Aspose.Pdf.Facades.PdfFileSignature())
{
pdfFileSignature.BindPdf(ruta);
var cert = new Aspose.Pdf.Forms.PKCS1(certPath, claveCertificado)
{
Reason = "Firma Digital",
ContactInfo = "mail@Address.com",
Location = "Aqui",
Date = DateTime.Now,
CustomAppearance = new Aspose.Pdf.Forms.SignatureCustomAppearance
{
DigitalSignedLabel = "Firmado por ",
DateSignedAtLabel = "Fecha ",
FontSize = 6,
FontFamilyName = "Arial",
DateTimeFormat = "yyyy-MM-dd HH:mm:ss",
ShowContactInfo = false,
ShowLocation = false,
ShowReason = false,
Culture = System.Globalization.CultureInfo.InvariantCulture
}
};
// Obtener dimensiones de la última página
var tempDoc = new Aspose.Pdf.Document(ruta);
int paginaFinal = tempDoc.Pages.Count;
var rectPagina = tempDoc.Pages[paginaFinal].GetPageRect(true);
float ancho = (float)rectPagina.Width * 0.40f;
float alto = 30;
float x = 20;
float y = 20;
System.Drawing.Rectangle rect = new System.Drawing.Rectangle((int)x, (int)y, (int)ancho, (int)alto);
pdfFileSignature.Sign(paginaFinal, true, rect, cert);
pdfFileSignature.Save(rutaFirmado);
}
me da error en la validacion
docF.Validate(rutaXML, Aspose.Pdf.PdfFormat.PDF_A_1A);
xml de la validacion:
1.0 Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved. 29/07/2025 17:13:36 Document information entry 'Creator' not synchronized with metadata property 'xmp:CreatorTool' Document information entry 'Producer' not synchronized with metadata property 'pdf:Producer'quedo a esperas de sus comentarios
Saludos