ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / PDF functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Gets the signature of a PDF document as a buffer. The corresponding certificate can be extracted using CertificateExtract.
Example
MyPDF is pdfDocument = PDFOpen("test.pdf")
 
// Number of signatures in the PDF file
nNbSignatures is int = PDFNbSignatures(MyPDF)
 
// Get signature details
FOR i = 1 _TO_ nNbSignatures
// Get signature
bufSignature is Buffer = PDFGetSignature(MyPDF, i)
 
// Get signature date
dtSignatureDate is DateTime = PDFGetSignatureDate(MyPDF, i)
 
// Get certificate
Certif is Certificate = CertificateExtract(bufSignature)
END
Syntax
<Result> = PDFGetSignature(<PDF document> , <Index>)
<Result>: Buffer
Document signature.
<PDF document>: Control name or pdfDocument variable
PDF document to be analyzed. This document can correspond to:
<Index>: Integer
Index of the signature in the document (the number of signatures is returned by PDFNbSignatures).
Component: wd300wdpdf.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Exemplo de uso de assinatura digital em banco de dados by Alexandre


MyExtractedCertificate is Certificate

HReset(CERTIFICADO)

IF HReadSeek(CERTIFICADO,AGRONOMO_ID,EDT_AGRONOMO_ID,hIdentical) = True THEN

EDT_CertificadoEncodado = CERTIFICADO.CERTIFICADO_ENCODE

bufSignature is Buffer = Decode(CERTIFICADO.CERTIFICADO_ENCODE,encodeBASE64)

MyExtractedCertificate = CertificateExtract(bufSignature,certificateFromBuffer)

IF MyExtractedCertificate = Null THEN
RESULT False
END

IF MyExtractedCertificate..EndValidityDate<DateSys() THEN
Info("Certificado Vencido")
RESULT False
END


bt_assinar..State = Active

MySignature is pdfSignature
MySignature..Certificate = MyExtractedCertificate
MySignature..Caption = " por:" + MyExtractedCertificate..Name + " em " + DateToString(DateSys())
MySignature..Height = 264 //xAlturaTexto
MySignature..Width = 167 //xLarguraTexto
MySignature..X = 1 //xPosicaoTextoX
MySignature..Y = 15 //xPosicaoTextoY
MySignature..VerticalAlignment=iBottom
MySignature..Hor
Boller
03 Feb. 2023

Last update: 04/18/2024

Send a report | Local help