Howard Shank wrote:
>
> Hello Michael,
>
> 1. iText RTF functionality is written to support Word 2003. Some
> functionality may or may not work properly in other readers. That said, if
> you want to post your code and files so I can review them I'd be happy to
> take a look and see what the issue is. As for quality, if you read the
> file into Word and save it from Word and the quality changes, that's not
> an iText issue.
>
> This is my code for the picture. i have put away all scaleparts to test,
> but it doesn't work anyway: Why is this picture not visible in rtf?
>
> private void addLogo(Document document) {
> try {
> Image logo = Image.getInstance("bwlogo.bmp");
> //logo.scaleAbsolute(100, 100);
> document.add(logo);
> } catch (BadElementException e) {
>
> e.printStackTrace();
> } catch (MalformedURLException e) {
>
> e.printStackTrace();
> } catch (IOException e) {
>
> e.printStackTrace();
> } catch (DocumentException e) {
>
> e.printStackTrace();
> }
>
> }
>
>
>
> 2. When you create your list via whichever method i.e. List(float
> symbolIndent) or List(boolean numbered, boolean lettered, float
> symbolIndent) or List(boolean numbered, float symbolIndent) the float
> value symbolIndent is the spacing between the listsymbol and the listtext.
> There is also the method List.setIndentationLeft(float indentation) that
> sets your indent spacing. Please note these are on the base "List" class
> and on on the RtfList object. I will look at adding a method to set the
> symbolIndent
>
>
>
> indentationleft is only the space between the left side of the page and
> the symbol. But i have the problem that there is too much space between
> the symbol and the listtext! This is my list: You can see i want to
> implement a kind of wikisyntax. A text is splitted by empty lines. If
> there is a "" in one part at the beginning its a headline and i use a
> special font and adding it to a array of phrases. If there are *...
> *...*... each ... should be a part of the list. In the main funktion i
> use for.... to add all parts to the document.
> And again: the listsymbol should be parallel to the normal text. But the
> ... listtext should be about 2 characters behind the symbol, not 20
> characters^^ but i cant ajust that:-/
>
>
> private Phrase[] setTextPhrase(String text, Font[] font) {
> ModelSettings settings;
> settings = model.ModelSettings.getInstance();
> String[] textParts = text.split("\n\n");
> Phrase[] textPhrase = new Phrase[textParts.length];
>
>
> for(int i = 0; i<textParts.length;i++)
> {
> Chunk textChunk = new Chunk(textParts[i]+"\n\n");
> Phrase phrase = new Phrase(textChunk);
> phrase.setFont(font[0]);
> if (phrase.getContent().startsWith("\"\"")== true)
> {
> phrase.setFont(font[3]);
>
> Chunk newChunk = new
> Chunk(textChunk.getContent().replaceAll("\"\"",
> ""));
> phrase.clear();
> phrase.add(newChunk);
>
> }
> textPhrase[i]=phrase;
> if (phrase.getContent().startsWith("*")== true)
> {
> String listPart = phrase.getContent();
> phrase.clear();
>
> String[] listString = listPart.split("\\*");
> boolean listSymbol=false;
> if (settings.getListSymbol()==1)
> {
> listSymbol=true;
> }
>
> List list = new List(listSymbol);
> for(int j = 1; j<listString.length;j++)
> {
> Chunk listChunk = new
> Chunk(listString[j]);
> list.add(listChunk+"\n");
> }
> phrase.add(list);
> }
> textPhrase[i]=phrase;
> }
>
> return textPhrase;
>
> Regards,
> Howard Shank
>
> ----- Original Message ----
> From: mrhiggins <[EMAIL PROTECTED]>
> To: itext-questions@lists.sourceforge.net
> Sent: Monday, May 19, 2008 6:35:34 AM
> Subject: [iText-questions] itext - rtf only works with word
>
>
> I have to export a pressarticle to rtf with itext. We also have a preview
> in
> java.
> In the rtf i have some phrases, a picture and sometimes a list.
>
> Problem 1:
> Wordpad or the preview doesnt show the picture. If i open it in word and
> save there, it works fine also in wordpad and in the preview, but the
> quality isnt good.
>
> Problem 2:
> I have for each part of the list a chunk, and im adding the chunk+"\n" to
> the list.
> This works but the space between the listsymbol and the listtext is about
> 10
> characters. I cant change that.
>
>
> Can someone help me?
> --
> View this message in context:
> http://www.nabble.com/itext---rtf-only-works-with-word-tp17315845p17315845.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Do you like iText?
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Do you like iText?
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar
>
>
--
View this message in context:
http://www.nabble.com/itext---rtf-only-works-with-word-tp17315845p17356616.html
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar