[iText-questions] iTextSharp Enable Extended Features

2010-02-15 Thread Rahul Gupta
First off, wanted to say I really appreciate all the work on iTextSharp. It
is a great API. I just tried the latest iTextSharp DLL (5.0) and still got
the error about adobe extended features being disabled in Acrobat Reader on
a PDF after it had been modified using the API. Is there any way around
this? The pdf is extended feature enabled before using iTextSharp for
acrobat readers to save text they enter in the fields. Thanks!
--
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] Umlaut problem with SnowLeopard font

2010-02-15 Thread Christoph Wagner
Hi everyone,

I debugged the problem and I was able to locate the bug in iText. The cmap
parsing code in TrueTypeFont.readCMaps() does not handle Mac Unicode ttf
correctly. Adding that fixes the problem for me.

Thanks for your help,
Christoph Wagner





--
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] Added PolyLine and Polygon support to iTextSharp

2010-02-15 Thread de Beus, Eric
I don't know if this is the appropriate forum to post this kind of
thing, but I added 2 methods to my copy of PdfAnnotation.cs in
iTextSharp:

public static PdfAnnotation CreatePolyLine(PdfWriter writer, Rectangle
rect, 
   string contents, PdfArray
vertices) {
  PdfAnnotation annot = new PdfAnnotation(writer, rect);
  annot.Put(PdfName.SUBTYPE, PdfName.POLYLINE);
  annot.Put(PdfName.CONTENTS, new PdfString(contents,
PdfObject.TEXT_UNICODE));
  PdfArray array = new PdfArray(vertices);
  annot.Put(PdfName.VERTICES, array);
  return annot;
}

public static PdfAnnotation CreatePolygon(PdfWriter writer, Rectangle
rect, 
  string contents, PdfArray
vertices) {
  PdfAnnotation annot = new PdfAnnotation(writer, rect);
  annot.Put(PdfName.SUBTYPE, PdfName.POLYGON);
  annot.Put(PdfName.CONTENTS, new PdfString(contents,
PdfObject.TEXT_UNICODE));
  PdfArray array = new PdfArray(vertices);
  annot.Put(PdfName.VERTICES, array);
}

as well as some supporting members in PdfName.cs:

  public static readonly PdfName POLYGON = new PdfName("Polygon");
  public static readonly PdfName POLYLINE = new PdfName("PolyLine");
  public static readonly PdfName VERTICES = new PdfName("Vertices");


- Eric



--
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] FYI: Root Object is invalid or missing after PDF

2010-02-15 Thread de Beus, Eric
I cleaned up my system and have done extensive testing
with 5.0.0. I no longer see any root-object-invalid problems.
Thanks,

- Eric

-Original Message-
From: de Beus, Eric [mailto:eric.deb...@xerox.com] 
Sent: Monday, January 11, 2010 9:25 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Root Object is invalid or missing after
PDF

Paulo,

Thanks. I'll look into it some more, and post my results
if I figure anything out.

- Eric

-Original Message-
From: Paulo Soares [mailto:psoa...@glintt.com] 
Sent: Thursday, January 07, 2010 3:29 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Root Object is invalid or missing after
PDF

I don't think the problem can be solved remotely as the problem has
something to do with your environment. I'm not saying that iTextSharp is
not at fault but I couldn't reproduce the problem in an eight core
server running windows 2008 with a few hundred threads generating PDFs
continually. 
All the PDFs came out correct.

Paulo

- Original Message -
From: "de Beus, Eric" 
To: 
Cc: "de Beus, Eric" 
Sent: Thursday, January 07, 2010 10:04 PM
Subject: Re: [iText-questions] Root Object is invalid or missing after
PDF


Paulo (or anyone),

You said to try the code in the SVN--can you tell me which revision
and which files fix the multithreading problem?

I got 5.0.0, but the problem is still present there. I tried
checking out the SVN tip (I have Tortoise 1.6.5), but can't
connect to https://itextsharp.svn.sourceforge.net/svnroot/itextsharp
for some reason.

