Skip to content

Instantly share code, notes, and snippets.

PDF Make Definitions

A list of all the properties for the Document Definition objects in PDF Make. Gathered from the examples source code. Up to date for version 0.1.38.

Basic definition

  • The Document Definition is a javascript object: {}. It can contain the following.
  • content: array. This defines the layout of your document. All your tags will be defined in there. You define tags using object (e.g. content: [{text: 'Hello World'}])
  • styles: object. A dictionary of all the named styles in your document. You can then apply a style to any object using style: 'name' or style: ['name1', 'name2']
  • defaultStyle: object. Defines a style to be applied to every element in the document.
  • images: object. Another dictionary that you can use to specify all the images in your document.
@rlefevre
rlefevre / elm-0.19.1-i386.md
Last active February 23, 2022 08:28
Elm 0.19.1 Linux 32bit unofficial binaries (Debian 10 Buster i386)

Unofficial Elm for Debian 10 Buster i386

Built with 32bit patches from https://github.com/dmy/elm-raspberry-pi.

Please do not report issues at the official Elm projects. You can comment here in the gist, note however that this is not a project that I intend to support in the future.

Install

curl -L https://gist.github.com/rlefevre/8fcf368d9951137e9e810c06c111bba1/raw/52c66eb0e01737e28f1f67f20790212b8ca6fd88/elm-i386-20200424.tar.gz | sudo tar zxC /usr/local/bin
@rlefevre
rlefevre / elm-linux-x64-static-0.19.1.md
Last active November 22, 2021 15:27
How to build an elm 0.19.1 binary statically linked to musl libc using docker

Elm 0.19.1 Linux x64 statically linked binary

This document describes how to build a statically linked binary of Elm 0.19.1 for Linux x64 using docker. The binary is built using Alpine Linux in order to easily link it statically to musl libc. This is how the official Elm 0.19.1 Linux binary is built.

Why?

Why build a statically linked binary?

Elm is currently distributed using npm. For Linux x64 (but this applies to any architecture), this requires to have a single x64 binary that works on all Linux x64 distributions. This is considerably easier to achieve by building a statically linked binary that will only depend on the Linux kernel ABI and System Call Interface but not on userpace libraries (see here for a compatibility survey of a dynamically built executable).

Why use docker?

@rlefevre
rlefevre / elm-dmy-fr.md
Last active March 23, 2020 13:48
Elm using elm.dmy.fr proxies

Update: As package.elm-lang.org IP address has been changed and is not blocked anymore as far as I know, these proxies have been disabled. If you still need them, add a comment describing why.


Here is how to use the proxies:

Packages documentation

Two options:

1. Browse elm.dmy.fr instead of package.elm-lang.org

@rlefevre
rlefevre / elm-linux-x64-static-0.19.0.md
Last active October 29, 2019 14:22
How to build an elm 0.19.0 binary statically linked to musl libc using docker

Elm 0.19.0 Linux x64 statically linked binary

This document describes how to build a statically linked binary of Elm 0.19.0 for Linux x64 using docker. The binary is built using Alpine Linux in order to easily link it statically to musl libc. This is how the official Elm 0.19.0 Linux binary was built.

Why?

Why build a statically linked binary?

Elm is currently distributed using npm. For Linux x64 (but this applies to any architecture), this requires to have a single x64 binary that works on all Linux x64 distributions. This is considerably easier to achieve by building a statically linked binary that will only depend on the Linux kernel ABI and System Call Interface but not on userpace libraries (see here for a compatibility survey of a dynamically built executable).

Why use docker?