test/automated in combine_pdf-0.2.37 vs test/automated in combine_pdf-1.0.0
- old
+ new
@@ -12,10 +12,11 @@
# require "pry"
# Pry.start
pdf = CombinePDF.load "./Ruby/test\ pdfs/filled_form.pdf"
pdf.save '01_check_radio_buttuns.pdf'
+pdf = CombinePDF.load "./Ruby/test\ pdfs/filled_form.pdf"
pdf << CombinePDF.load("./Ruby/test\ pdfs/empty_form.pdf")
pdf << CombinePDF.load("./Ruby/test\ pdfs/filled_form.pdf")
pdf.save '02_check_form_unification_middle_is_empty.pdf'
pdf = CombinePDF.load './Ruby/test pdfs/share-font-background.pdf'
@@ -49,10 +50,19 @@
pdf.save '06_check_links_to_second_copy.pdf'
lists = %w(./Ruby/test\ pdfs/outlines/self_merge_err.pdf ./Ruby/test\ pdfs/outlines/big_toc.pdf ./Ruby/test\ pdfs/outlines/bigger_toc.pdf ./Ruby/test\ pdfs/outlines/named_dest_no_toc.pdf ./Ruby/test\ pdfs/outlines/named_dest_no_toc2.pdf ./Ruby/test\ pdfs/outlines/named_dest.pdf ./Ruby/test\ pdfs/outlines/named_dest2.pdf)
i = 0
-lists.each { |n| CombinePDF.load(n).save("07_#{(i += 1)}_#{n.split('/')[-1]}"); (CombinePDF.load(n) << CombinePDF.load(n)).save("07_#{i}x2_#{n.split('/')[-1]}") }
+lists.each do |n|
+ # puts "loading #{n}"
+ pdf = CombinePDF.load(n)
+ # puts "saving 07_#{(i += 1)}_#{n.split('/')[-1]}"
+ pdf.save("07_#{(i += 1)}_#{n.split('/')[-1]}")
+ # puts "loading #{n}X2"
+ pdf = CombinePDF.load(n) << CombinePDF.load(n)
+ # puts "saving 07_#{i}x2_#{n.split('/')[-1]}"
+ pdf.save("07_#{i}x2_#{n.split('/')[-1]}")
+end
pdf = CombinePDF.new
lists.each { |n| pdf << CombinePDF.load(n) }
pdf.save('07_named destinations.pdf')
pdf = CombinePDF.new