Answer the question
In order to leave comments, you need to log in
How to display pdf (or generate a file for download)?
I have a variable that contains
the output res_ticket
pdf
=> "%PDF-1.4\n%\xE2\xE3\xCF\xD3\n5 0 obj\n<</ColorSpace[/Indexed/DeviceRGB 255(A\xA0?\xB9\xD9\x9E\x9E\xC99\xB3\xD7\x9E\xDC\xEE\xDB\x8E\xC0;\xE4\xF1\xDA\xE6\xE6\xE6-\x9B?z\xB7<U\xA7>\xA5\xC6\x8B\xCB\xE2\x98\x00\x93?\xF2\xF8\xE7\xD1\xE6\xB5t\xB4=\xBB\xD9\x84d\xAD>l\xB0=\x96\xC7{\x91\xC2:\"\x99?\x95\xC4:\xBB\xDB\xAA\x19\x97?\x12\x96?q\xB2=\x89\xBE;^\xAA>N\xA4?\xAD\xD1Q\x0E\x95?\x85\xBC;\xE8\xF3\xDAy\xB6<h\xB4c\xC9\xE2\xB6S\xA6>=\x9F?\x88\xBE;\\t\x95?\xA2\xCBF\x9A\xC69\x82\xCA\x9F\x9B\xC9`j\xAF=~\xB8<&\x99?\xC1\xDF\xB7\xD1\xE5\x9C\x81\xBA<4\x9C?D\xA1?`\xAB>\xB1\xDA\xB7r\xB3=:\x9E?|\xB8<`\xBB\x87\xD6\xE8\xA8\x96\xC9\x87h\xAE=\xA9\xD3\x9F\xA5\xD2\x9FJ\xA3?\xEE\xF5\xDAN\xA9W\xBA\xDC\xB7n\xB1=\x94\xC4:f\xAE=A\xAEoG\xA2?Q\xA6>\xF7\xFB\xF3L\xA4?\x1D\x98?*\x9A?\x99\xC6:\\\\\xAA>H\xA2?Q\xB1oX\xA8>\x80\xBA<0\xA7cZ\xA9>v\xB5=b\xAC>\xDA\xEB\xCE6\x9D?\x92\xC3:\xD9\xE9\xB5\xBF\xE4\xCFf\xAE>\x1D\x1D\e2\x9C?\x06\x94?\x00\x817\xFF\xFF\xFF\xBF\xDF\xCD\x7F\xC0\[email protected]\xA1i\xEF\xF7\xF2\x10\x89DVVT \x91P\xCF\xE7\xD9\xDF\xEF\xE6\x9F\xD0\xB4\xC6\xC6\xC6`\xB0\x820\x99]\xF1\xF1\xF1\x8F\xC8\xA7\xAF\xD7\xC0\xA2\xCB8P\xA9v++\\)p\xB8\x8FHHFrrq\xAA\xAA\xA9\xD4\xD4\xD4\xE3\xE3\xE2998\x9C\x9C\x9B\xB8\xB8\xB7ddc\x80\x80\x7F\x8E\x8E\x8D\xD9\xD9\xD9\xDB\xDB\xDB\x87\xBD;\\\\\xA9>\xFD\xFD\xFD\x86\xBD;\xF8\xF8\xF8\xA1\xCB8\xDE\xDE\xDE\x9A\xC6:\x98\xC5:\x90\xC1:\xA0\xCA8\xEC\xEC\xECs\xB4=\x83\xBB<|\xB7<\x8D\xC0;\xA1\xCA8\xF3\xF3\xF3\xDF\xF1\xE7\xFA\xFA\xFA\xDC\xEC\xB4\xB9\xD8j\xEF\xF8\xF30\x9B?\x88\xBD;\x80\xB9<\x8B\xBF;\xA6\xCEyg\xAFJ\xF3\xF9\xF3W\xA8>\x85\xBCH8\x9D?\xDD\xEC\xCE\xB6\xD8\x9E\xA3\xCC8\x8F\xCF\xAB\x9B\xC79\xB3\xD5]?\xA0?e\xAD>\xF9\xFC\xF3\xEA\xF4\xE7\xA8\xCEDO\xA5?\xF5\xFA\xF3\x92\xC4T\x9D\xC89\xE3\xE3\xE3\x86\xBC;\xD2\xE6\x9C\xAB\xD0l\xBF\xDC\x9D\x9C\xD2\xAB\xD4\xE7\xB5G\xB0o\x85\xBEU\xB6\xD7\x91 \x9FWq\xBE\x873\x9FK\x7F\xBF{\xAA\xCFQ\xA6\xD0\x92\xAA\xD2\x92\xD5\xE0\xC7\
Answer the question
In order to leave comments, you need to log in
use the method
send_data
send_data res_ticket, filename: 'res_ticket.pdf'
api.rubyonrails.org/classes/ActionController/DataS...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question