[iText-questions] embed the BaseFont Helvetica

2010-06-16 Thread privat
Hello ,

I tried to  embed the BaseFont Helvetica but Acrobat says that=20
it isn't embedded.
this is may Code based on itext 2.0.7:
String text0 =3D This is the quite popular built in font ' + =
BaseFont.HELVETICA + '.;
Paragraph p =3D new Paragraph(THIS IS TEST, =
FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, =
BaseFont.EMBEDDED));
document.add(p);
Thanks for your help.

br,
Markus

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] HashMap for FactoryProperties

2010-02-23 Thread privat
Hello,

Since I updated my lib to 2.1.7.
Because createParagraph from HashMap is nolonger supported.
I have trouble with that:

public static Paragraph createParagraph(HashMap props) {
Paragraph p = FactoryProperties.createParagraph(props);

setParagraphFirstLineIndent(p, (String)props.get(indent));

return p;

}

What should I do to fix that in a easy way?
Maybe a stupid question, but I don't know this part very well.

Thanks for your help

br

Markus






--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

[iText-questions] How to set an image to the foreground?

2010-02-21 Thread privat
Hello,

I tried to set an image to the foreground, but always it will be topped by the 
table.
Maybe somebody have had the same issue or an idea how to fix that.

Thanks
best regards

Markus
the code

package com.lowagie.examples.objects.tables;

import java.awt.Color;
import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Image;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter;

/**
 * A very simple PdfPTable example.
 */
public class MyFirstTable {

 /**
  * A very simple PdfPTable example.
  * 
  * @param args
  *no arguments needed
  */
 public static void main(String[] args) {

  System.out.println(My First PdfPTable);

  // step 1: creation of a document-object
  Document document = new Document();

  try {
   // step 2:
   // we create a writer that listens to the document
   // and directs a PDF-stream to a file
   PdfWriter.getInstance(document, new 
FileOutputStream(c:\\MyFirstTable.pdf));

   // step 3: we open the document
   document.open();

Image png = Image.getInstance(c:\\bull.png);
png.scaleToFit(200, 200);
 png.setAbsolutePosition(11, 700);
 
 
 document.add(png);
 
   PdfPTable table = new PdfPTable(3);
   PdfPCell cell = new PdfPCell(new Paragraph(header with colspan 3));
   cell.setColspan(3);
   Color arg0 = new Color(100, 23, 56, 6);
   cell.setBackgroundColor(arg0 );
   table.addCell(cell);
   table.addCell(1.1);
   table.addCell(2.1);
   table.addCell(3.1);
   table.addCell(1.2);
   table.addCell(2.2);
   table.addCell(3.2);
   cell = new PdfPCell(new Paragraph(cell test1));
   cell.setBorderColor(new Color(255, 0, 0));
   cell.setBackgroundColor(arg0 );
   table.addCell(cell);
   cell = new PdfPCell(new Paragraph(cell test2));
   cell.setBackgroundColor(arg0 );
   cell.setColspan(2);
   cell.setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
   table.addCell(cell);
   
   
   document.add(table);
 
 
  } catch (DocumentException de) {
   System.err.println(de.getMessage());
  } catch (IOException ioe) {
   System.err.println(ioe.getMessage());
  }

  // step 5: we close the document
  document.close();
 }
}

MyFirstTable.pdf
Description: Adobe PDF document
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] How to set an image to the foreground?

2010-02-21 Thread privat
Thanks for your help.
I was look in a wrong way about layer and that stuff.

br
Markus
- Original Message - 
From: 1T3XT info i...@1t3xt.info
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Sunday, February 21, 2010 5:41 PM
Subject: Re: [iText-questions] How to set an image to the foreground?


 pri...@samea.de wrote:
 Hello,

 I tried to set an image to the foreground, but always it will be topped
 by the table.
 Maybe somebody have had the same issue or an idea how to fix that.

 Explained in the 1st edition:
 http://1t3xt.info/examples/browse/?page=exampleid=171
 As well as in the 2nd edition:
 http://www.flickr.com/photos/itextinaction/4329586559/in/set-72157623350017100/
 -- 
 This answer is provided by 1T3XT BVBA
 http://www.1t3xt.com/ - http://www.1t3xt.info

 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php
 Check the site with examples before you ask questions: 
 http://www.1t3xt.info/examples/
 You can also search the keywords list: 
 http://1t3xt.info/tutorials/keywords/ 


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] How to set the Height of a Line if a Image is inside the chunks

2010-02-18 Thread privat
Hello,

I tried to enclose a image to a chunk, but the spacing between the lines didn't 
rise.
here is my code:

/*
 * $Id: ImageChunks.java,v 1.3 2005/05/09 11:52:48 blowagie Exp $
 * $Name:  $
 *
 * This code is part of the 'iText Tutorial'.
 * You can find the complete tutorial at the following address:
 * http://itextdocs.lowagie.com/tutorial/
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * itext-questions@lists.sourceforge.net
 */
package com.lowagie.examples.objects.images;

import java.awt.Color;
import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Element;
import com.lowagie.text.Image;
import com.lowagie.text.Phrase;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter;
/**
 * Wrapping Images in a Chunk.
 */
public class ImageChunks {
/**
 * Images wrapped in a Chunk.
 * @param args no arguments needed
 */
public static void main(String[] args) {
Document.compress = false;
System.out.println(images wrapped in a Chunk);
// step 1: creation of a document-object
Document document = new Document();
try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
PdfWriter.getInstance(document, new 
FileOutputStream(c:/imageChunks.pdf));
// step 3: we open the document
document.open();
// step 4: we create a table and add it to the document
Image img = Image.getInstance(c:\\ims.jpg);
img.scaleToFit(50, 50);
Chunk ck = new Chunk(img, 0, -1);
   
PdfPTable table = new PdfPTable(3);
PdfPCell cell = new PdfPCell();
cell.addElement(new Chunk(img, 5, -5));
cell.setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(I see an image\non my right);
table.addCell(cell);
table.addCell(I see an image\non my left);
table.addCell(cell);
table.addCell(I see images\neverywhere);
table.addCell(cell);
table.addCell(I see an image\non my right);
table.addCell(cell);
table.addCell(I see an image\non my left);

Phrase p1 = new Phrase(This is an image );
p1.add(ck);
p1.add( just here.);
document.add(p1);
document.add(p1);
document.add(p1);
document.add(p1);
document.add(p1);
document.add(p1);
document.add(p1);
document.add(table);
}
catch(DocumentException de) {
System.err.println(de.getMessage());
}
catch(IOException ioe) {
System.err.println(ioe.getMessage());
}
// step 5: we close the document
document.close();
}
}

So how is it possible to set the linehight to the size of the image?
Thanks for your help.

best regards

Markus Sticker

imageChunks.pdf
Description: Adobe PDF document
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] How to set the Height of a Line if a Image is inside the chunks

2010-02-18 Thread privat
Hello,
thanks for your help.
Sorry that didn't see my misstake.
best regards

Markus sticker

- Original Message - 
From: 1T3XT info i...@1t3xt.info
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Thursday, February 18, 2010 7:24 PM
Subject: Re: [iText-questions] How to set the Height of a Line if a Image is 
inside the chunks


 pri...@samea.de wrote:
 Hello,

 I tried to enclose a image to a chunk, but the spacing between the lines
 didn't rise.

 Read the documentation!

 Chunk ck = new Chunk(img, 0, -1, true);

 -- 
 This answer is provided by 1T3XT BVBA
 http://www.1t3xt.com/ - http://www.1t3xt.info

 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php
 Check the site with examples before you ask questions: 
 http://www.1t3xt.info/examples/
 You can also search the keywords list: 
 http://1t3xt.info/tutorials/keywords/ 


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] SVG as a list-bullet

2010-02-17 Thread privat
Hello,

does somebody ever tried to set a svg as a list bullet?
Further has somebody ever tried to add a svg to a chunk?

So I tried to do this but I was not very successful, maybe somebody has an 
idea to do this well.

Here is the code which I has modified from the examples.
Thanks a lot.
Best Regards

Markus


---


package com.lowagie.examples.objects;

import java.awt.Graphics2D;

import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.renderable.RenderableImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.print.PrintTranscoder;

import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Font;
import com.lowagie.text.FontFactory;
import com.lowagie.text.Image;
import com.lowagie.text.List;
import com.lowagie.text.ListItem;
import com.lowagie.text.Paragraph;
import com.lowagie.text.html.HtmlWriter;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfTemplate;
import com.lowagie.text.pdf.PdfWriter;

/**
 * Demonstrates some List functionality.
 * 
 * @author blowagie
 */

public class Lists {

 /**
  * Demonstrates some List functionality.
  * 
  * @param args no arguments needed here
  */
 public static void main(String[] args) {

  System.out.println(the List object);

  // step 1: creation of a document-object
  Document document = new Document();
  try {
// step 2:
PdfWriter.getInstance(document, new 
FileOutputStream(c:\\lists.pdf));
HtmlWriter.getInstance(document, new 
FileOutputStream(c:\\lists.html));

// step 3: we open the document
document.open();

// step 4:
List list = new List(true, 20);
list.add(new ListItem(First line));
list.add(new ListItem(The second line is longer to see what 
happens once the end of the line is reached. Will it start on a new line?));
list.add(new ListItem(Third line));
document.add(list);

document.add(new Paragraph(some books I really like:));
ListItem listItem;
list = new List(true, 15);
listItem = new ListItem(When Harlie was one, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 12));
listItem.add(new Chunk( by David Gerrold, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 11, Font.ITALIC)));
list.add(listItem);
listItem = new ListItem(The World according to Garp, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 12));


Image img2; // = Image.getInstance(c:\\punkt_gruen_plus.png);
   img2 = svgToImg(c:\\punkt_gruen_plus.svg);



Chunk ck = new Chunk(img2, 0, 5/2, false);
   listItem.setListSymbol(ck );
listItem.add(new Chunk( by John Irving, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 11, Font.ITALIC)));
list.add(listItem);
listItem = new ListItem(Decamerone, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 12));
listItem.add(new Chunk( by Giovanni Boccaccio, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 11, Font.ITALIC)));
list.add(listItem);
document.add(list);

Paragraph paragraph = new Paragraph(some movies I really like:);
list = new List(false, 10);
list.add(Wild At Heart);
list.add(Casablanca);
list.add(When Harry met Sally);
list.add(True Romance);
list.add(Le mari de la coiffeuse);
paragraph.add(list);
document.add(paragraph);

document.add(new Paragraph(Some authors I really like:));
list = new List(false, 20);
list.setListSymbol(new Chunk(\u2022, 
FontFactory.getFont(FontFactory.HELVETICA, 20, Font.BOLD)));
listItem = new ListItem(Isaac Asimov);
list.add(listItem);
List sublist;
sublist = new List(false, true, 10);
sublist.setListSymbol(new Chunk(, 
FontFactory.getFont(FontFactory.HELVETICA, 8)));
sublist.add(The Foundation Trilogy);
sublist.add(The Complete Robot);
sublist.add(Caves of Steel);
sublist.add(The Naked Sun);
list.add(sublist);
listItem = new ListItem(John Irving);
list.add(listItem);
sublist = new List(false, true, 10);
sublist.setFirst('a');
sublist.setListSymbol(new Chunk(, 
FontFactory.getFont(FontFactory.HELVETICA, 8)));
sublist.add(The World according to Garp);
sublist.add(Hotel New Hampshire);
sublist.add(A prayer for Owen Meany);
sublist.add(Widow for a year);

Re: [iText-questions] SVG as a list-bullet

2010-02-17 Thread privat
I think there must be a possibility to add a SVG to a chunk.
I have found a solution with svgSalamander but it's not that way I like it.
Thanks for your help
best regards

Markus Sticker
  - Original Message - 
  From: Mark Storer 
  To: Post all your questions about iText here 
  Sent: Wednesday, February 17, 2010 6:17 PM
  Subject: Re: [iText-questions] SVG as a list-bullet


  I've used Batik to convert SVG to PDF using PdfGraphics2D, but never as a 
list bullet.

  If the .png version works, but the .svg doesn't, I recommend you test with an 
Image around a PdfTemplate from some Other Source... just throw a filled 
rectangle into a new PdfTemplate and see if that works.

  If that doesn't work, it's quite possible that there's a bug in iText's 
template-image-as-a-list-bullet code.

  Another thing to investigate is whether or not you can get that image to 
Appear At All.  Add it directly to the document.  If it doesn't show that way 
either, then something is wrong with the SVG-PDF translation.  It may be that 
the entire image is being clipped (wid/hei too small or any of several other 
reasons).  There are a number of different ways things can Go Wrong.  

  I recall that I had to do some extra work to get images to appear properly, 
but I was donig some under-the-hood stuff that may be handled automagically 
with PrintTranscoder.
  --Mark Storer 
Senior Software Engineer 
Cardiff.com

  #include disclaimer 
  typedef std::DisclaimerCardiff DisCard; 

-Original Message-
From: pri...@samea.de [mailto:pri...@samea.de]
Sent: Wednesday, February 17, 2010 8:30 AM
To: Post all your questions about iText here
Subject: [iText-questions] SVG as a list-bullet


Hello,

does somebody ever tried to set a svg as a list bullet?
Further has somebody ever tried to add a svg to a chunk?

So I tried to do this but I was not very successful, maybe somebody has an 
idea to do this well.

Here is the code which I has modified from the examples.
Thanks a lot.
Best Regards

Markus


---


package com.lowagie.examples.objects;

import java.awt.Graphics2D;

import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.renderable.RenderableImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.print.PrintTranscoder;

import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Font;
import com.lowagie.text.FontFactory;
import com.lowagie.text.Image;
import com.lowagie.text.List;
import com.lowagie.text.ListItem;
import com.lowagie.text.Paragraph;
import com.lowagie.text.html.HtmlWriter;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfTemplate;
import com.lowagie.text.pdf.PdfWriter;

/**
 * Demonstrates some List functionality.
 * 
 * @author blowagie
 */

public class Lists {

 /**
  * Demonstrates some List functionality.
  * 
  * @param args no arguments needed here
  */
 public static void main(String[] args) {

  System.out.println(the List object);

  // step 1: creation of a document-object
  Document document = new Document();
  try {
// step 2:
PdfWriter.getInstance(document, new 
FileOutputStream(c:\\lists.pdf));
HtmlWriter.getInstance(document, new 
FileOutputStream(c:\\lists.html));

// step 3: we open the document
document.open();

// step 4:
List list = new List(true, 20);
list.add(new ListItem(First line));
list.add(new ListItem(The second line is longer to see what 
happens once the end of the line is reached. Will it start on a new line?));
list.add(new ListItem(Third line));
document.add(list);

document.add(new Paragraph(some books I really like:));
ListItem listItem;
list = new List(true, 15);
listItem = new ListItem(When Harlie was one, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 12));
listItem.add(new Chunk( by David Gerrold, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 11, Font.ITALIC)));
list.add(listItem);
listItem = new ListItem(The World according to Garp, 
FontFactory.getFont(FontFactory.TIMES_ROMAN, 12));


Image img2; // = Image.getInstance(c:\\punkt_gruen_plus.png);
   img2 = svgToImg(c:\\punkt_gruen_plus.svg);



Chunk ck = new Chunk(img2, 0, 

[iText-questions] setAnchor on an image

2010-02-14 Thread privat
Hello everybody,

I was looking for an example for adding an anchor to an image,
but I didn't find something like this. 
So my question is have somebody done this before?

thanks and
best regards

Markus

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] setAnchor on an image

2010-02-14 Thread privat
Sorry, I was stupid:
image.setAnnotation(new Annotation(0, 0, 0, 0, 
http://www.lowagie.com/iText));

I found it in the examples of itext.

- Original Message - 
From: pri...@samea.de
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Sunday, February 14, 2010 5:00 PM
Subject: [iText-questions] setAnchor on an image


 Hello everybody,

 I was looking for an example for adding an anchor to an image,
 but I didn't find something like this.
 So my question is have somebody done this before?

 thanks and
 best regards

 Markus

 --
 SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-dev2dev
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php
 Check the site with examples before you ask questions: 
 http://www.1t3xt.info/examples/
 You can also search the keywords list: 
 http://1t3xt.info/tutorials/keywords/ 


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


[iText-questions] Probelms with merging Bookmarks

2010-01-15 Thread privat
Hello,

I have a probleme with merging Bookmarks.
If I try to merge two or more PDFs the Bookmarks are lost.

 CODE ---
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.lowagie.text.Document;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfImportedPage;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.pdf.SimpleBookmark;

public class mergePdf {


 public static void concatPDFs(ListInputStream streamOfPDFFiles,
   OutputStream outputStream, boolean paginate) {
  
  Document document = new Document();
  try {
   ListInputStream pdfs = streamOfPDFFiles;
   ListPdfReader readers = new ArrayListPdfReader();
   int totalPages = 0;
   int pageOffset = 0;
 ArrayList master = new ArrayList();
   IteratorInputStream iteratorPDFs = pdfs.iterator();

   // Create Readers for the pdfs.
   while (iteratorPDFs.hasNext()) {
InputStream pdf = iteratorPDFs.next();
PdfReader pdfReader = new PdfReader(pdf);
readers.add(pdfReader);
totalPages += pdfReader.getNumberOfPages();


   }
   // Create a writer for the outputstream
   PdfWriter writer = PdfWriter.getInstance(document, outputStream);

   document.open();
   BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
 BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
   PdfContentByte cb = writer.getDirectContent(); // Holds the PDF
   // data

   PdfImportedPage page;
   int currentPageNumber = 0;
   int pageOfCurrentReaderPDF = 0;
   IteratorPdfReader iteratorPDFReader = readers.iterator();

   // Loop through the PDF files and add to the output.
   while (iteratorPDFReader.hasNext()) {
PdfReader pdfReader = iteratorPDFReader.next();
List bookmarks = SimpleBookmark.getBookmark(pdfReader);
   
int n = pdfReader.getNumberOfPages();
if (bookmarks != null) {
 System.out.println(bookmarks);
if (pageOffset != 0)
SimpleBookmark.shiftPageNumbers(bookmarks, pageOffset, 
null);
master.addAll(bookmarks);
} else {
 
 System.out.println(no bookmarks);
}

pageOffset += n;

// Create a new page in the target for each source page.
while (pageOfCurrentReaderPDF  pdfReader.getNumberOfPages()) {
 document.newPage();
 pageOfCurrentReaderPDF++;
 currentPageNumber++;
 page = writer.getImportedPage(pdfReader,
   pageOfCurrentReaderPDF);
 cb.addTemplate(page, 0, 0);

 // Code for pagination.
 if (paginate) {
  if(!(currentPageNumber == 1 || totalPages == currentPageNumber)){
  cb.beginText();
  cb.setFontAndSize(bf, 9);
  cb.showTextAligned(PdfContentByte.ALIGN_CENTER, - 
+ currentPageNumber +  -  , 300,
10, 0);
  cb.endText();
  }
 }
}
pageOfCurrentReaderPDF = 0;
   }
   
   if (master.size()  0)   {
System.out.print(Add Bookmarks);
writer.setOutlines(master);

   }
   
   outputStream.flush();


   document.close();
   outputStream.close();
  } catch (Exception e) {
   e.printStackTrace();
  } finally {
   if (document.isOpen())
document.close();
   try {
if (outputStream != null)
 outputStream.close();
   } catch (IOException ioe) {
ioe.printStackTrace();
   }
  }
 }
}
-- CODE --

I also tryed the com.lowagie.examples.general.copystamp.concatenate.java
but there is also the same effect - no bookmarks.

Please tell me what I#m doing wrong.
Thanks for your help

best regards,

Markus



--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Re: [iText-questions] Probelms with merging Bookmarks

2010-01-15 Thread privat
Sorry, I fixed by my self.
  - Original Message - 
  From: pri...@samea.de 
  To: Post all your questions about iText here 
  Sent: Friday, January 15, 2010 6:35 PM
  Subject: [iText-questions] Probelms with merging Bookmarks


  Hello,

  I have a probleme with merging Bookmarks.
  If I try to merge two or more PDFs the Bookmarks are lost.

   CODE ---
  import java.io.FileInputStream;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;

  import com.lowagie.text.Document;
  import com.lowagie.text.pdf.BaseFont;
  import com.lowagie.text.pdf.PdfContentByte;
  import com.lowagie.text.pdf.PdfImportedPage;
  import com.lowagie.text.pdf.PdfReader;
  import com.lowagie.text.pdf.PdfWriter;
  import com.lowagie.text.pdf.SimpleBookmark;

  public class mergePdf {


   public static void concatPDFs(ListInputStream streamOfPDFFiles,
 OutputStream outputStream, boolean paginate) {

Document document = new Document();
try {
 ListInputStream pdfs = streamOfPDFFiles;
 ListPdfReader readers = new ArrayListPdfReader();
 int totalPages = 0;
 int pageOffset = 0;
   ArrayList master = new ArrayList();
 IteratorInputStream iteratorPDFs = pdfs.iterator();

 // Create Readers for the pdfs.
 while (iteratorPDFs.hasNext()) {
  InputStream pdf = iteratorPDFs.next();
  PdfReader pdfReader = new PdfReader(pdf);
  readers.add(pdfReader);
  totalPages += pdfReader.getNumberOfPages();
  
  
 }
 // Create a writer for the outputstream
 PdfWriter writer = PdfWriter.getInstance(document, outputStream);

 document.open();
 BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
   BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
 PdfContentByte cb = writer.getDirectContent(); // Holds the PDF
 // data

 PdfImportedPage page;
 int currentPageNumber = 0;
 int pageOfCurrentReaderPDF = 0;
 IteratorPdfReader iteratorPDFReader = readers.iterator();

 // Loop through the PDF files and add to the output.
 while (iteratorPDFReader.hasNext()) {
  PdfReader pdfReader = iteratorPDFReader.next();
  List bookmarks = SimpleBookmark.getBookmark(pdfReader);
 
  int n = pdfReader.getNumberOfPages();
  if (bookmarks != null) {
   System.out.println(bookmarks);
  if (pageOffset != 0)
  SimpleBookmark.shiftPageNumbers(bookmarks, 
pageOffset, null);
  master.addAll(bookmarks);
  } else {
   
   System.out.println(no bookmarks);
  }
  
  pageOffset += n;
  
  // Create a new page in the target for each source page.
  while (pageOfCurrentReaderPDF  pdfReader.getNumberOfPages()) {
   document.newPage();
   pageOfCurrentReaderPDF++;
   currentPageNumber++;
   page = writer.getImportedPage(pdfReader,
 pageOfCurrentReaderPDF);
   cb.addTemplate(page, 0, 0);

   // Code for pagination.
   if (paginate) {
if(!(currentPageNumber == 1 || totalPages == currentPageNumber)){
cb.beginText();
cb.setFontAndSize(bf, 9);
cb.showTextAligned(PdfContentByte.ALIGN_CENTER, - 
  + currentPageNumber +  -  , 300,
  10, 0);
cb.endText();
}
   }
  }
  pageOfCurrentReaderPDF = 0;
 }
 
 if (master.size()  0)   {
  System.out.print(Add Bookmarks);
  writer.setOutlines(master);
  
 }
 
 outputStream.flush();
  
  
 document.close();
 outputStream.close();
} catch (Exception e) {
 e.printStackTrace();
} finally {
 if (document.isOpen())
  document.close();
 try {
  if (outputStream != null)
   outputStream.close();
 } catch (IOException ioe) {
  ioe.printStackTrace();
 }
}
   }
  }
  -- CODE --

  I also tryed the com.lowagie.examples.general.copystamp.concatenate.java
  but there is also the same effect - no bookmarks.

  Please tell me what I#m doing wrong.
  Thanks for your help

  best regards,

  Markus






--


  --
  Throughout its 18-year history, RSA Conference consistently attracts the
  world's best and brightest in the field, creating opportunities for Conference
  attendees to learn about information security's most important issues through
  interactions with peers, luminaries and emerging and established companies.
  http://p.sf.net/sfu/rsaconf-dev2dev


--


  

Re: [iText-questions] CMYKColor on iText bug? PHOTOSHOP says it isa different color!

2009-10-09 Thread privat
Hi,

I had something simular.
It was something like the this:

you have to calculate the percentage to the scale of 0 - 256.
or maybe the scale 0 -256 to the percentage.

I have forgoten how it was.

br

markus


- Original Message - 
From: Hugo Flambó hfla...@gmail.com
To: itext-questions@lists.sourceforge.net
Sent: Friday, October 09, 2009 1:37 PM
Subject: Re: [iText-questions] CMYKColor on iText bug? PHOTOSHOP says it isa 
different color!


Just to add PDF generated sample

On Fri, Oct 9, 2009 at 12:25 PM, Hugo Flambó hfla...@gmail.com wrote:
 I use the iText AcroForms and AcroFields to fill it somo content from 
 iText
 I define the color:

 CMYKColor(0,76,76,70) and generated PDF seams to be ok but when I open
 the generated PDF on Photoshop it says that the color is
 CMYK(0,30,30,27) and the print result is not the one expected.

 Can someone help me and try to reproduce this issue? This seams to me
 to be a bug...

 Thanks in advance!

 BR

 Hugo







 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php
 Check the site with examples before you ask questions: 
 http://www.1t3xt.info/examples/
 You can also search the keywords list: 
 http://1t3xt.info/tutorials/keywords/ 


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/


Re: [iText-questions] CMYKColor on iText bug? PHOTOSHOP says it isadifferent color!

2009-10-09 Thread privat
Hi,

yes, I had such a problem but let me look what it was.
br

markus


- Original Message - 
From: Hugo Flambó hfla...@gmail.com
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Friday, October 09, 2009 3:17 PM
Subject: Re: [iText-questions] CMYKColor on iText bug? PHOTOSHOP says it 
isadifferent color!


Hi Markus thanks for de reply,

Can you be more specific please... what is meant to do? Convert the
values from CMYK to RGB?
I think CMYK values move from CMYKColor(0,0,0,0) till
CMYKColor(100,100,100,100) or with floats CMYKColor(0.0, 0.0, 0.0,
0.0) till CMYKColor(1.0, 1.0, 1.0, 1.0) instead class color that uses
the default as RGB Color(0, 0, 0) till Color(255, 255, 255)

Did you have done something similar?

Thanks in advance.

BR

 Hugo


On Fri, Oct 9, 2009 at 1:05 PM,  pri...@samea.de wrote:
 Hi,

 I had something simular.
 It was something like the this:

 you have to calculate the percentage to the scale of 0 - 256.
 or maybe the scale 0 -256 to the percentage.

 I have forgoten how it was.

 br

 markus


 - Original Message -
 From: Hugo Flambó hfla...@gmail.com
 To: itext-questions@lists.sourceforge.net
 Sent: Friday, October 09, 2009 1:37 PM
 Subject: Re: [iText-questions] CMYKColor on iText bug? PHOTOSHOP says it 
 isa
 different color!


 Just to add PDF generated sample

 On Fri, Oct 9, 2009 at 12:25 PM, Hugo Flambó hfla...@gmail.com wrote:
 I use the iText AcroForms and AcroFields to fill it somo content from
 iText
 I define the color:

 CMYKColor(0,76,76,70) and generated PDF seams to be ok but when I open
 the generated PDF on Photoshop it says that the color is
 CMYK(0,30,30,27) and the print result is not the one expected.

 Can someone help me and try to reproduce this issue? This seams to me
 to be a bug...

 Thanks in advance!

 BR

 Hugo




 


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference


 


 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php
 Check the site with examples before you ask questions:
 http://www.1t3xt.info/examples/
 You can also search the keywords list:
 http://1t3xt.info/tutorials/keywords/


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php
 Check the site with examples before you ask questions: 
 http://www.1t3xt.info/examples/
 You can also search the keywords list: 
 http://1t3xt.info/tutorials/keywords/


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ 


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
iText-questions mailing list
iText-questions@lists.sourceforge.net

[iText-questions] pdf to png or jpg

2009-06-24 Thread privat
Hi,

does somebody have a simple Skript for
konverting a PDF to png with iText.
Maybe this is possible with iText?

Thanks for your help

Markus

--
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

[iText-questions] iText Java Projekt Help needed - URGENT

2009-06-16 Thread privat
Hello,

I have a problem with iText and SAX.
But I think the problem is to komplex to
discust this in this forum. 

I try to parse xml to generate Tables,
but all the time I get the message 
java.lang.ClassCastException

Maybe somebody can help me with this
stuff.

Thanks

Markus
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

[iText-questions] PdfPTable: How to get a repeating Backgroundimage in a Cell

2009-02-12 Thread privat
Hi,

I tried to find a example of a PdfPTable with a repeating BackgroundImage, 
but I didn't find one.
Please send me a simple example of that. Thanks for your help.

Best regards

Markus 


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] Antwort: PdfPTable: How to get a repeating Backgroundimage in a Cell

2009-02-12 Thread privat
Hi,

Thanks for your help, but I didn't see how it works.
best regards

Markus

  - Original Message - 
  From: Benjamin Rein 
  To: Post all your questions about iText here 
  Sent: Thursday, February 12, 2009 4:04 PM
  Subject: [iText-questions] Antwort: PdfPTable: How to get a repeating 
Backgroundimage in a Cell



  Hi, 

  the class you're looking for is called PdfPTableEvent. 

  example (last one on this page): 
  http://stderr.org/doc/libitext-java-doc/www/tutorial/ch12.html 

  Best regards 
  Benjamin 


pri...@samea.de 
12.02.2009 12:30 Bitte antworten an
  Post all your questions about iText here 
itext-questions@lists.sourceforge.net 


   An Post all your questions about iText here 
itext-questions@lists.sourceforge.net  
  Kopie  
  Thema [iText-questions] PdfPTable: How to get a repeating 
Backgroundimagein a Cell 

  

   



  Hi,

  I tried to find a example of a PdfPTable with a repeating BackgroundImage, 
  but I didn't find one.
  Please send me a simple example of that. Thanks for your help.

  Best regards

  Markus 


  --
  Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
  software. With Adobe AIR, Ajax developers can use existing skills and code to
  build responsive, highly engaging applications that combine the power of local
  resources and data with the reach of the web. Download the Adobe AIR SDK and
  Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
  ___
  iText-questions mailing list
  iText-questions@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/itext-questions

  Buy the iText book: http://www.1t3xt.com/docs/book.php





  

  Viessmann IT Service GmbH
  Geschäftsführer: Dirk Klöckner, Dr. Harald Dörnbach
  Sitz der Gesellschaft: Allendorf (Eder) - Registergericht: 
  AG Marburg (Lahn) - HRB 5324 - USt-IdNr.: DE258558424
  



--


  --
  Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
  software. With Adobe AIR, Ajax developers can use existing skills and code to
  build responsive, highly engaging applications that combine the power of local
  resources and data with the reach of the web. Download the Adobe AIR SDK and
  Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com


--


  ___
  iText-questions mailing list
  iText-questions@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/itext-questions

  Buy the iText book: http://www.1t3xt.com/docs/book.php--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Re: [iText-questions] Antwort: PdfPTable: How to get a repeatingBackgroundimage in a Cell

2009-02-12 Thread privat
Hi,

Can somebody tell me that this may work?

import java.io.FileOutputStream;

import java.io.IOException;

import java.net.MalformedURLException;


import com.lowagie.text.BadElementException;

import com.lowagie.text.Document;

import com.lowagie.text.DocumentException;

import com.lowagie.text.Element;

import com.lowagie.text.Image;

import com.lowagie.text.Phrase;

import com.lowagie.text.Rectangle;

import com.lowagie.text.pdf.GrayColor;

import com.lowagie.text.pdf.PdfContentByte;

import com.lowagie.text.pdf.PdfPCell;

import com.lowagie.text.pdf.PdfPCellEvent;

import com.lowagie.text.pdf.PdfPTable;

import com.lowagie.text.pdf.PdfWriter;


class RoundRectangle implements PdfPCellEvent {

public void cellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] canvas) {

PdfContentByte cb = canvas[PdfPTable.BACKGROUNDCANVAS];

try {


cb.addImage(Image.getInstance(media/grad.jpg), rect.getWidth(), 0,

0, rect.getHeight(),

rect.left(), rect.getTop() - rect.getHeight());


} catch (BadElementException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (MalformedURLException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (DocumentException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}



}

}


public class TableCellBackground {


public static void main(String[] args) throws Exception {

Document document = new Document();

PdfWriter.getInstance(document, new FileOutputStream(c:/grad.pdf));

document.open();

RoundRectangle border = new RoundRectangle();


PdfPTable table = new PdfPTable(6);

PdfPCell cell;

for (int i = 1; i = 30; i++) {

cell = new PdfPCell(new Phrase(day  + i));

cell.setHorizontalAlignment(Element.ALIGN_CENTER);

cell.setBorder(Rectangle.NO_BORDER);

cell.setPadding(4);

cell.setCellEvent(border);

table.addCell(cell);

}

document.add(table);

document.close();

}

}

  - Original Message - 
  From: pri...@samea.de 
  To: Post all your questions about iText here 
  Sent: Thursday, February 12, 2009 4:12 PM
  Subject: Re: [iText-questions] Antwort: PdfPTable: How to get a 
repeatingBackgroundimage in a Cell


  Hi,

  Thanks for your help, but I didn't see how it works.
  best regards

  Markus

- Original Message - 
From: Benjamin Rein 
To: Post all your questions about iText here 
Sent: Thursday, February 12, 2009 4:04 PM
Subject: [iText-questions] Antwort: PdfPTable: How to get a repeating 
Backgroundimage in a Cell



Hi, 

the class you're looking for is called PdfPTableEvent. 

example (last one on this page): 
http://stderr.org/doc/libitext-java-doc/www/tutorial/ch12.html 

Best regards 
Benjamin 


  pri...@samea.de 
  12.02.2009 12:30 Bitte antworten an
Post all your questions about iText here 
itext-questions@lists.sourceforge.net 


 An Post all your questions about iText here 
itext-questions@lists.sourceforge.net  
Kopie  
Thema [iText-questions] PdfPTable: How to get a repeating 
Backgroundimagein a Cell 



 



Hi,

I tried to find a example of a PdfPTable with a repeating BackgroundImage, 
but I didn't find one.
Please send me a simple example of that. Thanks for your help.

Best regards

Markus 



--
Create and Deploy Rich Internet Apps outside the browser with 
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code 
to
build responsive, highly engaging applications that combine the power of 
local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php







Viessmann IT Service GmbH
Geschäftsführer: Dirk Klöckner, Dr. Harald Dörnbach
Sitz der Gesellschaft: Allendorf (Eder) - Registergericht: 
AG Marburg (Lahn) - HRB 5324 - USt-IdNr.: DE258558424








--
Create and Deploy Rich Internet Apps outside the browser with 
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code 
to
build responsive, highly engaging applications that combine the power of 
local
resources and data with the 

[iText-questions] Extracting Drawings from a PDF and storing it to another

2009-02-04 Thread privat
Hello,

Does anybody know how to exract a drawing form an existing pdf?
Further putting it to an other.

Thanks for your help.
best regards

Markus

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] Extracting Drawings from a PDF and storing it to another

2009-02-04 Thread privat
I have vectors in my PDF-Source.

- Original Message - 
From: Leonard Rosenthol lrose...@adobe.com
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Wednesday, February 04, 2009 2:40 PM
Subject: Re: [iText-questions] Extracting Drawings from a PDF and storing it 
to another


 Batik can produce both raster-based and vector-based images in PDF.  It 
 also, unfortunately, doesn't mark off it's areas so that it's difficult to 
 find where that stops and other content begins :(.

 Leonard


 On 2/4/09 1:21 PM, pri...@samea.de pri...@samea.de wrote:

 It's a Drwaing made from a svg done with batik.
 .. very deep

 Thanks

 Markus
 - Original Message -
 From: 1T3XT info i...@1t3xt.info
 To: Post all your questions about iText here
 itext-questions@lists.sourceforge.net
 Sent: Wednesday, February 04, 2009 2:14 PM
 Subject: Re: [iText-questions] Extracting Drawings from a PDF and storing 
 it
 to another


 pri...@samea.de wrote:
 Hello,

 Does anybody know how to exract a drawing form an existing pdf?
 Further putting it to an other.

 This is a typical How deep is blue? question.

 You're not telling us if the drawing is an image (vector or raster).

 Or if the drawing is made using pure PDF syntax, for instance like this:

 1 J
 12 w
 120 120 m
 97.91 120 80 102.09 80 80 c
 80 57.91 97.91 40 120 40 c
 125 80 m
 125 82.76 122.76 85 120 85 c
 117.24 85 115 82.76 115 80 c
 115 77.24 117.24 75 120 75 c
 122.76 75 125 77.24 125 80 c
 S

 (This is part of the drawing of the eye in the iText logo.)

 Maybe you're asking how to take an existing page, clip it and
 copy it to another PDF.

 In any case, Markus: your question is very unclear. Because of the way
 you phrase it, I'll also be reluctant to answer it, for instance if you
 say the drawing is made using pure PDF syntax. Something tells me I'm
 going to lose too much of my valuable time if I need to explain you how
 you could reuse that PDF syntax (because it's not that obvious).
 --
 This answer is provided by 1T3XT BVBA
 http://www.1t3xt.com/ - http://www.1t3xt.info

 --
 Create and Deploy Rich Internet Apps outside the browser with
 Adobe(R)AIR(TM)
 software. With Adobe AIR, Ajax developers can use existing skills and 
 code
 to
 build responsive, highly engaging applications that combine the power of
 local
 resources and data with the reach of the web. Download the Adobe AIR SDK
 and
 Ajax docs to start building applications
 today-http://p.sf.net/sfu/adobe-com
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php


 --
 Create and Deploy Rich Internet Apps outside the browser with 
 Adobe(R)AIR(TM)
 software. With Adobe AIR, Ajax developers can use existing skills and code 
 to
 build responsive, highly engaging applications that combine the power of 
 local
 resources and data with the reach of the web. Download the Adobe AIR SDK 
 and
 Ajax docs to start building applications 
 today-http://p.sf.net/sfu/adobe-com
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php


 --
 Leonard Rosenthol
 PDF Standards Architect
 Adobe Systems Incorporated

 --
 Create and Deploy Rich Internet Apps outside the browser with 
 Adobe(R)AIR(TM)
 software. With Adobe AIR, Ajax developers can use existing skills and code 
 to
 build responsive, highly engaging applications that combine the power of 
 local
 resources and data with the reach of the web. Download the Adobe AIR SDK 
 and
 Ajax docs to start building applications 
 today-http://p.sf.net/sfu/adobe-com
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php 


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy 

Re: [iText-questions] Extracting Drawings from a PDF and storing it to another

2009-02-04 Thread privat
It's a Drwaing made from a svg done with batik.
.. very deep

Thanks

Markus
- Original Message - 
From: 1T3XT info i...@1t3xt.info
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Wednesday, February 04, 2009 2:14 PM
Subject: Re: [iText-questions] Extracting Drawings from a PDF and storing it 
to another


 pri...@samea.de wrote:
 Hello,

 Does anybody know how to exract a drawing form an existing pdf?
 Further putting it to an other.

 This is a typical How deep is blue? question.

 You're not telling us if the drawing is an image (vector or raster).

 Or if the drawing is made using pure PDF syntax, for instance like this:

 1 J
 12 w
 120 120 m
 97.91 120 80 102.09 80 80 c
 80 57.91 97.91 40 120 40 c
 125 80 m
 125 82.76 122.76 85 120 85 c
 117.24 85 115 82.76 115 80 c
 115 77.24 117.24 75 120 75 c
 122.76 75 125 77.24 125 80 c
 S

 (This is part of the drawing of the eye in the iText logo.)

 Maybe you're asking how to take an existing page, clip it and
 copy it to another PDF.

 In any case, Markus: your question is very unclear. Because of the way
 you phrase it, I'll also be reluctant to answer it, for instance if you
 say the drawing is made using pure PDF syntax. Something tells me I'm
 going to lose too much of my valuable time if I need to explain you how
 you could reuse that PDF syntax (because it's not that obvious).
 -- 
 This answer is provided by 1T3XT BVBA
 http://www.1t3xt.com/ - http://www.1t3xt.info

 --
 Create and Deploy Rich Internet Apps outside the browser with 
 Adobe(R)AIR(TM)
 software. With Adobe AIR, Ajax developers can use existing skills and code 
 to
 build responsive, highly engaging applications that combine the power of 
 local
 resources and data with the reach of the web. Download the Adobe AIR SDK 
 and
 Ajax docs to start building applications 
 today-http://p.sf.net/sfu/adobe-com
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Buy the iText book: http://www.1t3xt.com/docs/book.php 


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


[iText-questions] SGV and iText

2009-01-14 Thread privat
Hello,

Does anybody know how to handle SVG in iText?
Thanks for your help.

best regards

Markus--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

[iText-questions] Keeping images untouched from compession

2009-01-14 Thread privat
Hello,

Does anybody know how to keep the orginal image.
I tried to insert a image but it was compressed by imageio.
Thanks for your help.

best regards

Markus--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

[iText-questions] Problems with CData Tag in JSP

2008-07-21 Thread privat
Hello,

I have a problem with the cdata-tag.
I use a string for building a XML and if I use the 
cdata-tag and I send it to the screen the CDATA-Tag is removed.

I need this CData Tag for having dynamic content with chars like .
What can I do to solve this?

Thanks

Markus

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
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


Re: [iText-questions] Problems with CData Tag in JSP

2008-07-21 Thread privat
I use some xsl to format content to pdf (itext)
The content it self is xml. Generated by some users.

- Original Message - 
From: 1T3XT info [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Monday, July 21, 2008 5:09 PM
Subject: Re: [iText-questions] Problems with CData Tag in JSP


 [EMAIL PROTECTED] wrote:
 Hello,

 I have a problem with the cdata-tag.
 I use a string for building a XML and if I use the
 cdata-tag and I send it to the screen the CDATA-Tag is removed.

 I need this CData Tag for having dynamic content with chars like .
 What can I do to solve this?

 I fail to see the link with iText.
 I fear you posted this to the wrong mailing list.
 -- 
 This answer is provided by 1T3XT BVBA

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's 
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great 
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the 
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
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


[iText-questions] Working with XML

2008-01-29 Thread privat
Hello everybody,

i tried to work with 2 xml-files.
The first one (http://www.x-fo.net/itext/content1.xml) has
the whole content of the whole pdf, and the referer to
the layout (layout=Layout1.xml).

The second (http://www.x-fo.net/itext/Layout1.xml) has
the format for one page.

So I tried to build a output (http://www.x-fo.net/itext/output.txt) class
which shoud first call the content. Then it should call the format. And 
after that
it should place the formated content to the writer.

Does anybody have an idea how to do that?
Thanks

Markus 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Urgent project help needed

2008-01-24 Thread privat
Hello all,

I need urgent help with a project.
I need something like a xml-Tagmapper.
Thank you.

Markus

- Original Message - 
From: Bruno Lowagie [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Thursday, January 24, 2008 10:24 AM
Subject: Re: [iText-questions] Problem with inner tables!


 Eric Summkeller wrote:
 I would like to set a left indent of an inner table.

 Have you tried changing with the padding?
 br,
 Bruno

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/ 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] URGENT Help needed !!

2008-01-24 Thread privat
Hello,

I'm looking for somebody who is able to help me.
I need help for ym project.

its about 2 xml-structures and 1 tagmap.

I have to build a servlet which can pick up different frames (pdf-Templates) 
and adds some Content by using 2 XML-Structures.

The frist structure is: How is the Conent-Layout (8 simple Layouts).
The second is: The Content (text, table, image, anination, movie)

As Result there should be any pages in one presentation.
As final step all content (pdf, animations, movies) must be packed into a 
zip-Files for download.

This is it.

with kind regards

Markus-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Problem: Stamper and Annotatio n for embeding a SWF doen´t work right

2008-01-22 Thread privat
Hello,

I'm still searching for the couse of the problem,
that the acrobat alert for the multimedia content, but
nothing is shown. It seems that the swf get´s hidden or something.

Does anybody have an idea why this happens?
Thank you.

Markus


- Original Message - 
From: [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Monday, January 21, 2008 9:22 AM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF


Hello,

Yes, that's correct. The behavior is right, but
the swf is not shown.

If I use the (simple) Annotation on a new build PDF, the
annimation is working. If I use the PDFstamper the annimation is hidden.

Thanks for your help

Markus
- Original Message - 
From: Leonard Rosenthol [EMAIL PROTECTED]
To: Post all your questions about iText here
itext-questions@lists.sourceforge.net
Sent: Sunday, January 20, 2008 5:45 AM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF


What do you mean Acrobat asks for playing multimedia content?   Are
you saying that Acrobat brings up a security alert asking for
permission to play the media that you've embedded?  If so, that is
correct and expected behavior.

Leonard

On Jan 19, 2008, at 8:58 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hello,

 I tried this:

 PdfFileSpecification fs =
 PdfFileSpecification.fileEmbedded(stamper.getWriter(),

 demo1.swf, demo1.swf, null);


 stamper.addAnnotation(PdfAnnotation.createScreen(stamper.getWriter(),

 new Rectangle(pageunits.mm(60), pageunits.mm(60), pageunits.mm(60),
 pageunits.mm(60)), Fox and Dog, fs,

 application/x-shockwave-flash, true), 1);



 But it also doesn't work,  but the acrobat asks for
 playing multimedia-content.

 Maybe there is a Problem with the visibility?
 Thank you

 Markus

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Post all your questions about iText here
 itext-questions@lists.sourceforge.net
 Sent: Saturday, January 19, 2008 3:51 PM
 Subject: Re: [iText-questions] Stamper and Annotation for embeding
 a SWF


 Hello,

 I'm using PDFStamper but it seem so that it doesn´t
 work with PDFAnnotation just Annotation works fine.

 How can I put a Annotation to the PDFStamper?

 Markus

 - Original Message -
 From: Paulo Soares [EMAIL PROTECTED]
 To: Post all your questions about iText here
 itext-questions@lists.sourceforge.net
 Sent: Friday, January 18, 2008 7:32 PM
 Subject: Re: [iText-questions] Stamper and Annotation for embeding
 a SWF




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Friday, January 18, 2008 6:22 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Stamper and Annotation for
 embeding a SWF

 There is no exception.

 Yes there is. It should read Unsupported in this context. Use
 PdfStamper.addAnnotation().

 Paulo


 Aviso Legal:
 Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
 informação confidencial ou legalmente protegida. A incorrecta
 transmissão
 desta mensagem não significa a perca de confidencialidade. Se esta
 mensagem
 for recebida por engano, por favor envie-a de volta para o remetente e
 apague-a do seu sistema de imediato. É proibido a qualquer pessoa
 que não o
 destinatário de usar, revelar ou distribuir qualquer parte desta
 mensagem.

 Disclaimer:
 This message is destined exclusively to the intended receiver. It may
 contain confidential or legally protected information. The incorrect
 transmission of this message does not mean the loss of its
 confidentiality.
 If this message is received by mistake, please send it back to the
 sender
 and delete it from your system immediately. It is forbidden to any
 person
 who is not the intended receiver to use, distribute or copy any
 part of this
 message.





 -- 
 --


 - 
 
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/


 -- 
 --


 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/



 -- 
 ---
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: 

Re: [iText-questions] Problem: Stamper and Annotatio n for embeding a SWF doen´t work right

2008-01-22 Thread privat
import java.io.BufferedReader;

import java.io.FileOutputStream;

import java.io.FileReader;


import com.lowagie.text.Annotation;

import com.lowagie.text.Document;

import com.lowagie.text.Element;

import com.lowagie.text.Image;

import com.lowagie.text.PageSize;

import com.lowagie.text.Phrase;

import com.lowagie.text.Rectangle;

import com.lowagie.text.TextElementArray;

import com.lowagie.text.pdf.BaseFont;

import com.lowagie.text.pdf.ColumnText;

import com.lowagie.text.pdf.PdfAnnotation;

import com.lowagie.text.pdf.PdfContentByte;

import com.lowagie.text.pdf.PdfCopy;

import com.lowagie.text.pdf.PdfFileSpecification;

import com.lowagie.text.pdf.PdfReader;

import com.lowagie.text.pdf.PdfStamper;

import com.lowagie.text.pdf.PdfWriter;


import de.mwag.pageunits;




public class image {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

try {

// we create a PdfReader object

PdfReader reader = new PdfReader(template2.pdf);

// step 1

Document document = new Document(reader.getPageSize(1));


// step 2

//PdfCopy copy = new PdfCopy(document, new FileOutputStream(t123.pdf));

//copy.addPage(copy.getImportedPage(reader, 1));

// step 3

// document.open();

// step 4

System.out.println(Tampered?  + reader.isTampered());

// copy.addPage(copy.getImportedPage(reader, 1));

PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(

z123.pdf));

stamper.getWriter().setPdfVersion(PdfWriter.VERSION_1_7);

PdfContentByte over;

over = stamper.getOverContent(1);

over.beginText();

BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,

BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);

over.setFontAndSize(bf, 18);

over.moveText(0, -20);

over.setTextMatrix(pageunits.mm(30), pageunits.mm(80));

over.showText(HuLLO Alle );

over.endText();

//### BILD ###

/* Image pic = Image.getInstance(0D22.jpg);

pic.scaleToFit(200, 200);

pic.setAbsolutePosition(pageunits.mm(60), pageunits.mm(60));

over.addImage(pic);


// ### Video ###

/* PdfFileSpecification fs = 
PdfFileSpecification.fileEmbedded(stamper.getWriter(),

foxdog.mpg, foxdog.mpg, null);


stamper.addAnnotation(PdfAnnotation.createScreen(stamper.getWriter(),

new Rectangle(pageunits.mm(160), pageunits.mm(160), pageunits.mm(160), 
pageunits.mm(160)), Fox and Dog, fs,

video/mpeg, true), 1);

*/


// ### Video ###

PdfContentByte cb2 = over;

Annotation a5 = new Annotation(pageunits.mm(160), pageunits.mm(160), 
pageunits.mm(160), pageunits.mm(160), demo1.swf, 
application/x-shockwave-flash, true);

cb2.rectangle(100, 700, 100, 100);


stamper.getWriter().add(a5);




PdfFileSpecification fs = 
PdfFileSpecification.fileEmbedded(stamper.getWriter(),

demo1.swf, demo1.swf, null);


stamper.addAnnotation(PdfAnnotation.createScreen(stamper.getWriter(),

new Rectangle(pageunits.mm(60), pageunits.mm(60), pageunits.mm(60), 
pageunits.mm(60)), Fox and Dog, fs,

application/x-shockwave-flash, true), 1);



// # Spalten #


StringBuffer sb = new StringBuffer(1024);

BufferedReader reader2 = new BufferedReader(new FileReader(

caesar.txt));

int c;

while ((c = reader2.read())  -1) {

sb.append((char) c);

}

reader.close();

ColumnText ct = new ColumnText(over);

ct.setLeading(30);

ct.setAlignment(Element.ALIGN_JUSTIFIED);

ct.setText(new Phrase(sb.toString()));


float[] left = { 36, (400 / 2) + 18 };

float[] right = { (400 / 2) - 18,

PageSize.A4.getWidth() - 36 };

int status = ColumnText.START_COLUMN;

int column = 0;

while (ColumnText.hasMoreText(status)) {

ct.setSimpleColumn(left[column], 36, right[column], 
PageSize.A4.getHeight() - 36);

status = ct.go();

column++;

if (column  1) {

column = 0;


}

}



// stamper.insertPage(3, PageSize.A4);

// copy.close();

// document.close();

stamper.close();


} catch (Exception e){

e.printStackTrace();

}

}


}



-- pageunits.mm  converts millimeter it pt





- Original Message - 
From: Bruno Lowagie [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Tuesday, January 22, 2008 1:13 PM
Subject: Re: [iText-questions] Problem: Stamper and Annotation for embeding 
a SWF doen´t work right


 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 


-
This SF.net 

Re: [iText-questions] Problem: Stamper and Annotatio n for embeding a SWF doen´t work right

2008-01-22 Thread privat
Hello Mr. Lowagie,

Ok. I've done what you have told me.
I have placed the PDF and the Demo1.swf
here:

http://www.samea.de/jan/demo1.swf
http://www.samea.de/jan/z123.pdf

I'm using the Adobe Acrobat 8.1.1. German.
Whatelse can I do to get your help?

Thank you

Markus



- Original Message - 
From: Bruno Lowagie [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Tuesday, January 22, 2008 1:40 PM
Subject: Re: [iText-questions] Problem: Stamper and Annotation for embeding 
a SWF doen´t work right


 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Problem: Stamper and Annotatio n for embeding a SWF doen´t work right

2008-01-22 Thread privat
Thank you. I was so stupid.
Now it work fine.

Markus
- Original Message - 
From: Bruno Lowagie [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Tuesday, January 22, 2008 3:40 PM
Subject: Re: [iText-questions] Problem: Stamper and Annotation for embeding 
a SWF doen´t work right


 [EMAIL PROTECTED] wrote:
 Hello Mr. Lowagie,

 Ok. I've done what you have told me.
 I have placed the PDF and the Demo1.swf
 here:

 http://www.samea.de/jan/demo1.swf
 http://www.samea.de/jan/z123.pdf

 I'm using the Adobe Acrobat 8.1.1. German.
 Whatelse can I do to get your help?
 You should have done this in the first place.
 Please read page 606 of the PDF Reference.
 It lists the keys needed in an Annotation dictionary (/Type /Annot).
 One of these keys is /Rect: rectangle; (Required) The annotation 
 rectangle,
 defining the location of the annotation on the page in default user
 space units.

 Now look at the object with number 5 in your PDF (see RUPS screenshot):
 it has a key /Rect with value [170.12, 170.12, 170.12, 170.12]

 This means you have created a dimensionless annotation!!!
 Now it makes sense for me to have a look at your code because I know
 where to look, more specifically here: new Rectangle(pageunits.mm(160),
 pageunits.mm(160), pageunits.mm(160), pageunits.mm(160))

 Please have a look at the constructor of Rectangle:
 http://itext.ugent.be/library/api/com/lowagie/text/Rectangle.html

 It needs two coordinates. If you use two identical coordinates,
 you have a width and a height equal to 0...
 I hope you now understand why you didn't get an answer.
 Nobody expected you'd want to create a dimensionless annotation.
 br,
 Bruno






 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Stamper and Annotation for embeding a SWF

2008-01-21 Thread privat
Hello,

Yes, that's correct. The behavior is right, but
the swf is not shown.

If I use the (simple) Annotation on a new build PDF, the
annimation is working. If I use the PDFstamper the annimation is hidden.

Thanks for your help

Markus
- Original Message - 
From: Leonard Rosenthol [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Sunday, January 20, 2008 5:45 AM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF


What do you mean Acrobat asks for playing multimedia content?   Are
you saying that Acrobat brings up a security alert asking for
permission to play the media that you've embedded?  If so, that is
correct and expected behavior.

Leonard

On Jan 19, 2008, at 8:58 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hello,

 I tried this:

 PdfFileSpecification fs =
 PdfFileSpecification.fileEmbedded(stamper.getWriter(),

 demo1.swf, demo1.swf, null);


 stamper.addAnnotation(PdfAnnotation.createScreen(stamper.getWriter(),

 new Rectangle(pageunits.mm(60), pageunits.mm(60), pageunits.mm(60),
 pageunits.mm(60)), Fox and Dog, fs,

 application/x-shockwave-flash, true), 1);



 But it also doesn't work,  but the acrobat asks for
 playing multimedia-content.

 Maybe there is a Problem with the visibility?
 Thank you

 Markus

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Post all your questions about iText here
 itext-questions@lists.sourceforge.net
 Sent: Saturday, January 19, 2008 3:51 PM
 Subject: Re: [iText-questions] Stamper and Annotation for embeding
 a SWF


 Hello,

 I'm using PDFStamper but it seem so that it doesn´t
 work with PDFAnnotation just Annotation works fine.

 How can I put a Annotation to the PDFStamper?

 Markus

 - Original Message -
 From: Paulo Soares [EMAIL PROTECTED]
 To: Post all your questions about iText here
 itext-questions@lists.sourceforge.net
 Sent: Friday, January 18, 2008 7:32 PM
 Subject: Re: [iText-questions] Stamper and Annotation for embeding
 a SWF




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Friday, January 18, 2008 6:22 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Stamper and Annotation for
 embeding a SWF

 There is no exception.

 Yes there is. It should read Unsupported in this context. Use
 PdfStamper.addAnnotation().

 Paulo


 Aviso Legal:
 Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
 informação confidencial ou legalmente protegida. A incorrecta
 transmissão
 desta mensagem não significa a perca de confidencialidade. Se esta
 mensagem
 for recebida por engano, por favor envie-a de volta para o remetente e
 apague-a do seu sistema de imediato. É proibido a qualquer pessoa
 que não o
 destinatário de usar, revelar ou distribuir qualquer parte desta
 mensagem.

 Disclaimer:
 This message is destined exclusively to the intended receiver. It may
 contain confidential or legally protected information. The incorrect
 transmission of this message does not mean the loss of its
 confidentiality.
 If this message is received by mistake, please send it back to the
 sender
 and delete it from your system immediately. It is forbidden to any
 person
 who is not the intended receiver to use, distribute or copy any
 part of this
 message.





 -- 
 --


 - 
 
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/


 -- 
 --


 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/



 -- 
 ---
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/


 -- 
 ---
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/




Re: [iText-questions] Stamper and Annotation for embeding a SWF

2008-01-19 Thread privat
Hello,

I'm using PDFStamper but it seem so that it doesn´t
work with PDFAnnotation just Annotation works fine.

How can I put a Annotation to the PDFStamper?

Markus

- Original Message - 
From: Paulo Soares [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Friday, January 18, 2008 7:32 PM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Friday, January 18, 2008 6:22 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Stamper and Annotation for
 embeding a SWF

 There is no exception.

Yes there is. It should read Unsupported in this context. Use
PdfStamper.addAnnotation().

Paulo


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão 
desta mensagem não significa a perca de confidencialidade. Se esta mensagem 
for recebida por engano, por favor envie-a de volta para o remetente e 
apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o 
destinatário de usar, revelar ou distribuir qualquer parte desta mensagem.

Disclaimer:
This message is destined exclusively to the intended receiver. It may 
contain confidential or legally protected information. The incorrect 
transmission of this message does not mean the loss of its confidentiality. 
If this message is received by mistake, please send it back to the sender 
and delete it from your system immediately. It is forbidden to any person 
who is not the intended receiver to use, distribute or copy any part of this 
message.








 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Stamper and Annotation for embeding a SWF

2008-01-19 Thread privat
Hello,

I tried this:

PdfFileSpecification fs = 
PdfFileSpecification.fileEmbedded(stamper.getWriter(),

demo1.swf, demo1.swf, null);


stamper.addAnnotation(PdfAnnotation.createScreen(stamper.getWriter(),

new Rectangle(pageunits.mm(60), pageunits.mm(60), pageunits.mm(60), 
pageunits.mm(60)), Fox and Dog, fs,

application/x-shockwave-flash, true), 1);



But it also doesn't work,  but the acrobat asks for
playing multimedia-content.

Maybe there is a Problem with the visibility?
Thank you

Markus

- Original Message - 
From: [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Saturday, January 19, 2008 3:51 PM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF


Hello,

I'm using PDFStamper but it seem so that it doesn´t
work with PDFAnnotation just Annotation works fine.

How can I put a Annotation to the PDFStamper?

Markus

- Original Message - 
From: Paulo Soares [EMAIL PROTECTED]
To: Post all your questions about iText here
itext-questions@lists.sourceforge.net
Sent: Friday, January 18, 2008 7:32 PM
Subject: Re: [iText-questions] Stamper and Annotation for embeding a SWF




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Friday, January 18, 2008 6:22 PM
 To: Post all your questions about iText here
 Subject: Re: [iText-questions] Stamper and Annotation for
 embeding a SWF

 There is no exception.

Yes there is. It should read Unsupported in this context. Use
PdfStamper.addAnnotation().

Paulo


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão
desta mensagem não significa a perca de confidencialidade. Se esta mensagem
for recebida por engano, por favor envie-a de volta para o remetente e
apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o
destinatário de usar, revelar ou distribuir qualquer parte desta mensagem.

Disclaimer:
This message is destined exclusively to the intended receiver. It may
contain confidential or legally protected information. The incorrect
transmission of this message does not mean the loss of its confidentiality.
If this message is received by mistake, please send it back to the sender
and delete it from your system immediately. It is forbidden to any person
who is not the intended receiver to use, distribute or copy any part of this
message.








 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/ 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Stamper and Annotation for embeding a SWF

2008-01-18 Thread privat
Hello,
I have a problem with the simple annotation and the stamper function.
I want to add a swf to my PDF. I used this simple annotation like shown
in the tutorial.

-- PdfContentByte cb2 = writer2.getDirectContent();
  Annotation a5 = new Annotation(100f, 700f, 200f, 800f, 
chapter15/resources/demo1.swf, application/x-shockwave-flash, true);

This works already fine.
Now I tried to use the stamper.
But it doesn´t work.
Please help me:

PdfReader reader = new PdfReader(template.pdf);
Document document = new Document(reader.getPageSize(1));
PdfStamper stamper = new PdfStamper(reader, new
FileOutputStream(z123.pdf));
stamper.getWriter().setPdfVersion(PdfWriter.VERSION_1_7);
PdfContentByte over;
over = stamper.getOverContent(1);
PdfContentByte cb2 = over;
Annotation a5 = new Annotation(pageunits.mm(160), pageunits.mm(160),
pageunits.mm(160), pageunits.mm(160),
demo1.swf, application/x-shockwave-flash, true);
cb2.rectangle(100, 700, 100, 100);
//stamper.getWriter().add(a5);
stamper.getOverContent(1).getPdfWriter().add(a5);

thanks for your help.
Markus 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/