Content

Scroll back

Simple signing

This tool provides an easy-to-integrate JavaScript library with which any text or alternatively PDF documents can be signed with a mobile phone signature or alternatively Citizen Card.

The JavaScript library or alternatively the PDF signature tools are offered centrally via the Bürgerkarte.at page and can be integrated in any websites that way in just a few steps.


Here is an example that uses simple signing.



Technical guide for using the JavaScript library:

Including the JavaScript library:

<script type="text/javascript"src="https://www.buergerkarte.at/einfach-signieren/pdfas.js"></script>

This library creates a JavaScript object "pdfAs". This object has two functions: signText and signPdf.

signText is used to sign simple text. In the process, a PDF document is created automatically, which has the text as its content:
<script type="text/javascript">
  var op = {
    content: "The text to be signed", // This attribute is optional. If it is omitted, then a text input box is shown to the user. This is the content that is to be signed.
    connector: "bku", // This attribute is optional. If it is omitted, then the user will be asked. Possible values are: "bku" -> Signature with the local CCE, "onlinebku" -> Signature with the online CCE, "mobilebku" -> Signature with the mobile phone signature
    uiId: "exampleDiv" // This attribute is optional. If it is omitted, then an overlay is created. This is the id of a div element in which the iframe is to be inserted for user interaction.
   };
  pdfAs.signText(op, function(error, cause) {
    // error "error" occured due to "cause"
  }, function(pdfurl) {
    // signed document can be found at "pdfurl"
  });
</script>

signPdf is used to sign a PDF document:
<script type="text/javascript">
  var op = {
    content: "http://www.example.com/test.pdf", // This attribute is optional. If it is omitted, then the user will be shown a file upload. This is a URL to the PDF document that is to be signed.
    connector: "bku", // This attribute is optional. If it is omitted, then the user will be asked. Possible values are: "bku" -> Signature with the local CCE, "onlinebku" -> Signature with the online CCE, "mobilebku" -> Signature with the mobile phone signature
    uiId: "exampleDiv" // This attribute is optional. If it is omitted, then an overlay is created. This is the id of a div element in which the iframe is to be inserted for user interaction.
  };
  pdfAs.signPdf(op, function(error, cause) {
    // error "error" occured due to "cause"
   }, function(pdfurl) {
     // signed document can be found at "pdfurl"
  });
</script>

Scroll forward