Closed adnanmirza1 closed 3 years ago
Hey! so i solved it myself by using temp file. Like this: @cans.pdf_doc.open(tmpdir: "app/assets/pdfs") do |file| pdf = CombinePDF.new a = File.basename(file) pdf << CombinePDF.load("app/assets/pdfs/#{a}") pdf.save "combined.pdf" end
Hey, i'm facing the issue. i'm trying to parse PDF stored in my active storage. with url_for and facing this error CombinePDF::ParsingError Exception: Unknown PDF parsing error - malformed PDF file?
i'm using following syntax: url = url_for(Candidate.last.pdf) pdf = CombinePDF.parse(Net::HTTP.get_response(URI.parse(url)).body)