Thanks,

- Eric



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and
easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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/


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and
easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-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/


Re: [iText-questions] Project feasibility with iText?

2010-02-15 Thread Daniel Essin
Why not use Visual Studio Objects for office from a .net app as make a 
java accessible web service?
Microsoft Visual Studio 2005 Tools for Office Second Edition Runtime 
(VSTO 2005 SE) (x86)
http://www.microsoft.com/downloads/details.aspx?FamilyID=F5539A90-DC41-4792-8EF8-F4DE62FF1E81&displaylang=en


On 2/15/2010 12:23 AM, Fred Janon wrote:
> That's what I thought initially, but then I tried to use the iReport
> editor and it cannot handle more than real basic editing.
>
> I am not sure I understand what you mean by
>
>> However if you have lots of Word documents and would need to
>> convert them by hand something like a Word VBA macro is probably the
>> easiest/fastest solution
>>  
> Convert to what? iReport uses a proprietary format based on XML if I
> recall correctly. How would I convert a word document into an iReport
> template format?
>
> I looked also at using COM/OLE from Java, but the documentation for
> driving Word and Excel with COM is scarce, big risks involved.
>
> Thanks
>
> Fred
>
> On Mon, Feb 15, 2010 at 16:11, Markus Meyer  wrote:
>
>> Fred,
>>
>> JasperReports (with its iReport editor) sounds perfect for that task.
>> Note that JasperReports uses iText internally, but creates the PDFs from
>> scratch. However if you have lots of Word documents and would need to
>> convert them by hand something like a Word VBA macro is probably the
>> easiest/fastest solution. There are ways to automate Word from Java
>> using COM automation, but I'm not sure this makes sense for your project.
>>
>>
>> Markus
>>
>> Am 15.02.2010 03:48, schrieb Fred Janon:
>>  
>>> I need to generate different multi-page documents from some templates.
>>> I need to replace or insert some text and charts at specific locations
>>> in the template and then generate the final document. At the moment
>>> the templates are Microsoft Word documents. We use Windows as our OS
>>> and Java as the development technology. I looked at iReports but
>>> because the editor has limited capabilities, I cannot convert the Word
>>> templates into iReport documents.
>>>
>>> I looked at using COM/OLE or other Microsoft technologies but I don't
>>> have enough knowledge of them to embark on that journey, specially
>>> calling them from Java. We want to use Java to be able to create a
>>> desktop app and a web app as well.
>>>
>>> I used iText before to generate a chart in PDF format that needs to be
>>> in some of the reports. It worked beautifully. I own the first edition
>>> of the iText book and it clearly states that iText is not designed for
>>> editing pdf documents. I'd like to know if there is a way to create
>>> the pdf templates and use iText to replace some of the text and charts
>>> (images) to produce the real documents. I thought about using form
>>> fields, but it probably would not work for replacing images (charts).
>>>
>>> Any suggestion would be appreciated.
>>>
>>> Thanks
>>>
>>> Fred
>>>
>>> --
>>> 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/
>>
>>  
> --
> 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

Re: [iText-questions] Unable To Set Checkboxes With Complic ated Names

2010-02-15 Thread Jun Zuo
1T3XT info  1t3xt.info> writes:

> 
> Jun Zuo wrote:
> > I think it is a dynamic form! What is 
> > the trick for a dynamic form?
> 
> It's very different. The data should be formatted as XML and injected 
> into the PDF. See for instance:
> http://itextpdf.com/examples/index.php?page=example&id=165

It turns out that the 2009 F1040 does not have XFA present in it (only 
AcroForm). Any suggestions and examples on how to handle it?

Thanks!





--
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] Several page size for one document.

2010-02-15 Thread amcereijo cereijo
Response myself


/**
Create a new pdf file whith escale pages.
@param pdf bytes from pdf
@return bytes from new pdf file
*/
public byte[] solution1B(byte[] pdf) throws  IOException, DocumentException
{

  byte[] arrayBytesfinal = new byte[0];;
  PdfReader reader = new PdfReader(pdf);
  int n = reader.getNumberOfPages();

  if(n>0){


for (int i = 1; i <= n; i++) {

Rectangle rectReder = reader.getPageSize(i);
Document document = new Document(rectReder);
ByteArrayOutputStream bouf = new ByteArrayOutputStream();
PdfWriter writer = PdfWriter.getInstance(document, bouf);

document.open();
PdfContentByte directcontent = writer.getDirectContent();

PdfImportedPage page;
Image image;
  page = writer.getImportedPage(reader, i);

  image = Image.getInstance(page);


  int altoMenos = firmantes.length*25;
  image.scaleAbsolute(rectReder.getWidth(), rectReder.getHeight() -
altoMenos);
  image.setAbsolutePosition(0,altoMenos+20);

  directcontent.addImage(image);

  document.close();

  arrayBytesfinal =
this.concatenar(arrayBytesfinal,bouf.toByteArray());
}

return arrayBytesfinal;
  }
  return new byte[0];
}

 /**
   * Concatena los bytes que forman dos ficheros.
   * @return
   * @param ficheroNuevo contenido del nuevo fichero a concatenar
   * @param ficheroTotal contenido del fichero total al que se concatenará
el documento nuevo.
   */
  private byte[] concatenar(byte[] ficheroTotal,byte[] ficheroNuevo)
  {
try {
  int pageOffset = 0;

  ArrayList master = new ArrayList();

  ByteArrayOutputStream outByte = new ByteArrayOutputStream();


  Document document = null;
  PdfCopy  writer = null;

  for(int j=0;j<2;){
  // we create a reader for a certain document
  PdfReader reader = null;
  if(j==0 && ficheroTotal.length!=0){
   reader= new PdfReader(ficheroTotal);
  }else{
reader= new PdfReader(ficheroNuevo);
  }
  reader.consolidateNamedDestinations();
  // we retrieve the total number of pages
  int n = reader.getNumberOfPages();
  List bookmarks = SimpleBookmark.getBookmark(reader);
  if (bookmarks != null) {
  if (pageOffset != 0)
  SimpleBookmark.shiftPageNumbers(bookmarks, pageOffset,
null);
  master.addAll(bookmarks);
  }
  pageOffset += n;

  if (j == 0) {
  // step 1: creation of a document-object
  document = new
Document();//reader.getPageSizeWithRotation(1));
  // step 2: we create a writer that listens to the document
  writer = new PdfCopy(document, outByte);
  // step 3: we open the document
  document.open();

  }
  // step 4: we add content
  PdfImportedPage page;
  for (int i = 0; i < n; ) {
  ++i;
  page = writer.getImportedPage(reader, i);
  writer.addPage(page);
  }
  PRAcroForm form = reader.getAcroForm();
  if (form != null)
  writer.copyAcroForm(reader);
  //Esto vale para cuando se concatena por primera vez los ficheros
y el destino esta vacio.
  //Obligamos a salir del bucle con una sola iteración.
  if(j==0 && ficheroTotal.length!=0){j++;}else{j=2;}
  }


  if (!master.isEmpty())
  writer.setOutlines(master);


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

  outByte.close();
  return outByte.toByteArray();
}
catch(Exception e) {
  e.printStackTrace();

  return null;
}
  }

Thanks and regards, Ángel.


2010/2/15 amcereijo cereijo 

> Hi to all,
>
> Can itext create a document with horizontal and vertical pages in the same
> document?
>
> Thanks and regards, Ángel.
>
--
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] Several page size for one document.

2010-02-15 Thread amcereijo cereijo
Hi to all,

Can itext create a document with horizontal and vertical pages in the same
document?

Thanks and regards, Ángel.
--
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] Project feasibility with iText?

