3.0.7.0 2026-05-20 Se elimina PdfSignatureTools, Nuevo metodo ObtenerPropiedadDePdf
This commit is contained in:
@@ -1,10 +1,48 @@
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports TSpdfUtils
|
||||
|
||||
Public Class Form1
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
FirmaPDFPFX("prueba", "prueba", "prueba", "c:\tmp\pruebafirmada.pdf", True, True)
|
||||
'FirmaPDFPFX("prueba", "prueba", "prueba", "c:\tmp\pruebafirmada.pdf", True, True)
|
||||
|
||||
'Dim ms = New MemoryStream(System.IO.File.ReadAllBytes("c:\tmp\pruebasolicitudcertificado.pdf"))
|
||||
'TSpdfUtils.PdfSignatureTools.MostrarRevisiones(ms)
|
||||
|
||||
Dim resultado As VerificadorPDFFirmado.Resultado
|
||||
|
||||
Using pdfOriginal As FileStream =
|
||||
File.OpenRead("C:\tmp\o1.pdf")
|
||||
|
||||
Using pdfFirmado As FileStream =
|
||||
File.OpenRead("C:\tmp\f1.pdf")
|
||||
|
||||
resultado =
|
||||
VerificadorPDFFirmado.Verificar(
|
||||
PdfOriginal:=pdfOriginal,
|
||||
PdfFirmado:=pdfFirmado,
|
||||
NombreCampoFirma1:="FirmaCliente",
|
||||
NombreCampoFirma2:="",
|
||||
ComprobarSegundaFirma:=False
|
||||
)
|
||||
|
||||
End Using
|
||||
End Using
|
||||
|
||||
If resultado.DocumentoValido Then
|
||||
Console.WriteLine("PDF CORRECTO")
|
||||
Else
|
||||
Console.WriteLine(resultado.Mensaje)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub FirmaPDFPFX(Razon As String, Contacto As String, Localizacion As String, FicheroPdfDef As String, EliminaFirmasAnteriores As Boolean, Optional EliminaFicheroDestino As Boolean = False)
|
||||
|
||||
Reference in New Issue
Block a user