Getting started
What is Web Trust?The company behind Web Trust?First stepsMaking the first API CallCreating a signatureStatus Workflow DiagramSignature Field Selection CriteriaAnatomy of a signatureTags, what? and why?TimeoutsVerifying the Forensic Evidence XMLCallbacks - WebhooksEmbedding in an iFrameTrusted and Trustless Timestamping
Recipes
Signing PDF with AESSigning a PDF with SESPDF with formsMulti-signer workflowUsing PAdESOTPs in detailCustomisationsClick-to-sign on HTMLSigning an API callTimestamping a fileConverting your PDF in Base64Conditional signature pointsPreprocessing the PDFRetrieving the XML and PDFs
Workflows
Document Advanced APIDocument Simple Forensic APIDocument Simple APIWebpage Forensic APIData Forensic APITimestamp API
Changelog
API docs
    Home
  1. Recipes
  2. Converting your PDF in Base64

Converting your PDF in Base64

While using the WebTrust APIs, one thing you will encounter often is the conversion of a PDF to base64.

Here are two examples of how to convert a document.pdf file into a document.b64 base64-encoded file.

Example
certutil -encode -f .\document.pdf .\tmp.b64 && findstr /v /c:- .\tmp.txt > document.b64

Otherwise, you can use an online tool like: https://base64.guru/converter/encode/pdf.

Was this helpful?