Skip to content

Instantly share code, notes, and snippets.

@cjharkins
Created January 29, 2020 16:59
Show Gist options
  • Save cjharkins/817d58c7e783814647428aabfbf35e70 to your computer and use it in GitHub Desktop.
Save cjharkins/817d58c7e783814647428aabfbf35e70 to your computer and use it in GitHub Desktop.
import jsPDF from 'jspdf'
export default function({data, headers, filename}) {
const doc = new jsPDF({...})
{... I cut out previous code for brevity but it belongs here!}
// NEW CODE
 doc.line(pageMargin, pageMargin + 3.5, liveArea.width , pageMargin + 3.5)
const baseYPosForRows = pageMargin + padding // NEW CODE
 let nextYPos = baseYPosForRows // NEW CODE
doc.save(filename)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment