diff --git a/bin/svggvs b/bin/svggvs index 326de1f..9b699e1 100755 --- a/bin/svggvs +++ b/bin/svggvs @@ -95,6 +95,10 @@ module SVGGVS Pathname(context.session.pdf_target).parent.mkpath + if context.session.prepend_pdf + pages.unshift context.session.prepend_pdf + end + system "gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=#{context.session.pdf_target} -dBATCH #{pages.join(" ")}" end diff --git a/lib/svggvs/session.rb b/lib/svggvs/session.rb index b15ca54..6881a5a 100644 --- a/lib/svggvs/session.rb +++ b/lib/svggvs/session.rb @@ -3,7 +3,7 @@ module SVGGVS attr_accessor :svg_source, :svg_merged_target, :individual_files_path, :on_card_finished attr_accessor :png_files_path, :png_export_width, :pdf_card_size, :pdf_dpi attr_accessor :pdf_target, :card_back, :card_size, :target, :post_read_data - attr_accessor :card_sheet_identifier + attr_accessor :card_sheet_identifier, :prepend_pdf def initialize @index = 0