Re: [iText-questions] Page By Page Rendering

2006-02-24 Thread Bharath
Found a solution for the same. when we use BYTEARRAYOUTPUTSTREAM  it is holding the document in Memory. But changed it by writing a CustomBufferedOutputStream
extended from BufferedOutputStream. Additionally exposed the count method of the same. Now for the file size used the count method. Sample file is 
attached.Let me know of your thoughts. This stopped the application from holding up larger memory since the output is buffered.Please let me know of your thoughts on the sameRegardsBharath
On 2/6/06, Bharath <[EMAIL PROTECTED]> wrote:
Thanks for the detailed explanation. So My feeling that the BYTEARRAYOUTPUTSTREAM is what is causing the problem is TRUE. The outputstream need to be Byte Array since the application runs on

 IE only. :(
 
Is there any other big object in the PDF renderer other than the BYTEARRAYOUTPUTSTREAM that can be so huge  which I can free without harming anything?
 
Now I liked the FileOutputStream option but need to discuss with our customers on this before implementing the same if that seems to be the only go.
 
Regards
Bharath
 
On 2/6/06, Bruno Lowagie <[EMAIL PROTECTED]> wrote:

Bharath wrote:> Ya. What if I flush the Docwriter. Will that be helpful?
No.> Currently the issue that I am facing is this. The PDF is getting
> generated for around 900 pages but when it crosses this the system> gives a OUT OF MEMORY Error. We feel this is because of the> BYTEARRAYSTREAM that we are using to write the PDF to the web> application that we use.
If you write to response.getOutputStream() directly, the problem won'toccur.I use this solution in a controlled environment: i.e. the company I workfor canforce the users to use Firefox, Mozilla or Netscape only.
The ByteArrayOutputStream solution is only used to avoid problems with MSIE.> Or If I create new Documents will that be on a single PDF or multi> PDF. I do not want multi-PDF at any cost..The question is wrong.
You can create multiple documents by using new Document,but what OutputStream are you going to use?You could write the complete PDF to a FileOutputStreamand serve this file to the end-user. Once the file is read to
the ServletOutputStream, you could delete the file.br,Bruno---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makessearching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!

http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642___iText-questions mailing list

iText-questions@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/itext-questions

-- BharathKeep smiling and mailing

-- BharathKeep smiling and mailing


CustomBufferedOutputStream.java
Description: Binary data


[iText-questions] iText is the exception to the rule

2006-02-24 Thread David Thielen
There was an article awhile ago about how most open source software is utter
crap - which is unfortunately true.

 

I just added PDF copy to my code and it was unbelievably easy. I think iText
is possibly the best open source software out there when measured by how
well it is architected, designed, written, and documented.

 

Once again to Bruno, Paulo, etc - thank you

 

 

David Thielen

www.windwardreports.com

303-499-2544

 




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Merge and Bookmark

2006-02-24 Thread Normen Mueller

He iText folks!

I am not really sure if we are talking about a bug or a
misunderstanding on how to use the library. Here is
what I am trying to do:

Merge a couple of pdf files and create a bookmark for
each merged file in the resulting one. For example:
Merge the pdf files A, B, C and name the resulting one
Z. In Z should not only be the three documents but also
three bookmarks pointing to the first page of each
merges file.

Z
|- A
|- B
|- C

If I try to perform that task by the following lines of
code I always get an exception complaining a wrong page
number:

[...]
while (counter < rowCount)
{
  String current = (String)
  pomTable.getValueAt(counter, 0);
  List pages =
getPages((String) pomTable.getValueAt(counter, 1));

  if (!pages.isEmpty())
  {
PdfReader reader = new PdfReader(current);
reader.consolidateNamedDestinations();

int n = reader.getNumberOfPages();

// actions only for the first document
if (counter == 0)
{
  document = new Document(reader.getPageSizeWithRotation(1));
  writer = new PdfCopy(document, new FileOutputStream(outFile));
  writer.setViewerPreferences(PdfCopy.PageModeUseOutlines);
  document.open();
}

for (Iterator i = pages.iterator(); i.hasNext();)
{
  int page = ((Integer) i.next()).intValue();
  if (page > 0 && page <= n)
  {
writer.addPage(writer.getImportedPage(reader, page));
writer.flush();
  }
}

PRAcroForm form = reader.getAcroForm();
if (form != null)
  writer.copyAcroForm(reader);

writer.freeReader(reader);

if ((Boolean) pomTable.getValueAt(counter, 2)
document.getPageNumber() > 0)
//document.getPageNumber is always 0 
{
  // if i remove the getPageNumber condition in
  // order to get into this if-statement then the
  // exception is thrown.
  PdfDestination d1 = new PdfDestination(PdfDestination.FIT);
  PdfOutline root = writer.getRootOutline();
  new PdfOutline(root, d1, "Document " + counter);
}
  }

  counter++;
}

Thanks in advance for your help...
/Normen


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] list population

2006-02-24 Thread Paulo Soares
List population is already done in the CVS but you probably want list 
selection that is done with setField() with the export value.


- Original Message - 
From: "radu milos" <[EMAIL PROTECTED]>

To: 
Sent: Friday, February 24, 2006 6:42 PM
Subject: [iText-questions] list population


Hello, I am new to iText, so this is probably a
trivial question I am asking :

I have a PDF template(created with openoffice) which
consists of some text fields and some lists. I try to
update this template and fill these fields and lists
with some values.
Filling the text fields is quite easy, but i have
trouble when it come to filling lists.

I have seen this statement on the mailing list  :
"I'm going to add support for combo and list
population in AcroFields,
this need pops up now and then and it's not that
difficult. It will take
a couple of weeks time, I think. "
in the folowing message :
http://thread.gmane.org/gmane.comp.java.lib.itext.general/18653
It is allready done ?

If not, could someone just supply me with a simple
code sample that just fills out a list ?
Here's my code :
--
[code]
PdfReader reader = new PdfReader("test1PDF.pdf");

PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("aNewPDF.pdf"));
AcroFields form = stamp.getAcroFields();
form.setField("contractNb","123980");
[/code]

How can i fill a list once I have detected it ?
Thanks a lot



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions 




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] help required to generate multilevel bulleted text Microsoft word document using iText API

2006-02-24 Thread Chandrasekaran Sivakolundu

Hi all,

I am working on a Java application.
I want to develope Microsoft Word document using iText API.. 

The requirement is generating
multilevel bulleted text document. But the problem is third level bullet.
I am not getting any error, when I run the following program, But when
I open the word document, 3rd level bullet is not getting displayed. Any
one knew, how to solve the following problem, please I am requesting you
to kindly send me the code. 

 Here I enclosed the
Microsoft word file, I had generated with the help of following code.

Bulleted Text :
         
       
     
          Document
document = new Document();
     
      RtfWriter2.getInstance(document, new FileOutputStream("c:\\temp\\MultilevelBullet.rtf"));
     
      document.open();
     
      List  list= new List(false, 20);
     
      list.add(new ListItem(new Paragraph("Fruits",
new Font(20;
     
      List innerList1 = new List(false, 20);
     
      innerList1.add(new ListItem(new Paragraph("Apple",
new Font(20;
     
          List innerList2 = new
List(false, 20);
     
          innerList2.add(new
ListItem(new Paragraph("Mango", new Font(20;
     
          innerList1.add(innerList2);
     
          innerList1.add(new
ListItem(new Paragraph("Grape", new Font(20;
     
        list.add(innerList1);
     
            document.add(list);
     
        document.close();

Bulleted Number Text:

         
      Document
document = new Document();
       
    RtfWriter2.getInstance(document, new FileOutputStream("c:\\temp\\MultilevelBullet.rtf"));
       
    document.open();
       
    List  list= new List(true, 20);
       
    list.add(new ListItem(new Paragraph("Numbers",
new Font(20;
       
    List innerList1 = new List(true, 20);
       
    innerList1.add(new ListItem(new Paragraph("One",
new Font(20;
       
        List innerList2 = new
List(true, 20);
       
        innerList2.add(new ListItem(new
Paragraph("Two", new Font(20;
       
        innerList1.add(innerList2);
       
        innerList1.add(new ListItem(new
Paragraph("Three", new Font(20;
       
      list.add(innerList1);
       
          document.add(list);
       
      document.close();


       
                     
                     
                     
                     
         

Any help is highly appreciated.
Thanx in advance


With regards
chandru



__


Bulleted_Number_Sample.rtf
Description: RTF file


Bulleted_Sample.rtf
Description: RTF file


[iText-questions] list population

2006-02-24 Thread radu milos
Hello, I am new to iText, so this is probably a
trivial question I am asking : 

I have a PDF template(created with openoffice) which
consists of some text fields and some lists. I try to
update this template and fill these fields and lists
with some values. 
Filling the text fields is quite easy, but i have
trouble when it come to filling lists. 

I have seen this statement on the mailing list  : 
"I'm going to add support for combo and list
population in AcroFields,
this need pops up now and then and it's not that
difficult. It will take
a couple of weeks time, I think. "
 in the folowing message : 
http://thread.gmane.org/gmane.comp.java.lib.itext.general/18653
It is allready done ? 

If not, could someone just supply me with a simple
code sample that just fills out a list ? 
Here's my code : 
--
[code]
PdfReader reader = new PdfReader("test1PDF.pdf"); 
 
PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("aNewPDF.pdf"));
AcroFields form = stamp.getAcroFields();
form.setField("contractNb","123980");
[/code]

How can i fill a list once I have detected it ?
Thanks a lot



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] createGraphics and Tomcat problem

2006-02-24 Thread Bruno Lowagie

[EMAIL PROTECTED] wrote:



What do you mean that I forgot the X Server?


Exactly that.

Does that mean that I need the X Server to run to use the 
createGraphics function?


It means that Java (not iText in particular) needs the X Server to run
as soon as you decide to use classes such as Graphics2D (that's a
class to do Graphics). If you would have used PdfContentByte to
draw your graphics, no X Server would have been needed.


The problem is that I have no easy access to the Tomcat machine...


That's indeed a problem.

If the XServer is running is that enough, and the function will work 
fine? 


You should test this.


If not, is there a workaround...?


Don't use any java.awt class, use PDF graphics only.
br,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] load afm fonts with fontfactory

2006-02-24 Thread Paulo Soares
The version in the CVS will register the T1 families. Be warned that the 
automatic family pairing may not work for some fonts, like Futura, that have 
the same family name for all the weights. In this case register the font names 
by hand using FontFactory.registerFamily():

Paulo

> -Original Message-
> From: Thomas Kübler [mailto:[EMAIL PROTECTED] 
> Sent: Friday, February 24, 2006 11:46 AM
> To: Paulo Soares
> Subject: Re: [iText-questions] load afm fonts with fontfactory
> 
> Hello,
> 
> thanks.
> 
> Mit freundlichen Grüßen
> 
> Thomas Kübler
> 
> 
> 
> Dynamic Document Solution variex
> Alt-Marienfelde 25
> 12277 Berlin
> 
> t. + 49 30 723 23 183
> f. + 49 30 723 23 185
> 
> mailto:[EMAIL PROTECTED]
> www.variex.de
> 
> 
> 
> Paulo Soares schrieb:
> > The font is registered but not the family. Can you send me 
> a complete T1 family for testing? I just have isolated T1 fonts.
> >
> > Paulo
> >
> >   
> >> -Original Message-
> >> From: Thomas Kübler [mailto:[EMAIL PROTECTED] 
> >> Sent: Friday, February 24, 2006 10:34 AM
> >> To: Paulo Soares
> >> Subject: Re: [iText-questions] load afm fonts with fontfactory
> >>
> >> Hello, Paulo,
> >>
> >> here the first messages:
> >>
> >> DEBUG fontdir: D:\Projekte\gsg\fonts\AFM count: 20
> >> DEBUG postcriptfontname... Futura path: 
> >> D:\Projekte\gsg\fonts\AFM\Futur.AFM
> >> DEBUG postcriptfontname... Futura-Bold path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturBol.AFM
> >> DEBUG postcriptfontname... Futura-BoldOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturBolObl.AFM
> >> DEBUG postcriptfontname... Futura-Book path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturBoo.AFM
> >> DEBUG postcriptfontname... Futura-BookOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturBooObl.AFM
> >> DEBUG postcriptfontname... Futura-Condensed path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturCon.AFM
> >> DEBUG postcriptfontname... Futura-CondensedBold path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConBol.AFM
> >> DEBUG postcriptfontname... Futura-CondensedBoldOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConBolObl.AFM
> >> DEBUG postcriptfontname... Futura-CondensedExtraBold path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConExtBol.AFM
> >> DEBUG postcriptfontname... Futura-CondExtraBoldObl path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConExtBolObl.AFM
> >> DEBUG postcriptfontname... Futura-CondensedLight path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConLig.AFM
> >> DEBUG postcriptfontname... Futura-CondensedLightOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConLigObl.AFM
> >> DEBUG postcriptfontname... Futura-CondensedOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturConObl.AFM
> >> DEBUG postcriptfontname... Futura-ExtraBold path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturExtBol.AFM
> >> DEBUG postcriptfontname... Futura-ExtraBoldOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturExtBolObl.AFM
> >> DEBUG postcriptfontname... Futura-Heavy path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturHea.AFM
> >> DEBUG postcriptfontname... Futura-HeavyOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturHeaObl.AFM
> >> DEBUG postcriptfontname... Futura-Light path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturLig.AFM
> >> DEBUG postcriptfontname... Futura-LightOblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturLigObl.AFM
> >> DEBUG postcriptfontname... Futura-Oblique path: 
> >> D:\Projekte\gsg\fonts\AFM\FuturObl.AFM
> >>
> >>
> >> Mit freundlichen Grüßen
> >>
> >> Thomas Kübler
> >>
> >> 
> >>
> >> Dynamic Document Solution variex
> >> Alt-Marienfelde 25
> >> 12277 Berlin
> >>
> >> t. + 49 30 723 23 183
> >> f. + 49 30 723 23 185
> >>
> >> mailto:[EMAIL PROTECTED]
> >> www.variex.de
> >>
> >>
> >>
> >> Paulo Soares schrieb:
> >> 
> >>> It would be interesting to see the debug output of the 
> >>>   
> >> first part of your code. 
> >> 
> >>>   
> >>>   
>  -Original Message-
>  From: [EMAIL PROTECTED] 
>  [mailto:[EMAIL PROTECTED] On 
>  Behalf Of Thomas Kübler
>  Sent: Friday, February 24, 2006 10:14 AM
>  To: itext-questions@lists.sourceforge.net
>  Subject: [iText-questions] load afm fonts with fontfactory
> 
>  Hello,
> 
>  I still have the problem to load and work with type 1 afm fonts.
>  First i load the afm files with:
> 
>  FontFileFilter filefilter = new 
>  
> >> FontFileFilter(fontextension);
> >> 
>  File[] fontfilelist = new 
>  File(directoryname).listFiles(filefilter);
>  cat.debug("fontdir: " + directoryname + " count: " + 
>  fontfilelist.length);
>  for (int i = 0 ; i < fontfilelist.length; i++) {
>  String fontname = 
>  fontfilelist[i].getName().substring(0,fontfilelist[i].getName(
>  ).length()-4);
>  FontFactory.register(fontfilelist[i].toString());
>  cat.debug("postcriptfontname... " + 
>  FontFactory.getFont(fontfilelist[i].toS

Re: [iText-questions] Can iText replace images etc.

2006-02-24 Thread Leonard Rosenthol

At 09:39 AM 2/24/2006, Petter Nyström wrote:
Hello! I am browsing the internet for code 
libraries to work with PDF documents. So far, iText looks the best!


iText is an excellent library for many 
things PDF - but certainly not all...



One of the basic things I want to do is to pull 
images out of a PDF, let third-party software 
modify these images and then plug the modified 
images back into the PDF without changing the 
document layout. Can iText do this?


No.

In fact, I am not aware of ANY 
non-commercial library that will provide that 
level of functionality (specifically the "putting 
back" part - the extraction is easy).




Or to what extent can iText help me in writing my own code for doing this?


You could use iText to extract the 
images, though you'd also need a VERY detailed 
understanding of image handling and color 
management in order to make sure that the 
extracted data was in the correct form.


Depending on what types of modifications 
you are going to allow the 3rd party tools to do, 
it MIGHT be possible to use iText, but you'd need 
to work at a very low level of PDF functionality 
to find, modify and replace the relevant objects.



When I set out on my search for PDF libraries, 
my highest goal was really to find a PDF parser. 
I would love to find code that takes a PDF 
document and turns it into a data structure 
representing the elements in the PDF - i.e. a 
parse tree. Then I could traverse this tree and 
do whatever modifications I'd like to the nodes 
therein. When finished, I'd need some code to 
turn the parse tree back into a flat string - a PDF document.


There are a couple of commercial libraries that offer this feature.


Leonard

---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-938-7080 (voice)
 215-938-0880 (fax)



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Can iText replace images etc.

2006-02-24 Thread Petter Nyström
Hello! I am browsing the internet for code libraries to work with PDF 
documents. So far, iText looks the best! It would be of great help to me 
though, if I could get a few questions answered about the library before I 
really start to dig into it.


One of the basic things I want to do is to pull images out of a PDF, let 
third-party software modify these images and then plug the modified images 
back into the PDF without changing the document layout. Can iText do this? 
Or to what extent can iText help me in writing my own code for doing this?


When I set out on my search for PDF libraries, my highest goal was really 
to find a PDF parser. I would love to find code that takes a PDF document 
and turns it into a data structure representing the elements in the PDF - 
i.e. a parse tree. Then I could traverse this tree and do whatever 
modifications I'd like to the nodes therein. When finished, I'd need some 
code to turn the parse tree back into a flat string - a PDF document. I am 
quite new to dealing with PDF:s, so I am not sure whether this approach is 
a good or even feasible one. But it should give you an idea what I want to 
do.


Any help on how my problems would best be solved is greatly appreciated. 
Also, pointers to other software than iText is fine - but it'd need to be 
open source.


Many thanks,

Petter Nyström


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] iText Doubt

2006-02-24 Thread Mark Hall
On Thursday 23 February 2006 13:25, RADHA wrote:
> I am currently using itext 1.3.1 version.. I am displaying an image as logo
> in my RTF document. but when there is no image, an equivalent empty space
> should be left out in the document.. i hav scaled my images to 500x70
> dimension. In the absence of the image i should get blank space in the RTF
> document which should hav the same dimension as the image(500x70). I don't
> find methods to allocate width and height for a chunk without image. Can
> anyone pls let me know how to achieve this?
You will need to add an empty image with the desired dimensions.

Greetings,
Mark
-- 
Increased knowledge will help you now.  Have mate's phone bugged.

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc


pgpleODnEYzuf.pgp
Description: PGP signature


Re: [iText-questions] RE: Pixel values of a PDF page

2006-02-24 Thread Leonard Rosenthol

At 04:43 PM 2/23/2006, kalper wrote:

I just want to obtain RGB and CMYK value for each pixel of a PDF page.


Let me try this again, since the first time I answered you 
didn't seem to understand.


PDF pages consist of a series of "drawing objects".  These 
objects can be raster images, text or vectors (paths).   Each object 
can be in one of ELEVEN(!) different colorspaces...


Given that, the concept of an "RGB or CMYK pixel" has no 
meaning.   Do you understand?




I do not need to preview the page or convert it to an image.


Then you need to walk the object list and do bounds checking 
on objects.  You also need to handle all eleven colorspaces as necessary.



Leonard

---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-938-7080 (voice)
 215-938-0880 (fax)



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] RE: PDF compression

2006-02-24 Thread Leonard Rosenthol

At 05:45 AM 2/23/2006, [EMAIL PROTECTED] wrote:

I would like to have PDF compression using ITEXT.


OK, but that won't do the duplicate font elimination that 
you are asking for, nor will it recompress streams, optimize images, 
etc.  COULD you add that type of feature to iText, sure, but it's not 
there currently.




itried using setFullCompression()  method.. however it didn't workout..


It did work, but it didn't do all the other things that 
Acrobat or PDF Enhancer did...




is linearization and fast web view also available in itext?


No.  Again, you'll need to look at commercial solutions.


Leonard

---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-938-7080 (voice)
 215-938-0880 (fax)



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] createGraphics and Tomcat problem

2006-02-24 Thread Andrzej . Ciereszko

What do you mean that I forgot the X
Server? Does that mean that I need the X Server to run to use the createGraphics
function? The problem is that I have no easy access to the Tomcat machine...
If the XServer is running is that enough,
and the function will work fine? If not, is there a workaround...?

Thanks a lot in advance!

cierech



> Is it possible that while running on tomcat the
iText has a problem 
> creating Graphics
>
Maybe your JVM can't create Graphics on your (UNIX? Linux?) system
because you forgot the X Server.
br,
Bruno

Hi! 

I have a following problem. I have a stamping application to place a stamp
in the PDF document. While everything in Windows works great, when I upload
it to a machine running Tomcat (to stamp the documents generated on-the-fly),
I get an error... Here it is: 

type Exception report 
message 
description The server encountered an internal
error () that prevented it from fulfilling this request. 
exception 
javax.servlet.ServletException: Servlet execution threw
an exception
                com.sfs.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
root cause 
java.lang.NoClassDefFoundError
                com.lowagie.text.pdf.PdfGraphics2D.(Unknown
Source)
                com.lowagie.text.pdf.PdfContentByte.createGraphics(Unknown
Source)
                com.sfs.pdf.writer.pdf.ITextPdfWriter.newFile(ITextPdfWriter.java:83)
                com.sfs.pdf.aerodromes.ADListCreator.createNewPDFWriter(ADListCreator.java:197)
                com.sfs.pdf.aerodromes.ADListCreator.createDocumentWidthSingleChapter(ADListCreator.java:410)
                com.sfs.servlet.ADListCreatorServlet.createAndSendPdfDocument(ADListCreatorServlet.java:330)
                com.sfs.servlet.ADListCreatorServlet.createAerodromeADList(ADListCreatorServlet.java:224)
                com.sfs.servlet.ADListCreatorServlet.processGet(ADListCreatorServlet.java:168)
                com.sfs.servlet.AbstractServlet.doGet(AbstractServlet.java:129)
                javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
                javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                com.sfs.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
The bolded line points to this function:

        public boolean newFile(OutputStream outputStream,
float height, float width, String author, String title, String subject)
{ 
                
                coord=new PDFCoordinates(width,
height); 
                document = new
Document(); 

                try {

                    
   writer = PdfWriter.getInstance(document, outputStream);

                    
   
                    
   document.addAuthor(author); 
                    
   document.addSubject(subject); 
                    
   document.addTitle(title); 

                    
   pageWidth = width; 
                    
   pageHeight = height; 

                    
   document.open(); 

                    
   pdfContentByte = writer.getDirectContent();

                    
   pdfTemplate = pdfContentByte.createTemplate(pageWidth, pageHeight);

                    
   g2D = pdfTemplate.createGraphics(pageWidth, pageHeight);


                } catch (DocumentException
e) { 
                    
   System.out.println(e.getMessage()); 
                    
   return false; 
                }


                return true;

        } 
Is it possible that while running on
tomcat the iText has a problem creatingGraphics and returning an object
Graphics2D... or is the problem two lines before, getting the DirectContent?
Either way is there a workaround, how would i go about fixing this

Thanks! 
cierech

RE: [iText-questions] load afm fonts with fontfactory

2006-02-24 Thread Paulo Soares
It would be interesting to see the debug output of the first part of your code. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Thomas Kübler
> Sent: Friday, February 24, 2006 10:14 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] load afm fonts with fontfactory
> 
> Hello,
> 
> I still have the problem to load and work with type 1 afm fonts.
> First i load the afm files with:
> 
> FontFileFilter filefilter = new FontFileFilter(fontextension);
> File[] fontfilelist = new 
> File(directoryname).listFiles(filefilter);
> cat.debug("fontdir: " + directoryname + " count: " + 
> fontfilelist.length);
> for (int i = 0 ; i < fontfilelist.length; i++) {
> String fontname = 
> fontfilelist[i].getName().substring(0,fontfilelist[i].getName(
> ).length()-4);
> FontFactory.register(fontfilelist[i].toString());
> cat.debug("postcriptfontname... " + 
> FontFactory.getFont(fontfilelist[i].toString()).getBaseFont().
> getPostscriptFontName() 
> + " path: " + fontfilelist[i].toString());   
> }
> 
> after this, i print out all registered fonts with:
> 
> TreeSet families = new 
> TreeSet(FontFactory.getRegisteredFamilies());
> fontcount = families.size();
> for (Iterator i = families.iterator(); i.hasNext();) {
> String name = (String) i.next();
> cat.debug("FONTfactory: " + name);
> }
> 
> but i only see the standard fonts:
> 
> DEBUG FONTfactory: Courier
> DEBUG FONTfactory: Helvetica
> DEBUG FONTfactory: Symbol
> DEBUG FONTfactory: Times
> DEBUG FONTfactory: Times-Roman
> DEBUG FONTfactory: ZapfDingbats
> 
> what is wrong?
> 
> with regards
> 
> thomas kübler
> 
> -- 
> Mit freundlichen Grüßen
> 
> Thomas Kübler
> 
> 
> 
> Dynamic Document Solution variex
> Alt-Marienfelde 25
> 12277 Berlin
> 
> t. + 49 30 723 23 183
> f. + 49 30 723 23 185
> 
> mailto:[EMAIL PROTECTED]
> www.variex.de
> 
> 
> 
> 
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking 
> scripting language
> that extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new 
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] load afm fonts with fontfactory

2006-02-24 Thread Thomas Kübler

Hello,

I still have the problem to load and work with type 1 afm fonts.
First i load the afm files with:

   FontFileFilter filefilter = new FontFileFilter(fontextension);
   File[] fontfilelist = new File(directoryname).listFiles(filefilter);
   cat.debug("fontdir: " + directoryname + " count: " + 
fontfilelist.length);

   for (int i = 0 ; i < fontfilelist.length; i++) {
   String fontname = 
fontfilelist[i].getName().substring(0,fontfilelist[i].getName().length()-4);

   FontFactory.register(fontfilelist[i].toString());
   cat.debug("postcriptfontname... " + 
FontFactory.getFont(fontfilelist[i].toString()).getBaseFont().getPostscriptFontName() 
+ " path: " + fontfilelist[i].toString());   
   }


after this, i print out all registered fonts with:

   TreeSet families = new TreeSet(FontFactory.getRegisteredFamilies());
   fontcount = families.size();
   for (Iterator i = families.iterator(); i.hasNext();) {
   String name = (String) i.next();
   cat.debug("FONTfactory: " + name);
   }

but i only see the standard fonts:

DEBUG FONTfactory: Courier
DEBUG FONTfactory: Helvetica
DEBUG FONTfactory: Symbol
DEBUG FONTfactory: Times
DEBUG FONTfactory: Times-Roman
DEBUG FONTfactory: ZapfDingbats

what is wrong?

with regards

thomas kübler

--
Mit freundlichen Grüßen

Thomas Kübler



Dynamic Document Solution variex
Alt-Marienfelde 25
12277 Berlin

t. + 49 30 723 23 183
f. + 49 30 723 23 185

mailto:[EMAIL PROTECTED]
www.variex.de




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] non printable watermark

2006-02-24 Thread Bruno Lowagie

Manoj Talreja wrote:


Hi,

 

How can I make watermark or image non printable? There is one 
suggestion to add the non printable data inside button, but I was 
wondering if there is any way I can add watermark image inside button 
to make it non-printable. Thanks in advance.


 


I don't understand your explanation,
but I would add the image and watermark
in an Optional Content layer with the option
set in a way that the image/watermark is
visible on screen, but not printed.
http://itextdocs.lowagie.com/tutorial/directcontent/optionalcontent/
br,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] iTex compatibale version with JDK 1.3

2006-02-24 Thread Bruno Lowagie

Manjith Gunatilaka wrote:


Hi ,
I am looking for a iText older version. Other than 1.3

I tried to compile iTex version 1.3 with JDK 1.3 and encountered some 
compilation error.


Could you please send me an URL or jar file compatible for JDK 1.3 


No,
but if you tell us about the compilation error,
we can work around it in the next iText version.
br,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] non printable watermark

2006-02-24 Thread Manoj Talreja








Hi,

 

How can I make watermark or image non printable? There is
one suggestion to add the non printable data inside button, but I was wondering
if there is any way I can add watermark image inside button to make it
non-printable. Thanks in advance.

 

Regards,

Manoj Talreja








[iText-questions] RE: PDF compression

2006-02-24 Thread harshili . patil

Hi,
I would like to have PDF compression
using ITEXT. How do i achieve this? itried using setFullCompression()
 method.. however it didn't workout.. is there anyother way i can
achieve this?? is linearization and fast web view also available in itext?
looking for a quick and positive reply
from you...

thanks & regards,
harshii


Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you


[iText-questions] iTex compatibale version with JDK 1.3

2006-02-24 Thread Manjith Gunatilaka

Hi ,
I am looking for a iText older version. Other than 1.3

I tried to compile iTex version 1.3 with JDK 1.3 and encountered some 
compilation error.


Could you please send me an URL or jar file compatible for JDK 1.3

Cheers

Manjith


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] RE: Pixel values of a PDF page

2006-02-24 Thread kalper

I just want to obtain RGB and CMYK value for each pixel of a PDF page. I do
not need to preview the page or convert it to an image. A library
(especially java and open source) which takes a PDF page and give the
resulting byte or integer array of the RGB and CMYK values for each pixel is
enough for me.
--
View this message in context: 
http://www.nabble.com/Pixel-values-of-a-PDF-page-t1174363.html#a3098239
Sent from the iText - General forum at Nabble.com.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] How to Add HyperLink Image

2006-02-24 Thread Bruno Lowagie

GigiJK wrote:


Hello,
Can anyone show me how to add a hyperlink image on the upper lefthand 
corner of a pdf file using iText?



Create the image:
Image gif = Image.getInstance("../../chapter10/resources/iTextLogo.gif");
Add the hyperlink:
gif.setAnnotation(new Annotation(0, 0, 0, 0, 
"http://www.lowagie.com/iText";));

Set the coordinates:
gif.setAbsolutePosition(30f, 750f);
Add the image:
document.add(gif);

br,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions