×

Loading...
Ad by
Ad by

头疼的问题,老板说做不出来就没办法向客户交差的需求. Thanks in advance

本文发表在 rolia.net 枫下论坛In the project I'm working on, PDF and RTF files are generated programmatically using iText Java API.
There's a very special element required in the output files. The following steps tell you how to create it manually in MS Word.

1. Go to "View"->"Header and Footer".
2. Insert a "textbox" into the header area.
3. Insert a picture into this textbox.
4. Move this textbox out of the header area, and put it on the left-hand side of the document.
Resize the picture so it runs from the top to the bottom on the page.
5. Therefore this left-side picture bar will show up on every page of this document since it's created in the header.
And it magically sits out of the header area.

I've achieved this element for PDF files using "WaterMark" object of the iText API. Unfortunately, iText documentation explicitly
claims it doesn't support WaterMark in RTF files.

I tried to post this question in the maillist of iText and got the answer that there's no plan to support this feature for RTF files in the near future.

I've ever thought about Jfor, another Java API for generating RTF file, which I believed could be more powerful than iText to handle RTF
files since iText was originally designed to handle PDF files and does not have too much interest on RTF. But Jfor requires a XSL-FO input and I don't even know how to represent my required element in a XSL-FO.

I've also checked Jakarta POI, unfortunately, the component for handling RTF is still "in the early stages of development".
(Actually, they are still recruiting volunteer developers for this Open Source project).

Is there anybody here having encountered the similar problem before?

Any ideas and clues to help achieve this element are very welcome regardless of what APIs.
If I didn't make myself clear or any further information required, please shoot me an email at iTextSubscriber@gmail.com更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 头疼的问题,老板说做不出来就没办法向客户交差的需求. Thanks in advance
    本文发表在 rolia.net 枫下论坛In the project I'm working on, PDF and RTF files are generated programmatically using iText Java API.
    There's a very special element required in the output files. The following steps tell you how to create it manually in MS Word.

    1. Go to "View"->"Header and Footer".
    2. Insert a "textbox" into the header area.
    3. Insert a picture into this textbox.
    4. Move this textbox out of the header area, and put it on the left-hand side of the document.
    Resize the picture so it runs from the top to the bottom on the page.
    5. Therefore this left-side picture bar will show up on every page of this document since it's created in the header.
    And it magically sits out of the header area.

    I've achieved this element for PDF files using "WaterMark" object of the iText API. Unfortunately, iText documentation explicitly
    claims it doesn't support WaterMark in RTF files.

    I tried to post this question in the maillist of iText and got the answer that there's no plan to support this feature for RTF files in the near future.

    I've ever thought about Jfor, another Java API for generating RTF file, which I believed could be more powerful than iText to handle RTF
    files since iText was originally designed to handle PDF files and does not have too much interest on RTF. But Jfor requires a XSL-FO input and I don't even know how to represent my required element in a XSL-FO.

    I've also checked Jakarta POI, unfortunately, the component for handling RTF is still "in the early stages of development".
    (Actually, they are still recruiting volunteer developers for this Open Source project).

    Is there anybody here having encountered the similar problem before?

    Any ideas and clues to help achieve this element are very welcome regardless of what APIs.
    If I didn't make myself clear or any further information required, please shoot me an email at iTextSubscriber@gmail.com更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • 问得太没经验了,去专业论坛问!在小资论坛问这么长的问题,又是英语,除了我唠叨两句,谁理你啊?
      • 谢谢老王,俺这就是贴完了专业论坛顺手贴到这儿来的。希望大伙儿在忙着红杏出墙、通下水道、加热咸带鱼、选购名牌服装之余能帮忙看看。
    • You should hire a contractor to solve the probelm for you.
    • 没仔细看,你看看这里能否有帮助,以及java的javax.swing.text.rtf package