Skip to content

Instantly share code, notes, and snippets.

@Blaked84
Created August 3, 2022 15:47
Show Gist options
  • Save Blaked84/7ac4ff73c4b9d84b7feb591fc7b569a8 to your computer and use it in GitHub Desktop.
Save Blaked84/7ac4ff73c4b9d84b7feb591fc7b569a8 to your computer and use it in GitHub Desktop.
Generate empty pdf with page number in #Ruby with #Prawn
pdf = Prawn::Document.new(page_size: 'A4')
50.times { pdf.start_new_page }
pdf.number_pages("page <page> of <total>")
pdf.render_file('test.pdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment