A friend and I are just in the process of trying to create PDFs on the fly. This isn''t in itself too hard, but we have some repeating images that are being put in over and over again. It''s increasing file size too much unfortunately. Does anyone know the best way to ensure file size is kept to a minimum for this scenario? We know about linking to a URI, but the problem with that is that if the PDF gets sent elsewhere, we have to send the linked images with it. Any help would be appreciated. Thanks Paul -- PJ Net Solutions Ltd 0871 223 5370 http://www.pjnetsolutions.com Registered Number : 4131671 - Registered in England and Wales Registered address : 35 Ballards Lane, London, N3 1XW Office address : 17 Mortain Drive, Berkhamsted, HP4 1JZ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 2/27/07, Paul Johnston <paul-lrF+y1ZFQoNCkLs28/y7ANBPR1lH4CV8@public.gmane.org> wrote:> A friend and I are just in the process of trying to create PDFs on the > fly. This isn''t in itself too hard, but we have some repeating images > that are being put in over and over again. It''s increasing file size > too much unfortunately.If you''re using PDF::Writer, then it''s trivial to reuse images that are repeating. You just have to do it right (and the demo chunkbacon.rb shows how). If you''re not using PDF::Writer, then you need to be more specific about your problem. -austin -- Austin Ziegler * halostatue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org * http://www.halostatue.ca/ * austin-/yODNl0JVVCozMbzO90S/Q@public.gmane.org * http://www.halostatue.ca/feed/ * austin-BGvFLPKiNqwsA/PxXw9srA@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, 2007-02-27 at 09:00 -0500, Austin Ziegler wrote:> On 2/27/07, Paul Johnston <paul-lrF+y1ZFQoNCkLs28/y7ANBPR1lH4CV8@public.gmane.org> wrote: > > A friend and I are just in the process of trying to create PDFs on the > > fly. This isn''t in itself too hard, but we have some repeating images > > that are being put in over and over again. It''s increasing file size > > too much unfortunately. > > If you''re using PDF::Writer, then it''s trivial to reuse images that > are repeating. You just have to do it right (and the demo > chunkbacon.rb shows how).That''s helpful thanks. I hadn''t found the "demo" section because I was looking for "examples" :) I have actually looked at the gem code to figure out how to load the image only once. Figured it out now, so thanks. Really helpful. Paul -- PJ Net Solutions Ltd 0871 223 5370 http://www.pjnetsolutions.com Registered Number : 4131671 - Registered in England and Wales Registered address : 35 Ballards Lane, London, N3 1XW Office address : 17 Mortain Drive, Berkhamsted, HP4 1JZ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---