RE: [iText-questions] Joining fields using acroform

2003-04-05 Thread Leonard Rosenthol
At 02:20 PM 4/4/2003 -0800, Rich McAneny wrote:
True, this does force ADOBE to regenerate this information.
Actually, that's the whole issue - it does NOT force Acrobat 
(Adobe is a company, they make many products).   SOME versions of Adobe 
Acrobat will respect the /NeedAppearance key, others (mostly the 5.x 
series) will NOT.   Also, since Acrobat 5.x will not always rebuild the 
appearance, AND it prefers the appearance over the actual form data, you 
may see data displayed that does NOT match the current value(s).


We have been using this method with another package
for a year or more with no noticable problems. We have
been using Reader 3 and 4 and Acrobat 4, but mostly
version 4 of each.
Acrobat 4 respects the NeedApperance key, Acrobat 5 does not (always).

Leonard

---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-629-3700 (voice)


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Joining fields using acroform

2003-04-05 Thread Paulo Soares
The main risk is that you are dependent on the viewer to see the field but
if you can control that I suppose that you are ok.
I can have a flag to skip the creation of appearances for this special
cases.

Best Regards,
Paulo Soares

- Original Message -
From: "Rich McAneny" <[EMAIL PROTECTED]>
To: "Leonard Rosenthol" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 23:20
Subject: RE: [iText-questions] Joining fields using acroform


> (Disclaimer: First I must admit my knowledge of PDF is
> limited and I have not worked with it for a year or
> more, since I originally implemented it.)
>
> True, this does force ADOBE to regenerate this
> information.  Although, loading on the client takes a
> lot less than the 10-12 seconds it takes on the server
> - which the user also has to wait for.
>
> Now if there are potential rendering issues then that
> could be a problem. Isn't ADOBE rebuilding the
> appearances from the original fields added during the
> creation of the form, similar to what iText is doing?
> If not where does it get the appearances - both during
> this 'rebuilding' of the appearances and whenever a
> form is edited using Adobe?
>
> What sort of problems are likely to come up? (We are
> using only Text fields - and these forms are read-only
> forms.)
>
> We have been using this method with another package
> for a year or more with no noticable problems. We have
> been using Reader 3 and 4 and Acrobat 4, but mostly
> version 4 of each.
>
> Thanks for your help!
>
> Rich
>
>
> --- Leonard Rosenthol <[EMAIL PROTECTED]> wrote:
> > At 01:10 PM 4/4/2003 -0800, Rich McAneny wrote:
> > >In working with another PDF package, I found that
> > >there is a PDF value(?) called:
> > >
> > >/NeedAppearances true
> > >
> > >which I needed to add to the AcroForm Object. (This
> > >caused the Appearances to be rebuilt by PDF.
> >
> >  Using NeedAppearances is BAD - it's
> > behavior is inconsistent with
> > different versions of Adobe Acrobat (and OS
> > platforms) and is useless on in
> > other PDF Viewers.
> >
> >  iText does form filling the CORRECT way by
> > generating correct
> > appearances for the data as it fills it in.
> >
> >
> >
> > >I tried this using iText and it worked as well.
> > Below
> > >is the code that I used/changed. It dropped the
> > >creation time from 14-15 seconds down to 2-3.
> >
> >  Because you left appearance generation for
> > client side, so that
> > your user will have to wait longer for their forms
> > to appear - IF they
> > appear at all!  I suggest you spend some time trying
> > this with different
> > versions of Acrobat 3 vs. 4 vs. 5 vs. 5.1, and
> > Reader vs. Approval vs.
> > Acrobat.  You will find some that the user
> > experience will vary greatly AND
> > in some cases will be unacceptable (since the user
> > will see the WRONG THING!).
> >
> >
> > Leonard
> >
> 
> ---
> > Leonard Rosenthol
> > <mailto:[EMAIL PROTECTED]>
> > Chief Technical Officer
> > <http://www.pdfsages.com>
> > PDF Sages, Inc.
> > 215-629-3700 (voice)
> >
>
>
> __
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
>
>
> ---
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>



---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Joining fields using acroform

2003-04-04 Thread Rich McAneny
(Disclaimer: First I must admit my knowledge of PDF is
limited and I have not worked with it for a year or
more, since I originally implemented it.)

True, this does force ADOBE to regenerate this
information.  Although, loading on the client takes a
lot less than the 10-12 seconds it takes on the server
- which the user also has to wait for. 

Now if there are potential rendering issues then that
could be a problem. Isn't ADOBE rebuilding the
appearances from the original fields added during the
creation of the form, similar to what iText is doing?
If not where does it get the appearances - both during
this 'rebuilding' of the appearances and whenever a
form is edited using Adobe?

What sort of problems are likely to come up? (We are
using only Text fields - and these forms are read-only
forms.)

We have been using this method with another package
for a year or more with no noticable problems. We have
been using Reader 3 and 4 and Acrobat 4, but mostly
version 4 of each. 

Thanks for your help!

Rich


--- Leonard Rosenthol <[EMAIL PROTECTED]> wrote:
> At 01:10 PM 4/4/2003 -0800, Rich McAneny wrote:
> >In working with another PDF package, I found that
> >there is a PDF value(?) called:
> >
> >/NeedAppearances true
> >
> >which I needed to add to the AcroForm Object. (This
> >caused the Appearances to be rebuilt by PDF.
> 
>  Using NeedAppearances is BAD - it's
> behavior is inconsistent with 
> different versions of Adobe Acrobat (and OS
> platforms) and is useless on in 
> other PDF Viewers.
> 
>  iText does form filling the CORRECT way by
> generating correct 
> appearances for the data as it fills it in.
> 
> 
> 
> >I tried this using iText and it worked as well.
> Below
> >is the code that I used/changed. It dropped the
> >creation time from 14-15 seconds down to 2-3.
> 
>  Because you left appearance generation for
> client side, so that 
> your user will have to wait longer for their forms
> to appear - IF they 
> appear at all!  I suggest you spend some time trying
> this with different 
> versions of Acrobat 3 vs. 4 vs. 5 vs. 5.1, and
> Reader vs. Approval vs. 
> Acrobat.  You will find some that the user
> experience will vary greatly AND 
> in some cases will be unacceptable (since the user
> will see the WRONG THING!).
> 
> 
> Leonard
>
---
> Leonard Rosenthol   
> 
> Chief Technical Officer 
> 
> PDF Sages, Inc. 
> 215-629-3700 (voice)
> 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Joining fields using acroform

2003-04-04 Thread Leonard Rosenthol
At 01:10 PM 4/4/2003 -0800, Rich McAneny wrote:
In working with another PDF package, I found that
there is a PDF value(?) called:
/NeedAppearances true

which I needed to add to the AcroForm Object. (This
caused the Appearances to be rebuilt by PDF.
Using NeedAppearances is BAD - it's behavior is inconsistent with 
different versions of Adobe Acrobat (and OS platforms) and is useless on in 
other PDF Viewers.

iText does form filling the CORRECT way by generating correct 
appearances for the data as it fills it in.



I tried this using iText and it worked as well. Below
is the code that I used/changed. It dropped the
creation time from 14-15 seconds down to 2-3.
Because you left appearance generation for client side, so that 
your user will have to wait longer for their forms to appear - IF they 
appear at all!  I suggest you spend some time trying this with different 
versions of Acrobat 3 vs. 4 vs. 5 vs. 5.1, and Reader vs. Approval vs. 
Acrobat.  You will find some that the user experience will vary greatly AND 
in some cases will be unacceptable (since the user will see the WRONG THING!).

Leonard
---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-629-3700 (voice)


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Joining fields using acroform

2003-04-04 Thread Rich McAneny
In working with another PDF package, I found that
there is a PDF value(?) called: 

/NeedAppearances true

which I needed to add to the AcroForm Object. (This
caused the Appearances to be rebuilt by PDF.

I tried this using iText and it worked as well. Below
is the code that I used/changed. It dropped the
creation time from 14-15 seconds down to 2-3. This
appears to work for my case - the fonts, etc, all come
up as desired. I ONLY have text boxes in my PDFs,
though. 

If this does not set all appearance values, perhaps we
can have a setNeedAppearances() flag that will allow
for both methods.

in AcroFields.Fill() method, I added the following
line:
top.put(new PdfName("NeedAppearances"),
dfBoolean.PDFTRUE);


<-- CODE SNIPPET >
void fill() {
fields = new HashMap();
PdfDictionary top =
(PdfDictionary)PdfReader.getPdfObject(reader.getCatalog().get(PdfName.ACROFORM));

//HERE ADD NeedAppearances
 top.put(new PdfName("NeedAppearances"),
PdfBoolean.PDFTRUE);
<-- END CODE SNIPPET >

In AcroFields.setValue() I removed the logic around
the setting of appearance and removed the AP from the
widget and merged lists:


<-- CODE SNIPPET >

for (int idx = 0; idx <
item.values.size(); ++idx) {
   
((PdfDictionary)item.values.get(idx)).put(PdfName.V,
v);
PdfDictionary merged =
(PdfDictionary)item.merged.get(idx);
merged.put(PdfName.V, v);
//PdfAppearance app =
getAppearance(merged, display);
PdfDictionary widget =
(PdfDictionary)item.widgets.get(idx);
if (PdfName.CH.equals(type)) {
PdfNumber n = new
PdfNumber(topFirst);
widget.put(PdfName.TI, n); 
merged.put(PdfName.TI, n);
}
widget.remove(PdfName.AP);//HERE
REMOVE AP
merged.remove(PdfName.AP); //HERE
REMOVE AP
 
//HERE REMOVED APPEARANCE LOGIC   
/*PdfDictionary appDic =
(PdfDictionary)PdfReader.getPdfObject(widget.get(PdfName.AP));
if (appDic == null) {
appDic = new PdfDictionary();
widget.put(PdfName.AP, appDic);
merged.put(PdfName.AP, appDic);
}
appDic.put(PdfName.N,
app.getIndirectReference());
 */
}

<-- END CODE SNIPPET >

 

>The problem here is that the appearances must also be
>created with borders,
>fonts and alignments. Setting the field is fast,
>creating the appearance is
>not.

>Best Regards,
>Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 16:03
> To:   Leonard Rosenthol
> Cc:   [EMAIL PROTECTED]
> Subject:  Re: [iText-questions] Joining fields
using acroform
> 
> 
> 
> 
> I'm not flattening anything at that point. But when
I tried adding the
> fields one by one, i tried to comment out only the
setfield. Then
> I realized that it was only this method that was
really wasting time in
> any
> greater extent. I used a hashmap containing
fieldsname
> and fieldvalue pairs and set those values using the
acrofield setfield
> method.
> 
> 
> Regards,
> Thomas
> 
> 
> 
> 
> At 04:57 PM 4/3/2003 +0300, [EMAIL PROTECTED] wrote:
> >I'm using I-text to merge data into a pdf file
using the fdfReader. This
> >works fine, but the problem i'm facing is that it's
very slow.
> 
>  i've noticed the same thing, and am looking
at where the problem
> lies...Are you also using flattening or just
filling?
> 
> 
> >can be a problem in an interactive system. My
question is: Is it just a
> >fact that the merging process is that slow because
of
> >the nature of the pdf, or might there be some error
I'm making, or
> perhaps
> >would there be room for performance enhancements
> 
>  It's not PDF - it's iText...
> 
> 
> Leonard


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Joining fields using acroform

2003-04-03 Thread Paulo Soares
The problem here is that the appearances must also be created with borders,
fonts and alignments. Setting the field is fast, creating the appearance is
not.

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 16:03
> To:   Leonard Rosenthol
> Cc:   [EMAIL PROTECTED]
> Subject:  Re: [iText-questions] Joining fields using acroform
> 
> 
> 
> 
> I'm not flattening anything at that point. But when I tried adding the
> fields one by one, i tried to comment out only the setfield. Then
> I realized that it was only this method that was really wasting time in
> any
> greater extent. I used a hashmap containing fieldsname
> and fieldvalue pairs and set those values using the acrofield setfield
> method.
> 
> 
> Regards,
> Thomas
> 
> 
> 
> 
> At 04:57 PM 4/3/2003 +0300, [EMAIL PROTECTED] wrote:
> >I'm using I-text to merge data into a pdf file using the fdfReader. This
> >works fine, but the problem i'm facing is that it's very slow.
> 
>  i've noticed the same thing, and am looking at where the problem
> lies...Are you also using flattening or just filling?
> 
> 
> >can be a problem in an interactive system. My question is: Is it just a
> >fact that the merging process is that slow because of
> >the nature of the pdf, or might there be some error I'm making, or
> perhaps
> >would there be room for performance enhancements
> 
>  It's not PDF - it's iText...
> 
> 
> Leonard
> --
> -
> Leonard Rosenthol
> <mailto:[EMAIL PROTECTED]>
> Chief Technical Officer  <http://www.pdfsages.com>
> PDF Sages, Inc.  215-629-3700 (voice)
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Joining fields using acroform

2003-04-03 Thread Leonard Rosenthol
At 04:57 PM 4/3/2003 +0300, [EMAIL PROTECTED] wrote:
I'm using I-text to merge data into a pdf file using the fdfReader. This
works fine, but the problem i'm facing is that it's very slow.
i've noticed the same thing, and am looking at where the problem 
lies...Are you also using flattening or just filling?


can be a problem in an interactive system. My question is: Is it just a
fact that the merging process is that slow because of
the nature of the pdf, or might there be some error I'm making, or perhaps
would there be room for performance enhancements
It's not PDF - it's iText...

Leonard
---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-629-3700 (voice)


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Joining fields using acroform

2003-04-03 Thread Thomas . Byholm



I'm not flattening anything at that point. But when I tried adding the
fields one by one, i tried to comment out only the setfield. Then
I realized that it was only this method that was really wasting time in any
greater extent. I used a hashmap containing fieldsname
and fieldvalue pairs and set those values using the acrofield setfield
method.


Regards,
Thomas




At 04:57 PM 4/3/2003 +0300, [EMAIL PROTECTED] wrote:
>I'm using I-text to merge data into a pdf file using the fdfReader. This
>works fine, but the problem i'm facing is that it's very slow.

 i've noticed the same thing, and am looking at where the problem
lies...Are you also using flattening or just filling?


>can be a problem in an interactive system. My question is: Is it just a
>fact that the merging process is that slow because of
>the nature of the pdf, or might there be some error I'm making, or perhaps
>would there be room for performance enhancements

 It's not PDF - it's iText...


Leonard
---
Leonard Rosenthol
Chief Technical Officer  
PDF Sages, Inc.  215-629-3700 (voice)








---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Joining fields using acroform

2003-04-03 Thread Paulo Soares
>From what you say it takes 15 seconds to read a document, set 40 fields and
write the document back to disk. In pdf there's always lots of work to do to
keep the structure. I'm sure that a dedicated C program would be faster.

Best Regards,
Paulo Soares

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 14:57
> To:   [EMAIL PROTECTED]
> Subject:  [iText-questions] Joining fields using acroform
> 
> Hello,
> 
> 
> I'm using I-text to merge data into a pdf file using the fdfReader. This
> works fine, but the problem i'm facing is that it's very slow.
> I have to add probably around 40 textfields each intto around 4 documents,
> which tends to last for over  a minute, which
> can be a problem in an interactive system. My question is: Is it just a
> fact that the merging process is that slow because of
> the nature of the pdf, or might there be some error I'm making, or perhaps
> would there be room for performance enhancements
> in the itext library sometime in the future? I first tried to add the
> fields one by one using the acroform fields but that was even slower.
> 
> Regards,
> Thomas Byholm
> 
> ...
> ...
> 
> Document mergedPDF = new Document();
> ByteArrayOutputStream outStream = new ByteArrayOutputStream();
>  PdfCopy writer = new PdfCopy(mergedPDF, outStream);
>  mergedPDF.open();
> PdfReader singlePDF = new PdfReader(templateName);
> ByteArrayOutputStream pdfStream = new ByteArrayOutputStream();
> PdfStamper stamp = new PdfStamper(singlePDF, pdfStream);
> AcroFields form = stamp.getAcroFields();
> FdfReader fdfreader = new FdfReader(fdf);
> form.setFields(fdfreader);
> 
> 
> .
> 
> 
> 
> 
> 
> ---
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions