Skip to content

Instantly share code, notes, and snippets.

@Ripley6811
Created August 7, 2015 01:39
Show Gist options
  • Save Ripley6811/482cfa426ba5dff2cf01 to your computer and use it in GitHub Desktop.
Save Ripley6811/482cfa426ba5dff2cf01 to your computer and use it in GitHub Desktop.
Light grey grid to help align items in jsPDF
/**
* Display a light grey grid for designing layout
*/
if (false) {
doc.setDrawColor(200);
doc.setTextColor(200,200,200);
for (var i=0; i<50; i++) {
doc.rect(0,i*10,300,10);
doc.text(0,i*10, (i*10).toString());
doc.rect(i*10,0,10,300);
doc.text(i*10,5, (i*10).toString());
}
doc.setDrawColor(0);
doc.setTextColor(0,0,0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment