Skip to content

Instantly share code, notes, and snippets.

Zack Schwartz apexdodge

Block or report user

Report or block apexdodge

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f19d19fffd6a1e4bd9ea
$(document).ready(function() {
// Wait until element exists helper function
$.fn.waitUntilExists = function (handler, shouldRunHandlerOnce, isChild) {
var found = 'found';
var $this = $(this.selector);
var $elements = $this.not(function () { return $(this).data(found); }).each(handler).data(found, true);
if (!isChild)
{
(window.waitUntilExists_Intervals = window.waitUntilExists_Intervals || {})[this.selector] =
View gist:90fe8d990e89faf4116b
<div style="page-break-before: always; text-align: center;">
<h1 style="text-align: center;">{ApplicationCode}</h1>
<h2 style="text-align: center;">{ApplicationName}</h2>
<h3 style="text-align: center;">{ApplicationCategoryName}</h3>
View gist:9126a7c1aabcff4fe5e44e946424f332
<html style="color:green;" lang="en">
<head>
<title>Getting Started with Api2Pdf.com</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css" />
</head>
<body>
<div class="container">
<div class="row justify-content-md-center text-center">
<img src="https://www.api2pdf.com/wp-content/themes/api2pdf/assets/images/logo.png" />
</div>
View gist:dfb6bc4c5b7a8edd61b0d0834fc9337b
<html>
<head>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<style>
#container {
min-width: 800px;
View gist:84333a4795c0687b19045022029df357
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>A simple, clean, and responsive HTML invoice template</title>
<style>
.invoice-box {
max-width: 800px;
margin: auto;
View gist:64131395d84470ad40eaea716f709efd
<html>
<head>
<script src="https://cdn.anychart.com/releases/8.3.0/js/anychart-base.min.js"></script>
<style>
#container {
min-width: 800px;
max-width: 800px;
height: 400px;
@apexdodge
apexdodge / gist:5e67764b4722e280c01ff53701535ded
Created Jul 26, 2018
Bootstrap 4 Packing Slip HTML Template
View gist:5e67764b4722e280c01ff53701535ded
<html lang="en">
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<main role="main" class="container">
<div class="row">
<div class="col-8">
@apexdodge
apexdodge / gist:58d543918aa4b050d87e9b6b375a994c
Created Aug 21, 2018
HTML to force page breaks when printing to PDF
View gist:58d543918aa4b050d87e9b6b375a994c
<div style="page-break-before:always;">
<p>YOUR CONTENT 1</p>
</div>
<div style="page-break-before:always;">
<p>YOUR CONTENT 2</p>
</div>
<div style="page-break-before:always;">
<p>YOUR CONTENT 3</p>
@apexdodge
apexdodge / gist:8bd58e37f6b78ea711401860e7b64479
Created Aug 21, 2018
footerTemplate example for headless chrome
View gist:8bd58e37f6b78ea711401860e7b64479
<div class=\"page-footer\" style=\"width:100%; text-align:right; font-size:12px;\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>
@apexdodge
apexdodge / gist:b94f217286a619916ddc193fab8d12f3
Created Aug 21, 2018
sample api2pdf payload for headless chrome header and footer with page numbers
View gist:b94f217286a619916ddc193fab8d12f3
{
"html": "<p>Hello World</p>",
"inlinePdf": true,
"fileName": "test.pdf",
"options": {
"displayHeaderFooter": true,
"footerTemplate": "<div class=\"page-footer\" style=\"width:100%; text-align:right; font-size:12px;\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>"
}
}
You can’t perform that action at this time.