ruby - How do I flatten/compress a pdf which is generated with prawn? -


i using prawn generate pdf files have lots of images come out quite large. can open file in adobe acrobat , save using "reduce file size" option, , 164mb file shrunk 7mb , retained of image quality. replicate compression in ruby. have tried using compression settings prawn offers , have not had effect on file size. suspect there must way rmagick, haven't figured out yet.

i apologize not including code samples showing have tried, removed prawn compression settings when didn't have effect, don't have show.

have tried making copy of pdf rmagick? is, read in pdf , write out again.

also, check imagemagick folks @ https://www.imagemagick.org/discourse-server/. advice offer can implemented via rmagick.


Comments