DBServer/app/models/document.rb
##document was created, as a page was removed from an existing doc
document was created, as a page was removed from an existing doc
document was created as a page was removed from an existing doc
def pdf_file
    docs='';self.pages.each  {|p| docs+=' '+p.path(:org)}
    pdf=Tempfile.new(["cd_#{self.id}",".pdf"])
    java_merge_pdf="java -classpath './java_itext/.:./java_itext/itext-5.3.5/*' MergePDF"
    res=%x[#{java_merge_pdf} #{docs} #{pdf.path}]
    return pdf
  end
def pdf_file docs = '' ; self . pages . each { | p | docs += ' ' + p . path ( :org ) } pdf = Tempfile . new ( [ "cd_#{self.id}" , ".pdf" ] ) java_merge_pdf = "java -classpath './java_itext/.:./java_itext/itext-5.3.5/*' MergePDF" res = %x[ #{ java_merge_pdf } #{ docs } #{ pdf . path } ] return pdf end
document was created, as a page was removed from an existing doc
document was created as a page was removed from an existing doc