Hi Alex, Alex Williams wrote:> > Could I add my text with some sort of positioning to the PDF? > With like PDF writer? And can you get me started on how to > do this?I did something very similar using PDF::Writer. You can see a demo at YourTimeMatters.com and, if you''re interested in seeing how I did it, the code''s at rubyforge.org/projects/ccredit. Feel free to contact me offlist if you''d like. Note that I seem to have something screwed up a little bit with the CSS for the fieldset around the ''reports'' on the final page in FireFox. Looks fine in IE ;-p. HTH, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Alex Williams
2008-Jul-24 19:59 UTC
Re: Need help with report building. PDF or IMG or what?
Bill Walton wrote:> Hi Alex, > > Alex Williams wrote: >> >> Could I add my text with some sort of positioning to the PDF? >> With like PDF writer? And can you get me started on how to >> do this? > > I did something very similar using PDF::Writer. You can see a demo at > YourTimeMatters.com and, if you''re interested in seeing how I did it, > the > code''s at rubyforge.org/projects/ccredit. Feel free to contact me > offlist > if you''d like. Note that I seem to have something screwed up a little > bit > with the CSS for the fieldset around the ''reports'' on the final page in > FireFox. Looks fine in IE ;-p. > > HTH, > BillThank you Bill and Craig. I''ve been trying to get PDF::Writer to work for a little while now. HOWEVER, it looks like it can only create them, it cannot open an EXISTING PDF file and edit it. Is there a way to do that? Thank you again! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Alex, Alex Williams wrote:> > Thank you Bill and Craig. I''ve been trying to get PDF::Writer > to work for a little while now. HOWEVER, it looks like it can > only create them, it cannot open an EXISTING PDF file and > edit it. > > Is there a way to do that?Your original post didn''t mention the need to read / edit existing PDF files. If you do, the answer depends primarily on whether those files are ones you generated, or ones generated by third parties. If you need to edit PDFs that you generated, you can follow the route I took. I used PDF::Writer to create PDF files that Acrobat understands and can display, and pdftk to attach XML files containing the data that''s displayed via the PDF. The PDF itself essentially becomes an image, but my app (or any other that understands the XML schema) can extract the XML data from the PDF, edit it, and create a new PDF (or overwrite the old one). If, on the other hand, you need to read / edit PDFs that were generated by someone else, you''re probably going to have to use Adobe''s tools. There are some tools around that can read / extract form data from older versions of Adobe''s PDFs, but Adobe''s changed the whole way that''s handled in recent versions. The old approach was known as FDF, I think. I can''t remember what the new one''s called but the bottom line is, AFAIK, there are no open source libraries to generate / consume the new format. The standard''s open, so you could conceivably generate your own. But be careful. Adobe''s license says something like "if you use any of our tools, you can''t use any of anybody else''s". HTH, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---