Skip to content

Augmented PDF (embedded auras)

1. Introduction

This document describes the format of Augmented PDF files, which are standards-compliant PDF files containing additional data allowing the display of Argo assets as an overlay when opened with the ARGOflow reader.

Thus these files can be opened in any PDF reader and the underlying document will be displayed. They can also be opened in the ARGOflow reader, and an extra interactive layer will become visible.

To allow standards compliance and integration with existing PDF production chains, the additional data is stored using standard PDF object types such as streams, dictionaries etc...

The assets follow the aura format as described in [3]

2. Implementation

version 1.0.1

All ARGO-specific data is in a PDF dictionary with name ARGO in the standard PDF Catalog dictionary, with the following properties:

name type value
Type PDF name PDFZ
Format PDF string "1.0.1"

Inside this dictionary is an PDF array with name Auras: it is an array of references to PDF streams, one for each page of the PDF document, in order. For pages without assets, the reference can be null.

So for each page with assets, there is a PDF stream the with the following properties:

name type value
Type PDF name ARGO_Auras
Subtype PDF name JSON

The content of each stream is a string representing a JSON array of assets in the Argo aura format [3]. An example is provided in appendix [A]

Example of Augmented PDF structure as viewed in RUPS:

rups_view.png

3. Tools

  • RUPS (PDF visualization tool) from the iText project: https://github.com/itext/i7j-rups
  • PDF-LIB (javascript PDF edition library): https://pdf-lib.js.org/

4. References

  1. the official PDF format reference: https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf
  2. a shorter complete introduction: https://resources.infosecinstitute.com/topic/pdf-file-format-basic-structure/
  3. the ARGO aura format reference

5. Appendix A: Example of array of assets for one page:

Base64 strings have been shortened for readability.

[
  {
    "id": "t640585f23fa5ce00112b4743",
    "name": "Image #1",
    "rect_fixed_ratio": true,
    "active": true,
    "hidden": false,
    "immutable": false,
    "coordinates": {
      "x": 12.396323325635116,
      "y": 89.83430000000001,
      "z": 0
    },
    "dimensions": {
      "width": 19.953071593533483,
      "height": 14.6566
    },
    "show_in_responsive_views": {
      "desktop": true,
      "mobile": true
    },
    "order": 1,
    "actions": [],
    "generators": [],
    "background": "icon",
    "api": "2.0.1",
    "resources": [
      {
        "name": "icon",
        "filename": "640585f23fa5ce00112b4743_9e595c06b0c9557fc41df4590c92c3c8.png",
        "mimetype": "image/png",
        "base64": "iVBORw0KGgoA[...]"
      }
    ]
  },
  {
    "id": "t640585f23fa5ce00112b4742",
    "name": "Audio #1 - son court",
    "rect_fixed_ratio": true,
    "active": true,
    "hidden": false,
    "immutable": false,
    "coordinates": {
      "x": 39.084397228637414,
      "y": 89.15549999999999,
      "z": 0
    },
    "dimensions": {
      "width": 19.44790762124711,
      "height": 15.037400000000002
    },
    "show_in_responsive_views": {
      "desktop": true,
      "mobile": true
    },
    "order": 3,
    "actions": [
      {
        "type": "audio",
        "data": {
          "type": "value",
          "value": "content"
        }
      }
    ],
    "generators": [],
    "background": "icon",
    "api": "2.0.1",
    "resources": [
      {
        "name": "icon",
        "filename": "640585f23fa5ce00112b4742_da916b5f19cb2d5af45e480cc1c59174.png",
        "mimetype": "image/png",
        "base64": "iVBORw0KGgoA[...]"
      },
      {
        "name": "content",
        "filename": "640585f23fa5ce00112b4742_c18d34bcf83a95794ce1e24dbb2d51a0.mp3",
        "mimetype": "audio/mp3",
        "base64": "//uwxAAAAAAA[...]"
      }
    ]
  },
  {
    "id": "t640586843fa5ce00112b4749",
    "name": "File #1 - simplepdf_a6",
    "rect_fixed_ratio": true,
    "active": true,
    "hidden": false,
    "immutable": false,
    "coordinates": {
      "x": 62.90043418013857,
      "y": 89.149,
      "z": 0
    },
    "dimensions": {
      "width": 19.44790762124711,
      "height": 15.037400000000002
    },
    "show_in_responsive_views": {
      "desktop": true,
      "mobile": true
    },
    "order": 4,
    "actions": [
      {
        "type": "download",
        "data": {
          "type": "value",
          "value": "content"
        }
      }
    ],
    "generators": [],
    "background": "icon",
    "api": "2.0.1",
    "resources": [
      {
        "name": "icon",
        "filename": "640586843fa5ce00112b4749_ffbc37e71bb958737b80c7488cb194fd.jpg",
        "mimetype": "image/jpeg",
        "base64": "/9j/4AAQSkZJ[...]"
      },
      {
        "name": "content",
        "filename": "640586843fa5ce00112b4749_512a0c10d2e0423fbb338be3a0a3a7e0.pdf",
        "mimetype": "application/octet-stream",
        "base64": "JVBERi0xLjYK[...]"
      }
    ]
  },
  {
    "id": "t640586843fa5ce00112b474a",
    "name": "Slider #1",
    "rect_fixed_ratio": true,
    "active": true,
    "hidden": false,
    "immutable": false,
    "coordinates": {
      "x": 15.832498845265597,
      "y": 70.94780000000002,
      "z": 0
    },
    "dimensions": {
      "width": 19.44790762124711,
      "height": 15.0374
    },
    "show_in_responsive_views": {
      "desktop": true,
      "mobile": true
    },
    "order": 5,
    "actions": [
      {
        "type": "html",
        "data": {
          "type": "value",
          "value": "{\"template_name\":\"slider2d\",\"template_parameters\":[{\"index\":0,\"resourceName\":\"slide0\"},{\"index\":1,\"resourceName\":\"slide1\"},{\"index\":2,\"resourceName\":\"slide2\"}],\"resource\":\"content\"}"
        },
        "event": "page_open"
      }
    ],
    "generators": [],
    "background": "icon",
    "api": "2.0.1",
    "resources": [
      {
        "name": "icon",
        "filename": "640586843fa5ce00112b474a_87860369b6ee897b493c8ea66a341491.png",
        "mimetype": "image/png",
        "base64": "iVBORw0KGgoA[...]"
      },
      {
        "name": "content",
        "filename": "webview.html",
        "mimetype": "text/html",
        "base64": "PCFET0NUWVBF[...]"
      },
      {
        "name": "slide0",
        "filename": "640586843fa5ce00112b474a_1841d4ec96737124fc4d70f2dbf0b9ea.png",
        "mimetype": "",
        "base64": "iVBORw0KGgoA[...]"
      },
      {
        "name": "slide1",
        "filename": "640586843fa5ce00112b474a_29e5f38c441b3348c90d3fd4df1a9564.png",
        "mimetype": "",
        "base64": "iVBORw0KGgoA[...]"
      },
      {
        "name": "slide2",
        "filename": "640586843fa5ce00112b474a_a57b4fd71a2a58ee49bcd80240d30fd5.png",
        "mimetype": "",
        "base64": "iVBORw0KGgoA[...]"
      }
    ]
  },
  {
    "id": "t640586843fa5ce00112b4748",
    "name": "Url #1",
    "rect_fixed_ratio": true,
    "active": true,
    "hidden": false,
    "immutable": false,
    "coordinates": {
      "x": 39.93364434180138,
      "y": 70.9427,
      "z": 0
    },
    "dimensions": {
      "width": 23.40683602771362,
      "height": 12.494
    },
    "show_in_responsive_views": {
      "desktop": true,
      "mobile": true
    },
    "order": 6,
    "actions": [
      {
        "type": "url",
        "data": {
          "type": "value",
          "value": "www.google.com"
        }
      }
    ],
    "generators": [],
    "background": "icon",
    "api": "2.0.1",
    "resources": [
      {
        "name": "icon",
        "filename": "640586843fa5ce00112b4748_8be1a2533f05dce06976d88d793a8367.png",
        "mimetype": "image/png",
        "base64": "iVBORw0KGgoA[...]"
      }
    ]
  },
  {
    "id": "t6406d8a53fa5ce00112b4766",
    "name": "WebView #1",
    "rect_fixed_ratio": true,
    "active": true,
    "hidden": false,
    "immutable": false,
    "coordinates": {
      "x": 81.7993348729792,
      "y": 52.51250000000002,
      "z": 0
    },
    "dimensions": {
      "width": 16.643510392609695,
      "height": 17.571199999999997
    },
    "show_in_responsive_views": {
      "desktop": true,
      "mobile": true
    },
    "order": 10,
    "actions": [
      {
        "type": "html",
        "data": {
          "type": "value",
          "value": "content"
        },
        "event": "page_open"
      }
    ],
    "generators": [],
    "background": "icon",
    "api": "2.0.1",
    "resources": [
      {
        "name": "icon",
        "filename": "6406d8a53fa5ce00112b4766_dcdd43a630e70e1da63f5164dcbc990e.jpeg",
        "mimetype": "image/jpeg",
        "base64": "/9j/4AAQSkZJ[...]"
      },
      {
        "name": "content",
        "filename": "webview.html",
        "mimetype": "text/html",
        "base64": "PGRpdj4KICB0b3RvCjwvZGl2Pg=="
      }
    ]
  }
]