Skip to content

Instantly share code, notes, and snippets.

HTML to PDF Conversion Tools

Overview

The platform will be handling dynamic documents, such as the product requirements document that will need to be converted to PDF before being sent for an electronic signature.

Requirements

  • Hosted version. Online tools cannot be trusted with sensitive documents we'd need to convert.
  • Accurate visual capture of the layout
# Configure Windows
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
# Update-ExecutionPolicy Unrestricted
# cinst -y Microsoft-Hyper-V-All -source windowsFeatures
# Packages
cinst -y cmder -pre
cinst -y hyper
@samdolan
samdolan / git-rev-version
Created February 3, 2016 15:18
A script for generating version numbers for your git repository
#!/bin/bash
set -eu
#==================================
# ENV variables
#----------------------------------
# enable debug mode
BUILD_REV_DEBUG=0
@samdolan
samdolan / sh.py
Created January 1, 2016 05:03
easily accessible sh.py
# @samdolan - Fetch via `curl https://raw.githubusercontent.com/amoffat/sh/c361f9450fed03cd3bb34291c4cd2f4cbc7c5bce/sh.py`
"""
http://amoffat.github.io/sh/
"""
#===============================================================================
# Copyright (C) 2011-2015 by Andrew Moffat
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@samdolan
samdolan / gen-docker-sys-name.py
Last active November 27, 2015 16:09
Python port of docker's container naming scheme
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import random
import argparse
"""
Generate an arbitrary number of system names from the command line
Combines a random adjective with the name of a famous scientist, programmer, etc.
@samdolan
samdolan / country_codes.json
Created March 11, 2014 01:16
ISO_3166-1 (Country Codes) as JSON
[
{
"alpha_2_code": "AF",
"alpha_3_code": "AFG",
"iso_code": "ISO 3166-2:AF",
"short_name": "Afghanistan",
"numeric_code": "004"
},
{
"alpha_2_code": "AX",
@samdolan
samdolan / country_codes.json
Created March 11, 2014 01:08
ISO_3166-1 (Country Codes) as JSON
[
{
"alpha_2_code": "AF",
"alpha_3_code": "AFG",
"iso_code": "ISO 3166-2:AF",
"short_name": "Afghanistan",
"numeric_code": "004"
},
{
"alpha_2_code": "AX",