[Pdf::Witer]

Is anyone using Pdf::Writer?
I don know how to insert html tags in a pdf using Pdf::Writer, except

and
I think an idea is with Pdf::TechBook but i hadn’t seen any example till
now.

On 6/1/06, Ioana K. [email protected] wrote:

Is anyone using Pdf::Writer?
I don know how to insert html tags in a pdf using Pdf::Writer, except
and
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 ( and 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

On 6/2/06, Ioana K. [email protected] 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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

Have you seen: artima - Creating Printable Documents with Ruby ?
I’m not sure if i answers all your questions but it looks like a good
place to start.

Steve

Ioana K. 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

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

Thanks Austin
I’m so tired that till now I haven’t notice your reply.

On 6/2/06, Ioana K. [email protected] 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

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.

Try posting your question on refwell.com I got my answer there quite
quickly
Cheers

Do you know how to add subscript and superscrit to the pdf generated by
rails??