Is anyone using Pdf::Writer? I don know how to insert html tags in a pdf using Pdf::Writer, except <b> and <i> I think an idea is with Pdf::TechBook but i hadn''t seen any example till now. -- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060601/d38e288c/attachment.html
On 6/1/06, Ioana Kanda <kaio4000@gmail.com> wrote:> Is anyone using Pdf::Writer? > I don know how to insert html tags in a pdf using Pdf::Writer, except <b> > and <i> > I think an idea is with Pdf::TechBook but i hadn''t seen any example till > now.I''m not sure what you''re asking for. PDF::Writer does not (and will *never* directly) support HTML. It supports a couple of HTML-like tags (<b> and <i> as you''ve noted) and a series of stand-alone replacement (<r:.../>), stand-alone markup (<C:.../>), and paired markup (<c:...>...</c:...>) tags that are user definable. Adding new markup tags is well-defined (although there are some issues with some advanced tags that are being investigated). -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca
Hi Austin Sorry for this list, but I gotta put my issues: 1. For example how do I put a background color to a text? 2. How can I go to a next line? 3. How can I make a text heading1? Not regarding html: 4. Can I specify column width when I split my page in 2columns? With "start_columns 2" 5. What option do I have to verify if the content that I want to put exceeds one page and needs a second one? 6. Can I specify a header and a footer of a page? 7. If I write smth like: " pdf.image ''myimage.png'' , :border => true "....the border isn''t well positioned on the image. Thanks in advance On 6/1/06, Austin Ziegler <halostatue@gmail.com> wrote:> > On 6/1/06, Ioana Kanda <kaio4000@gmail.com> wrote: > > Is anyone using Pdf::Writer? > > I don know how to insert html tags in a pdf using Pdf::Writer, except > <b> > > and <i> > > I think an idea is with Pdf::TechBook but i hadn''t seen any example till > > now. > > I''m not sure what you''re asking for. > > PDF::Writer does not (and will *never* directly) support HTML. It > supports a couple of HTML-like tags (<b> and <i> as you''ve noted) and > a series of stand-alone replacement (<r:.../>), stand-alone markup > (<C:.../>), and paired markup (<c:...>...</c:...>) tags that are user > definable. Adding new markup tags is well-defined (although there are > some issues with some advanced tags that are being investigated). > > -austin > -- > Austin Ziegler * halostatue@gmail.com > * Alternate: austin@halostatue.ca > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060602/c835dfb2/attachment.html
On 6/2/06, Ioana Kanda <kaio4000@gmail.com> wrote:> Sorry for this list, but I gotta put my issues: > 1. For example how do I put a background color to a text?There is currently no automated way to do this. It could probably be adapted from the c:uline tag, but it might have issues because PDF draws things in the order that they are read, and and underline can''t be drawn until the text is fully drawn. I have other issues that I am working on and do not expect to be able to help figure this out for a couple of months.> 2. How can I go to a next line?The presence of a newline in text should force a newline. I haven''t tried in a while.> 3. How can I make a text heading1?There''s no such concept in PDF or PDF::Writer. You have to figure out how you want to do so and probably make a method that forces font face and size to that each time. There are probably three different places that example code for this can be found. Look at QuickRef because it implements an "h1" method.> Not regarding html: > 4. Can I specify column width when I split my page in 2columns? With > "start_columns 2"Um. You can specify the size of the gutter between columns.> 5. What option do I have to verify if the content that I want to put exceeds > one page and needs a second one?PDF::Writer will automatically wrap to a second page. There is (currently, and likely "forever") no way to tell this without actually writing the text to a page.> 6. Can I specify a header and a footer of a page?Yes, but the concepts aren''t integral to PDF::Writer. There''s an example of a header and a footer both in the code that is executed as part of the manual.> 7. If I write smth like: " pdf.image ''myimage.png'' , :border => true > "....the border isn''t well positioned on the image. > Thanks in advanceThat would be a bug report, and belongs on the RubyForge site. Otherwise, I''ll lose it. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca
Have you seen: http://www.artima.com/rubycs/articles/pdf_writer.html ? I''m not sure if i answers all your questions but it looks like a good place to start. Steve Ioana Kanda wrote:> Hi Austin > Sorry for this list, but I gotta put my issues: > 1. For example how do I put a background color to a text? > 2. How can I go to a next line? > 3. How can I make a text heading1? > Not regarding html: > 4. Can I specify column width when I split my page in 2columns? With > "start_columns 2" > 5. What option do I have to verify if the content that I want to put > exceeds > one page and needs a second one? > 6. Can I specify a header and a footer of a page? > 7. If I write smth like: " pdf.image ''myimage.png'' , :border => > true > "....the border isn''t well positioned on the image. > Thanks in advance-- Posted via http://www.ruby-forum.com/.
Thanx Stephen I already seen it...guess I''m too dull to figure out how to add a background to a text. Or to make a border to a text. -- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060602/abe56b79/attachment.html
Thanks Austin I''m so tired that till now I haven''t notice your reply. On 6/2/06, Austin Ziegler <halostatue@gmail.com> wrote:> > On 6/2/06, Ioana Kanda <kaio4000@gmail.com> wrote: > > Sorry for this list, but I gotta put my issues: > > 1. For example how do I put a background color to a text? > > There is currently no automated way to do this. It could probably be > adapted from the c:uline tag, but it might have issues because PDF > draws things in the order that they are read, and and underline can''t > be drawn until the text is fully drawn. I have other issues that I am > working on and do not expect to be able to help figure this out for a > couple of months. > > > 2. How can I go to a next line? > > The presence of a newline in text should force a newline. I haven''t > tried in a while. > > > 3. How can I make a text heading1? > > There''s no such concept in PDF or PDF::Writer. You have to figure out > how you want to do so and probably make a method that forces font face > and size to that each time. There are probably three different places > that example code for this can be found. Look at QuickRef because it > implements an "h1" method. > > > Not regarding html: > > 4. Can I specify column width when I split my page in 2columns? With > > "start_columns 2" > > Um. You can specify the size of the gutter between columns. > > > 5. What option do I have to verify if the content that I want to put > exceeds > > one page and needs a second one? > > PDF::Writer will automatically wrap to a second page. There is > (currently, and likely "forever") no way to tell this without actually > writing the text to a page. > > > 6. Can I specify a header and a footer of a page? > > Yes, but the concepts aren''t integral to PDF::Writer. There''s an > example of a header and a footer both in the code that is executed as > part of the manual. > > > 7. If I write smth like: " pdf.image ''myimage.png'' , :border => > true > > "....the border isn''t well positioned on the image. > > Thanks in advance > > That would be a bug report, and belongs on the RubyForge site. > Otherwise, I''ll lose it. > > -austin > -- > Austin Ziegler * halostatue@gmail.com > * Alternate: austin@halostatue.ca > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060602/bb8cf72c/attachment.html
On 6/2/06, Ioana Kanda <kaio4000@gmail.com> wrote:> > Not regarding html: > > 4. Can I specify column width when I split my page in 2columns? With > > "start_columns 2" > Um. You can specify the size of the gutter between columns.Sorry; this is incomplete. You can *also* cheat a little by mucking around with the margins. In the future, I will probably make it possible to specify columns a little more flexibly. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca
Do you know how to add subscript and superscrit to the pdf generated by rails?? -- 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 -~----------~----~----~----~------~----~------~--~---