2010-02-15 Thread Leonard Rosenthol
You can also look at Windward Reports () which 
is based on iText (for the PDF side) and supports reading Word files just as 
you require.

-Original Message-
From: Fred Janon [mailto:fja...@gmail.com] 
Sent: Sunday, February 14, 2010 9:49 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Project feasibility with iText?

I need to generate different multi-page documents from some templates.
I need to replace or insert some text and charts at specific locations
in the template and then generate the final document. At the moment
the templates are Microsoft Word documents. We use Windows as our OS
and Java as the development technology. I looked at iReports but
because the editor has limited capabilities, I cannot convert the Word
templates into iReport documents.

I looked at using COM/OLE or other Microsoft technologies but I don't
have enough knowledge of them to embark on that journey, specially
calling them from Java. We want to use Java to be able to create a
desktop app and a web app as well.

I used iText before to generate a chart in PDF format that needs to be
in some of the reports. It worked beautifully. I own the first edition
of the iText book and it clearly states that iText is not designed for
editing pdf documents. I'd like to know if there is a way to create
the pdf templates and use iText to replace some of the text and charts
(images) to produce the real documents. I thought about using form
fields, but it probably would not work for replacing images (charts).

Any suggestion would be appreciated.

Thanks

Fred

--
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] iTextSharp help required for XML, XSLT, XSLT-FO, HTML

2010-02-15 Thread Waseem Latif
Dear all,

I have an XML and (XSLT or XSL-FO) file. I want to parse this XML file
according to XSLT/XSL-Fo and generate an HTML that is going to be displayed
in a Web Browser Control.
The XML file has not been created with iTextSharp but the DataSet. How can I
do this using iTextSharp? Can you please guide me if it is possible? I am
new to iTextSharp.

Moreover, I am using itextsharp 5.0.0. I have observed the following classes
are missing in this version under the name space iTextSharp.text.xml:

iTextHandler.cs
HtmlTagMap.cs
ITextmyHandler.cs
XmlPeer.cs
XmlParser.cs

I could not found these classes in any other namespace. If these have been
removed, what other alternatives have been provided.

I would be very thankful for the favor.



Regards,
Waseem Latif
--
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] Project feasibility with iText?

2010-02-15 Thread Fred Janon
Thanks for all the references. I will look at the them first thing tomorrow.
Thanks also for the tip on OO to create pdf forms. I found some more info
here:

http://danilop.wordpress.com/2008/07/02/how-to-create-pdf-forms-with-openoffice/

Thanks again, I really hope I can generate all the documents with
JFreeCharts and iText, that would be the easiest way for me and less risky.

Fred

On Mon, Feb 15, 2010 at 17:11, 1T3XT info  wrote:
> Fred Janon wrote:
>> The charts have fixed dimensions, but probably different size (in
>> bytes)
>
> Sorry, I wasn't clear.
> When I talked about size, I meant dimensions, not byte size.
> The idea is to put a placeholder in the PDF. I usually work
> with a button of which I replace the icon and then flatten
> the document.
>
> See for instance:
> http://1t3xt.info/examples/results/classroom/filmfestival/movies22.pdf
> is the template used to create:
> http://1t3xt.info/examples/results/classroom/filmfestival/movies22.pdf
> or its "flattened" version:
> http://1t3xt.info/examples/results/classroom/filmfestival/movies23_2.pdf
>
> Source code available here:
> http://1t3xt.info/examples/browse/?page=example&id=332
>
>> since the legend will change a bit from one chart to another. I
>> can fix the max length of the strings to replace, meaning I can put a
>> dummy string in the template of the max length, then I can pad the
>> strings when replacing them if necessary.
>
> Working with a dummy string isn't done in PDF.
> You'd better work with text fields for Strings.
> See the example mentioned above.
>
>> Would that work? How can I find the location of the strings to replace
>> in the template? Do I need a template that's a pdf form?
>
> Yes, you need a template that is a PDF form.
> You can create such a template with Open Office.
>
> This form was made by
> http://1t3xt.info/examples/resources/classroom/filmfestival/datasheet.pdf
> It's filled using this code:
> http://1t3xt.info/examples/browse/?page=example&id=330
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
>
--
> 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/

Re: [iText-questions] Project feasibility with iText?

2010-02-15 Thread 1T3XT info
Fred Janon wrote:
> The charts have fixed dimensions, but probably different size (in
> bytes)

Sorry, I wasn't clear.
When I talked about size, I meant dimensions, not byte size.
The idea is to put a placeholder in the PDF. I usually work
with a button of which I replace the icon and then flatten
the document.

See for instance:
http://1t3xt.info/examples/results/classroom/filmfestival/movies22.pdf
is the template used to create:
http://1t3xt.info/examples/results/classroom/filmfestival/movies22.pdf
or its "flattened" version:
http://1t3xt.info/examples/results/classroom/filmfestival/movies23_2.pdf

Source code available here:
http://1t3xt.info/examples/browse/?page=example&id=332

> since the legend will change a bit from one chart to another. I
> can fix the max length of the strings to replace, meaning I can put a
> dummy string in the template of the max length, then I can pad the
> strings when replacing them if necessary.

Working with a dummy string isn't done in PDF.
You'd better work with text fields for Strings.
See the example mentioned above.

> Would that work? How can I find the location of the strings to replace
> in the template? Do I need a template that's a pdf form?

Yes, you need a template that is a PDF form.
You can create such a template with Open Office.

This form was made by
http://1t3xt.info/examples/resources/classroom/filmfestival/datasheet.pdf
It's filled using this code:
http://1t3xt.info/examples/browse/?page=example&id=330
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
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] Project feasibility with iText?

2010-02-15 Thread Markus Meyer
Am 15.02.2010 09:23, schrieb Fred Janon:
> That's what I thought initially, but then I tried to use the iReport
> editor and it cannot handle more than real basic editing.
>
iReport is not Word, that's for sure, but iReport has lots of support 
for creating templates and filling them with charts, text etc. It is 
certainly possible to create very nice-looking documents with charts and 
graphics using iReports.

> Convert to what? iReport uses a proprietary format based on XML if I
> recall correctly. How would I convert a word document into an iReport
> template format?
>
My point is that if you only have a few relatively simple Word documents 
you can manually create replacements for them in another format which 
suits the purpose. However, if you want to work directly off the Word 
documents provided (e.g. if you have lots of documents or if the user 
insists on using Word to create further templates), you should simply 
use Word for your task.

> I looked also at using COM/OLE from Java, but the documentation for
> driving Word and Excel with COM is scarce, big risks involved.
>
This is not true. Microsoft Office comes with extensive documentation 
regarding their automation interfaces (just see the VBA documentation). 
Also you have things like the macro recorder where you can see how 
certain tasks are automated by just recording a macro and then looking 
into the generated source code. In the past I automated different 
Microsoft applications from different programming languages and it is 
very straightforward and reasonably well documented.


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] Project feasibility with iText?

2010-02-15 Thread Fred Janon
That's what I thought initially, but then I tried to use the iReport
editor and it cannot handle more than real basic editing.

I am not sure I understand what you mean by
> However if you have lots of Word documents and would need to
> convert them by hand something like a Word VBA macro is probably the
> easiest/fastest solution
Convert to what? iReport uses a proprietary format based on XML if I
recall correctly. How would I convert a word document into an iReport
template format?

I looked also at using COM/OLE from Java, but the documentation for
driving Word and Excel with COM is scarce, big risks involved.

Thanks

Fred

On Mon, Feb 15, 2010 at 16:11, Markus Meyer  wrote:
> Fred,
>
> JasperReports (with its iReport editor) sounds perfect for that task.
> Note that JasperReports uses iText internally, but creates the PDFs from
> scratch. However if you have lots of Word documents and would need to
> convert them by hand something like a Word VBA macro is probably the
> easiest/fastest solution. There are ways to automate Word from Java
> using COM automation, but I'm not sure this makes sense for your project.
>
>
> Markus
>
> Am 15.02.2010 03:48, schrieb Fred Janon:
>> I need to generate different multi-page documents from some templates.
>> I need to replace or insert some text and charts at specific locations
>> in the template and then generate the final document. At the moment
>> the templates are Microsoft Word documents. We use Windows as our OS
>> and Java as the development technology. I looked at iReports but
>> because the editor has limited capabilities, I cannot convert the Word
>> templates into iReport documents.
>>
>> I looked at using COM/OLE or other Microsoft technologies but I don't
>> have enough knowledge of them to embark on that journey, specially
>> calling them from Java. We want to use Java to be able to create a
>> desktop app and a web app as well.
>>
>> I used iText before to generate a chart in PDF format that needs to be
>> in some of the reports. It worked beautifully. I own the first edition
>> of the iText book and it clearly states that iText is not designed for
>> editing pdf documents. I'd like to know if there is a way to create
>> the pdf templates and use iText to replace some of the text and charts
>> (images) to produce the real documents. I thought about using form
>> fields, but it probably would not work for replacing images (charts).
>>
>> Any suggestion would be appreciated.
>>
>> Thanks
>>
>> Fred
>>
>> --
>> 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/
>

--
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] Project feasibility with iText?

2010-02-15 Thread Fred Janon
The charts have fixed dimensions, but probably different size (in
bytes) since the legend will change a bit from one chart to another. I
can fix the max length of the strings to replace, meaning I can put a
dummy string in the template of the max length, then I can pad the
strings when replacing them if necessary.

Would that work? How can I find the location of the strings to replace
in the template? Do I need a template that's a pdf form?

Thanks

Fred

On Mon, Feb 15, 2010 at 15:49, 1T3XT info  wrote:
> Fred Janon wrote:
>> I thought about using form
>> fields, but it probably would not work for replacing images (charts).
>
> If the charts (or any other data you need to add) have a fixed size,
> then it will work. If you don't know in advance how long or how short
> the data that needs to be added will be, then it won't work (in that
> case you probably need dynamic forms and you'll need Adobe LiveCycle
> ES to fill them).
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
> --
> 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/


Re: [iText-questions] Project feasibility with iText?

2010-02-15 Thread Markus Meyer
Fred,

JasperReports (with its iReport editor) sounds perfect for that task. 
Note that JasperReports uses iText internally, but creates the PDFs from 
scratch. However if you have lots of Word documents and would need to 
convert them by hand something like a Word VBA macro is probably the 
easiest/fastest solution. There are ways to automate Word from Java 
using COM automation, but I'm not sure this makes sense for your project.


Markus

Am 15.02.2010 03:48, schrieb Fred Janon:
> I need to generate different multi-page documents from some templates.
> I need to replace or insert some text and charts at specific locations
> in the template and then generate the final document. At the moment
> the templates are Microsoft Word documents. We use Windows as our OS
> and Java as the development technology. I looked at iReports but
> because the editor has limited capabilities, I cannot convert the Word
> templates into iReport documents.
>
> I looked at using COM/OLE or other Microsoft technologies but I don't
> have enough knowledge of them to embark on that journey, specially
> calling them from Java. We want to use Java to be able to create a
> desktop app and a web app as well.
>
> I used iText before to generate a chart in PDF format that needs to be
> in some of the reports. It worked beautifully. I own the first edition
> of the iText book and it clearly states that iText is not designed for
> editing pdf documents. I'd like to know if there is a way to create
> the pdf templates and use iText to replace some of the text and charts
> (images) to produce the real documents. I thought about using form
> fields, but it probably would not work for replacing images (charts).
>
> Any suggestion would be appreciated.
>
> Thanks
>
> Fred
>
> --
> 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/