|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (Perl) Sign PDF in the Cloud using Azure Key VaultSee more Signing in the Cloud ExamplesDemonstrates how to sign a PDF using Azure Key Vault. The signing of the hash happens in the Cloud on Azure Key Vault. Everything else involving the updating the PDF to add the signature happens locally within Chilkat.Note: This example requires Chilkat v9.5.0.96 or greater. 
 use chilkat(); # This example requires the Chilkat API to have been previously unlocked. # See Global Unlock Sample for sample code. $pdf = chilkat::CkPdf->new(); # Load a PDF to be signed. $success = $pdf->LoadFile("qa_data/pdf/helloWorld.pdf"); if ($success == 0) { print $pdf->lastErrorText() . "\r\n"; exit; } # Options for signing are specified in JSON. $json = chilkat::CkJsonObject->new(); # Optionally create an LTV-enabled signature $json->UpdateBool("ltvOcsp",1); # Define the appearance of the signature. $json->UpdateInt("page",1); $json->UpdateString("appearance.y","top"); $json->UpdateString("appearance.x","left"); $json->UpdateString("appearance.fontScale","10.0"); $json->UpdateString("appearance.text[0]","Digitally signed by: cert_cn"); $json->UpdateString("appearance.text[1]","current_dt"); $json->UpdateString("appearance.text[2]","This is an LTV-enabled signature."); # Load the certificate used for signing. The certificate's private key is stored in # the Azure Key Vault. # However, we still need the certificate locally (without private key). $cert = chilkat::CkCert->new(); $success = $cert->LoadFromFile("qa_data/certs/myCert.cer"); if ($success == 0) { print $cert->lastErrorText() . "\r\n"; exit; } # Here's a screenshot of our certificate with private key on Azure Key Vault: | ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.