How to set even pages to be blank

19 views
Skip to first unread message

Mitja B

unread,
Nov 7, 2018, 8:56:52 AM11/7/18
to Prawn
I have generated a PDF with Prawn. I would like to add every second (even) blank page.
So the PDF can be printed onesided ;)

Mitja B

unread,
Nov 13, 2018, 8:06:19 AM11/13/18
to Prawn
This is how I solve it:
  
      # ----- add blank pages
      (1..page_count).each do |p|
        if go_to_page(p+(p-1))
            start_new_page
        end
      end
Reply all
Reply to author
Forward
0 new messages