Re: [iText-questions] Content stream question

2011-10-28 Thread Mark Storer
I suggest you run the PDF Syntax Check on the file, just to be sure.

Stuff that Acrobat glosses over when displaying a form still get flagged
by the check.  I'm pretty sure it's only available in the "pro"
versions.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 

> -Original Message-
> From: Kevin Day [mailto:ke...@trumpetinc.com] 
> Sent: Friday, October 28, 2011 9:34 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Content stream question
> 
> Leanord:  I hear you...  It's funny b/c if from day one, it 
> hadn't accepted garbage, then the developers that were using 
> Acrobat as a litmus test to ensure compliance would have 
> known they were making mistakes and would have fixed them.  
> Now, of course, the cat is out of the bag, the cow has left 
> the barn, etc... - now if Adobe changes their stance on this, 
> the users blame Acrobat for not reading files.  It's the 
> whole IE situation all over again. 
> I don't envy the position you are in.
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Content-stream-ques
tion-tp3946312p3948491.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> The demand for IT networking professionals continues to grow, 
> and the demand for specialized networking skills is growing 
> even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn 
> about Cisco certifications, training, and career opportunities. 
> http://p.sf.net/sfu/cisco-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Content stream question

2011-10-27 Thread Mark Storer
Can we see the actual PDF?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 

> -Original Message-
> From: Kevin Day [mailto:ke...@trumpetinc.com] 
> Sent: Thursday, October 27, 2011 3:57 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Content stream question
> 
> I have an existing PDF that I'm trying to parse text out of, 
> and am winding up with a null pointer exception when reading 
> an array in the content stream.
> 
> I have narrowed the problem down to a particular line in the 
> content stream (if I run this one line through 
> PdfContentParser.parse() it fails):
> 
> Here is the line (sorry this is so ugly - I'll describe the 
> exact location of the problem in a second):
> 
> [(*)-15(*)-15(&+,)(*)-15(-./0,123/45)(*)-15(/.)(*)-15(/2+,.)(*
)-15(346/.7823/4)(*)-15(9,4,.82,:)(*)-15(;<)(*)-15(&+,)(*)-15(!>
==>52.823/4)(*)-15(?,4,.82/.)(*)-20(.,98.:349)(*)-20(2+,)(*)-2
0(=3@,=3> +//:)(*)-20(/6)(*)-20(A8.3/>5)(*)-20(34A,527,42)(*)-20(/>)[(*)
> -15(*)-15(&+,)(*)-15(-./0,123/45)(*)-15(/.)(*)-15(/2+,.)(*)-15
(346/.7823/4)(*)-15(9,4,.82,:)(*)-15(;<)(*)-15(&+,)(*)-15(!>
==>52.823/4)(*)-15(?,4,.82/.)(*)-20(.,98.:349)(*)-20(2+,)(*)-2
0(=3@,=3> +//:)(*)-20(/6)(*)-20(A8.3/>5)(*)-20(34A,527,42)(*)-20(/>)(21/
> 7,5)(*)-20(8.,)(*)-20(+<-/2+,2318=)(*)-20(34*)]
> TJ
> 
> 
> The problem is that there appears to be an open bracket [ in 
> the middle of this line.  If you search for -20(/>)[(*)-15  
> the problem is that open bracket.  This makes the parser 
> think it's reading an array inside the array.  The ending ] 
> then closes the inner array, and the whole thing blows up.
> 
> At first blush, this looks like it's just a bad PDF.  But the 
> trick is that Acrobat parses and renders this thing just fine.
> 
> So my question is:  Is it possible that the above is actually 
> valid per the PDF spec, and we are just missing something 
> with the tokeniser or parser? 
> It wouldn't seem like it would valid.  But if that were the 
> case, you'd really think that Acrobat wouldn't be able to 
> parse it, either.
> 
> Are we missing something in our parser, or is Acrobat doing 
> some sort of intense logic to reconstruct the Tj operation if 
> the array doesn't terminate properly?  I've done some 
> thinking on this, and I see no reasonable strategy for 
> determining where in the content stream to insert an artificial ]
> 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Content-stream-ques
tion-tp3946312p3946312.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> The demand for IT networking professionals continues to grow, 
> and the demand for specialized networking skills is growing 
> even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn 
> about Cisco certifications, training, and career opportunities. 
> http://p.sf.net/sfu/cisco-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How do you stop iText from automatically adding cm operators to content streams?

2011-10-26 Thread Mark Storer
I suggest you step through the source, find out where the problem lies,
and change it.  Open Source is great like that.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 

> -Original Message-
> From: Billy Anachronism [mailto:twhitbo...@gmail.com] 
> Sent: Tuesday, October 25, 2011 8:29 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] How do you stop iText from 
> automatically adding cm operators to content streams?
> 
> Hi,
> 
> I am having problems working with iText and scanned PDFs.
> 
> Scanned PDFs sometimes have the dimensions of a "landscape" 
> document (e.g.
> horizontal A4) but are rotated to be "portrait" when viewing 
> in a PDF reader. When I try to append content to these 
> documents with PDFStamper, It seems that iText figures out 
> that if it appends content as-is, it will appear sideways; so 
> it tries to compensate for this by appending a cm to the 
> start of either UnderContent or OverContent (depending on 
> what is used). For example, when modifying an A4 PDF with the 
> dimensions 842.40 x 595.44 and the flag /Rotate 270 on each 
> page, iText adds "0 -1 1 0 0 595.44 cm" to each newly added 
> content stream.
> 
> The problem is that when you use UnderContent and 
> OverContent, iText will add a cm each time which can mean 
> (depending on what you do with
> UnderContent) that the OverContent will appear "out of phase".
> 
> Is there any way to stop iText from adding cm operators? My 
> work-around at the moment is to manually append a "Q" after 
> the cm which is probably not an ideal solution.
> 
> Thanks
> 
> Billy
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/How-do-you-stop-iTe
xt-from-automatically-adding-cm-operators-to-content-streams->
tp3939221p3939221.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> The demand for IT networking professionals continues to grow, 
> and the demand for specialized networking skills is growing 
> even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn 
> about Cisco certifications, training, and career opportunities. 
> http://p.sf.net/sfu/cisco-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Seemingly conflicting results when getting Pagesdictionary

2011-10-25 Thread Mark Storer
Use The Source, Luke:
http://itext.svn.sourceforge.net/viewvc/itext/trunk/itext/src/main/java/
com/itextpdf/text/
 
In particular:
 
http://itext.svn.sourceforge.net/viewvc/itext/trunk/itext/src/main/java/
com/itextpdf/text/pdf/PdfDictionary.java?revision=4806&view=markup
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: William Bell [mailto:wrb...@btinternet.com] 
Sent: Monday, October 24, 2011 7:40 AM
To: 'Post all your questions about iText here'
Subject: [iText-questions] Seemingly conflicting results when
getting Pagesdictionary



Hi All,

 

The following code snippet appears to produce conflicting
results...

 

 

code

-

PdfReader reader = new PdfReader (filename);

PdfDictionary dic = reader.Catalog.GetAsDict (PdfName.PAGES);

 

MessageBox.Show ("name = " + dic.ToString());

 

if (dic.IsPages())

  MessageBox.Show ("is pages");

else

  MessageBox.Show ("not pages");

 

output

---

name = Dictionary of type: /Pages

not pages

 

 

Can anyone explain why if dic has been got as a Pages dictionary
- as indicated by 1st result - does the IsPages test return it is not a
pages dictionary?

 

Kind regards

William

William Bell

 

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] PDFReader and secured PDF

2011-10-14 Thread Mark Storer
Only the "open" password is backed with Strong Crypto.  The rest is
legalese and by-your-leave.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 

> -Original Message-
> From: spr...@gmx.eu [mailto:spr...@gmx.eu] 
> Sent: Friday, October 14, 2011 9:55 AM
> To: 'Post all your questions about iText here'
> Subject: Re: [iText-questions] PDFReader and secured PDF
> 
> > Because 1.4 was wrong by not respecting the rights of the 
> PDF author, 
> > so it was fixed.
> 
> Ah ok. So these rights are only efective if the applications 
> respects them?
> There is no encryption or something else.
> 
> 
> --
> 
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application 
> performance, security threats, fraudulent activity and more. 
> Splunk takes this data and makes sense of it. Business sense. 
> IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] iText - Dynamic Table + Footer

2011-10-14 Thread Mark Storer
Use a bottom margin to protect your page numbers.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Lucas Francisco [mailto:dominic...@hotmail.com] 
Sent: Friday, October 14, 2011 9:29 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] iText - Dynamic Table + Footer


Hy everyone.

I'm facing a problem using a dynamic table and a footer.
My app does add cell in a table dynamically and sometimes, the
table height is greater than the page one.
When it happens, my table write upon the footer and i can't see
my footer (page number).

I'm sending in example a preview.

Could anyone help me ?

C ya.
Regards.


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] PDF Trimbox

2011-10-14 Thread Mark Storer
Look at the parameter type that PdfDictionary.put takes for the second
parameter.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Tom Vermeulen [mailto:t.vermeu...@artoos.be] 
Sent: Friday, October 14, 2011 2:52 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] PDF Trimbox



Hello,

 

I must change the trimbox from existing PDf files in vb.net

This is the code but I get an error on the PageDic.Put

 

   Dim pageNum as integer

   Dim pdfdoc As New iTextSharp.text.pdf.PdfReader(outputPath)

   Dim pdfName As iTextSharp.text.pdf.PdfName  



   For pageNum = 0 to pdfdoc.NumberOfPages

  Dim PageDic As iTextSharp.text.pdf.PdfDictionary =
pdfdoc.GetPageN(pageNum)

  Dim TrimBoxSize As New
iTextSharp.text.Rectangle(20,20,100,100)

  PageDic.Put(pdfName.TRIMBOX, TrimBoxSize)

   Next

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] shrink text to fit rectangle

2011-10-12 Thread Mark Storer
There sure is.  If you set up a ColumnText, then call .go(true), it'll
run in "simulated" mode, and won't actually draw anything.  You can then
call getYLine() to see where the text ended.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Costa Basil [mailto:costa_ba...@yahoo.ca] 
Sent: Wednesday, October 12, 2011 11:02 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] shrink text to fit rectangle


Thank you. This looks like exactly what I am looking for.


One more question, is there a way for a given text to find
compute the size of the rectangle that would fit the text, assuming some
horizontal constraints (let's say the width can't go beyond a certain
value).


Thank you again.


________

From: Mark Storer 
To: Costa Basil ; Post all your questions
about iText here 
Sent: Wednesday, October 12, 2011 10:55:18 AM
Subject: RE: [iText-questions] shrink text to fit rectangle


There's some code in iText that does precisely this.  Look in
the TextField source
<http://itext.svn.sourceforge.net/viewvc/itext/trunk/itext/src/main/java
/com/itextpdf/text/pdf/TextField.java?revision=4784&view=markup>   for
appearance generation when the font size is set to zero, starting on
line 213 for multiline text, or on 247 for single-line text.
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Costa Basil [mailto:costa_ba...@yahoo.ca] 
Sent: Wednesday, October 12, 2011 10:39 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] shrink text to fit rectangle


What is the best way to shrink a text to fit a given
rectangle on a page?




--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] shrink text to fit rectangle

2011-10-12 Thread Mark Storer
There's some code in iText that does precisely this.  Look in the
TextField source
<http://itext.svn.sourceforge.net/viewvc/itext/trunk/itext/src/main/java
/com/itextpdf/text/pdf/TextField.java?revision=4784&view=markup>   for
appearance generation when the font size is set to zero, starting on
line 213 for multiline text, or on 247 for single-line text.
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Costa Basil [mailto:costa_ba...@yahoo.ca] 
Sent: Wednesday, October 12, 2011 10:39 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] shrink text to fit rectangle


What is the best way to shrink a text to fit a given rectangle
on a page?


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] What are those unused objects in a PDFdocument

2011-10-11 Thread Mark Storer
Not neccessarily!
 
You could create a new class that inherits from PdfReader and overrides
RemoveUnusedObjects() (unless it's private... but I think it's public).
Yep, sure is.
 
So your version of RemoveUnusedObjects can do all that stuff I suggested
the first time around.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: WMJ [mailto:sd_...@yahoo.com] 
Sent: Friday, October 07, 2011 6:49 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] What are those unused objects in
a PDFdocument


Hello,


Thank you for your reply. They are really filtered, since the
RemoveUnusedObjects method is called when a PDF document is loaded. Thus
I've got to hack the source code and modify the ReadPdf method in the
PdfReader class and comment out the calling statement.





    From: Mark Storer 
Subject: RE: [iText-questions] What are those unused
objects in a PDFdocument


Filtered?  No.  Inaccessible from the root following
various indirect references?  Yep.  That's why their unused.
 
If you really don't want to touch the source, you should
be able to step through all the objects before and after
RemoveUnusedObjects, and dump the ones that were removed after the fact.
 
Here's some pseudocode.
 
Map allObjects
For each indirect object in the reader
   allObjects.put(obj number, string representation);
 
RemoveUnusedObjects();
 
for each indirect object in the reader
  allObjects.remove(obj number);
 
for each entry in allObjects
  System.out.println(entry.value);
 
 
For PdfArrays and PdfDictionaries, you should be able to
use the toString() of the underlying ArrayList or HashMap.  For
PdfStreams, you probably just want to note that its a stream unless you
really want to show all the binary data of some image/font/content
stream.  The last might be interesting, but the binary gobbledegook of
images and fonts probably won't tell you much.
     
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: WMJ [mailto:sd_...@yahoo.com] 
Sent: Thursday, October 06, 2011 4:32 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] What are those
unused objects in a PDFdocument


It seems that those unused objects are already
filtered when the document is loaded and the only way to inspect them is
to hack the source code.





Subject: RE: [iText-questions] What are
those unused objects in a PDF document


You could hack the source to dump a
string representation of those objects to System.out prior to removing
them.  Shouldn't be too hard.
 
    --Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: WMJ [mailto:sd_...@yahoo.com] 
Sent: Thursday, October 06, 2011 2:17 AM
To:
iText-questions@lists.sourceforge.net
Subject: [iText-questions] What are
those unused objects in a PDF document


Hello,

I find that there's a
RemoveUnusedObjects method in the PdfReader class.
It seems that there can be some objects
which are not refe

Re: [iText-questions] Generating multi-page file from single-pagetemplate

2011-10-11 Thread Mark Storer
All fields within a form that share a name also share their value.
Merging multiple instances of the same form is Tough.
 
It's also one of the main reasons I use flattening.
 
So:  Build your PDF one page at a time.  Save each page out to a memory
stream, then import them all into a final PDF.  Not terribly efficient,
but it works.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Chris Harry [mailto:cha...@gmail.com] 
Sent: Tuesday, October 11, 2011 12:57 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Generating multi-page file from
single-pagetemplate


Im currently attempting to take a template file (a single page
PDF file residing on the filesystem) and creating a multiple page output
file, based on a certain number of invoices that need to be printed at
once.  The template file contains form fields (address info, item info,
etc) that will be populated for each single invoice, which should then
be saved as part of a larger document.  If the customer has 23 invoices,
I need to create 23 copies of the template, filling in the appropriate
information for each copy.

The issue Im running into is that I cant seem to get PdfStamper
to work correctly in this fashion.  I can get it to work for one single
page of output, but when trying to loop it doesnt seem to fill in any of
the fields.  The form fill function is called and does not error out,
but the finished file has no data in it.

I havent seen an example quite like what I need to
accomplishmost of what Ive found seems to be creating SEPARATE files
from copies of a template.  I know this is a possible solution (i.e.
create 23 separate files and then PDFCopy or SmartCopy them together),
but was wondering if there is a more elegant way to do what I need.

Thanks in advance.

-Chris


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Add rotation to a page

2011-10-07 Thread Mark Storer
Prior to creating the imported page, you can get the page's dictionary
and twiddle its rotation.

PdfDictionary pageDict = reader.getPageN(1);
PdfNumber pageRot = pageDict.getAsNumber(PdfName.ROTATE);
PdfNumber newRot = null;
if (pageRot == null) {
  newRot = new PdfNumber(90);
} else {
  int currRot = pageRot.intValue();
  currRot += 90;
  currRot %= 360;
  newRot = new PdfNumber(currRot);
}
pageDict.put(PdfName.ROTATE, newRot);

I believe you can do this any time before you call pdfCopy.add(), but
I'm not entirely sure.  Safest to do it before creating the
PdfImportedPage.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 

> -Original Message-
> From: mingqiang yu [mailto:mingqi...@gmail.com] 
> Sent: Friday, October 07, 2011 11:07 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Add rotation to a page
> 
> Hi,
> 
> How can I add a rotation value to a PdfImportedPage page? For 
> example, my rotation value is 90, how can I apply it to my 
> new PdfImportedPage?
> 
> ByteArrayOutputStream baos = getImageBaos();
> reader = new PdfReader(baos.toByteArray());
> itextDoc.open();
> PdfImportedPage page = 
> pdfCopy.getImportedPage(reader, 1); // I'm only getting the 1st page
> pdfCopy.addPage(page);
> baos.close();
> itextDoc.close();
> pdfCopy.close();
> 
> Thanks a lot!
> 
> M.
> 
> --
> 
> All of the data generated in your IT infrastructure is 
> seriously valuable.
> Why? It contains a definitive record of application 
> performance, security threats, fraudulent activity, and more. 
> Splunk takes this data and makes sense of it. IT sense. And 
> common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] What are those unused objects in a PDFdocument

2011-10-07 Thread Mark Storer
Filtered?  No.  Inaccessible from the root following various indirect
references?  Yep.  That's why their unused.
 
If you really don't want to touch the source, you should be able to step
through all the objects before and after RemoveUnusedObjects, and dump
the ones that were removed after the fact.
 
Here's some pseudocode.
 
Map allObjects
For each indirect object in the reader
   allObjects.put(obj number, string representation);
 
RemoveUnusedObjects();
 
for each indirect object in the reader
  allObjects.remove(obj number);
 
for each entry in allObjects
  System.out.println(entry.value);
 
 
For PdfArrays and PdfDictionaries, you should be able to use the
toString() of the underlying ArrayList or HashMap.  For PdfStreams, you
probably just want to note that its a stream unless you really want to
show all the binary data of some image/font/content stream.  The last
might be interesting, but the binary gobbledegook of images and fonts
probably won't tell you much.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: WMJ [mailto:sd_...@yahoo.com] 
Sent: Thursday, October 06, 2011 4:32 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] What are those unused objects in
a PDFdocument


It seems that those unused objects are already filtered when the
document is loaded and the only way to inspect them is to hack the
source code.





Subject: RE: [iText-questions] What are those unused
objects in a PDF document


You could hack the source to dump a string
representation of those objects to System.out prior to removing them.
Shouldn't be too hard.
     
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: WMJ [mailto:sd_...@yahoo.com] 
Sent: Thursday, October 06, 2011 2:17 AM
To: iText-questions@lists.sourceforge.net
Subject: [iText-questions] What are those unused
objects in a PDF document


Hello,

I find that there's a RemoveUnusedObjects method
in the PdfReader class.
It seems that there can be some objects which
are not referenced by other objects and hence are "unused".
Some PDF files, after processed by the
RemoveUnusedObjects, can dramatically reduce to 30% the size of the
original one.
I wondered what's inside those unused objects.
Is it possible to find out what things are in
those removed objects?

WMJ





--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Add Named Destinations to Existing PDF

2011-10-06 Thread Mark Storer
You may have to read the PDF Spec (see sig block), and use iText's
PdfDictionary/PdfArray/PdfString/etc classes directly.



--Mark Storer <mailto:marksto...@itextsoftware.com> 
  PDF Guru
  Modestest Man In The World
  Autonomy Cardiff <http://www.cardiff.com/> 
  iText Software <http://www.itextsoftware.com/> 
 
PDF Spec ( <http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf>
ISO <http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf>  32000)
<http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf>  
iText JavaDoc <http://api.itextpdf.com/> 
iText SVN
<http://itext.svn.sourceforge.net/viewvc/itext/trunk/src/core/com/itextp
df/text/pdf/> 

Autonomy Corp., an HP Company


> -Original Message-
> From: vfeki [mailto:vf...@yahoo.com]
> Sent: Thursday, October 06, 2011 4:04 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Add Named Destinations to Existing PDF
>
> Hi Everybody,
>
> I have an issue adding new named destinations to existing PDF
> document.
>
> I am able to retrieve them etc but cannot add named
> destination to a specific XYZ position.
>
> What I am trying to do is:
> I have a list of bookmarks, and want to create Named
> Destination for each of them, so that later can reference
> them by the named destination.
> Just to emphasize that I need to preserve existing ones, just
> want to add new named destinations for each position where
> bookmark points to.
>
> Can you please give me a hand on this, since I am able to
> override them or create for the new document, but cannot find
> a way (and have looked through the book also) how to add to
> an existing PDF document.
>
> Also tried with Anchor/Chunk, but it is not what I need.
>
> Thank you in advance,
> Vfeki
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/Add-Named-Destinati
ons-to-Existing-PDF-tp3877750p3877750.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
> --
> 
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application
> performance, security threats, fraudulent activity and more.
> Splunk takes this data and makes sense of it. Business sense.
> IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered
> with a reference to the iText book:
> http://www.itextpdf.com/book/ Please check the keywords list
> before you ask for examples: http://itextpdf.com/themes/keywords.php
>
> 
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] advance vertical position manually?

2011-10-06 Thread Mark Storer
Not /explicitly/, no.

But you can slap any old "invisible" object on the page as a
placeholder.  Empty paragraphs with odd padding.  Rectangles with no
borders.  A 1-pixel "0% alpha" image stretched to the size you need.
There are probably other things you could try too.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 

> -Original Message-
> From: Jason Berk [mailto:jb...@purduefed.com] 
> Sent: Thursday, October 06, 2011 10:12 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] advance vertical position manually?
> 
> Is there any way to manually advance the vertical position 
> after adding absolutely positioned content?
> 
> 
> 
> Jason Berk
> jb...@purduefed.com
> 
> 
> This is a transmission from Purdue Federal Credit Union 
> (Purdue Federal) and is intended solely for its authorized 
> recipient(s), and may contain information that is 
> confidential and or legally privileged. If you are not an 
> addressee, or the employee or agent responsible for 
> delivering it to an addressee, you are hereby notified that 
> any use, dissemination, distribution, publication or copying 
> of the information contained in this email is strictly 
> prohibited. If you have received this transmission in error, 
> please notify us by telephoning (765)497-3328 or returning 
> the email. You are then instructed to delete the information 
> from your computer. Thank you for your cooperation.
> 
> 
> --
> 
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application 
> performance, security threats, fraudulent activity and more. 
> Splunk takes this data and makes sense of it. Business sense. 
> IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] What are those unused objects in a PDF document

2011-10-06 Thread Mark Storer
You could hack the source to dump a string representation of those
objects to System.out prior to removing them.  Shouldn't be too hard.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: WMJ [mailto:sd_...@yahoo.com] 
Sent: Thursday, October 06, 2011 2:17 AM
To: iText-questions@lists.sourceforge.net
Subject: [iText-questions] What are those unused objects in a
PDF document


Hello,

I find that there's a RemoveUnusedObjects method in the
PdfReader class.
It seems that there can be some objects which are not referenced
by other objects and hence are "unused".
Some PDF files, after processed by the RemoveUnusedObjects, can
dramatically reduce to 30% the size of the original one.
I wondered what's inside those unused objects.
Is it possible to find out what things are in those removed
objects?

WMJ



--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] acroform text field does not get hiden injavascript

2011-10-05 Thread Mark Storer
Ah... a suggestion.  If the field annotation itself is big enough,
setting its background color & text color both to white and setting it
read only will have the same effect.
 
You can adjust the size of an annotation in iText easily enough... say
expand the field by N points in every direction when dealing with OOo
forms.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Sailesh K [mailto:skrish...@yahoo.com] 
Sent: Tuesday, October 04, 2011 8:26 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] acroform text field does not get
hiden injavascript


Hi,
 
I tried creating an acroform as described in the book using
openoffice and exporting as pdf.
I then try to set some of the fields to invisible using
javascript like:

this.getField("sAddress").hidden = true;
but the text field only becomes kinda inactive but is still
visible.
Has anyone run into this issue before?
 
Cheers

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] acroform text field does not get hiden injavascript

2011-10-05 Thread Mark Storer
I suspect the fields are only part field, and part page content.
 
In other words, the Actual Field Annotation has no borders or
background.  What you see "around" the field is actually part of the
page, not the field.
 
So you cannot make it invisible... at least not without some Very Fancy
Coding on your part.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
Autonomy Corp., an HP Company
 




From: Sailesh K [mailto:skrish...@yahoo.com] 
Sent: Tuesday, October 04, 2011 8:26 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] acroform text field does not get
hiden injavascript


Hi,
 
I tried creating an acroform as described in the book using
openoffice and exporting as pdf.
I then try to set some of the fields to invisible using
javascript like:

this.getField("sAddress").hidden = true;
but the text field only becomes kinda inactive but is still
visible.
Has anyone run into this issue before?
 
Cheers

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] [Book]

2011-09-22 Thread Mark Storer
I'd just build the entire page each time.  There might be some
boilerplate there, but I think the reduced technical complexity will be
worth it.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Martin Schwartzman [mailto:mschwartz...@ittvis.com] 
Sent: Thursday, September 22, 2011 4:15 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] [Book]



If you go with #1 I would look at section 15.3.5 from the book.
You can mark objects when you generate your template then use PdfReader
to find them and insert your new dynamic content.

 

 

From: Mark Storer [mailto:msto...@autonomy.com] 
Sent: Thursday, September 22, 2011 1:49 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] [Book]

 

I suggest going with #1.  Build all your static content in
advance, and only render/insert the pages with dynamic content as
needed.

 

    --Mark Storer

  Senior Software Engineer

  Cardiff.com

 

import legalese.Disclaimer;

Disclaimer DisCard = null;

 

 

 





From: Herold, Douglas [mailto:dher...@kheaa.com] 
Sent: Thursday, September 22, 2011 7:32 AM
To: 'itext-questions@lists.sourceforge.net'
Subject: [iText-questions] [Book]

Hi

We are going to create a large report (30 or 40 pages)
for our company using iText for Java.  The report will have a lot of
static data and images.  The report will also have dynamic data and
graphs about the current logged in user.  I was wondering what the best
way to handle the static data and images would be. I have looked all
over the internet and cannot find any articles on this subject. I have
also asked the question in a few forums with no real help. These reports
will need to be generated on the fly and returned to the user
immediately, so performance is a must.  The report will be served up
using a Java Servlet in a web application.

 

These are some of my initial thoughts on how to solve
the problem.  I would really like some input on what issues other people
have had when doing a report like this so I can write/design a good
solid report that is easily maintained.

 

1.)We could create a PDF with all the static content
and images.  Then open the PDF with Java and insert the dynamic content
and graphs.  Is there a way to put place holders in the PDF that I could
use with the Java to insert the dynamic data and graphs (which would be
images).

2.)Place the static data in a database and retrieve
it whenever a report is generated.  To me the database design would be
complex.  It would have to take into account pages, paragraphs, titles.
It would also have to takes into account images and the placement of the
image on the page.

3.)We could put the static content in an XML file
and cache the content in the Servlet Context when it initializes.  This
might help with performance issues.  I would think we would still have
the same design issues as the database would have, but might be easier
to maintain.

 

I am using the iText book as a reference, but did not
see that it covered this particular issue. 

 

Thanks For Your Time

Doug

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] [Book]

2011-09-22 Thread Mark Storer
I suggest going with #1.  Build all your static content in advance, and
only render/insert the pages with dynamic content as needed.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Herold, Douglas [mailto:dher...@kheaa.com] 
Sent: Thursday, September 22, 2011 7:32 AM
To: 'itext-questions@lists.sourceforge.net'
Subject: [iText-questions] [Book]



Hi

We are going to create a large report (30 or 40 pages) for our
company using iText for Java.  The report will have a lot of static data
and images.  The report will also have dynamic data and graphs about the
current logged in user.  I was wondering what the best way to handle the
static data and images would be. I have looked all over the internet and
cannot find any articles on this subject. I have also asked the question
in a few forums with no real help. These reports will need to be
generated on the fly and returned to the user immediately, so
performance is a must.  The report will be served up using a Java
Servlet in a web application.

 

These are some of my initial thoughts on how to solve the
problem.  I would really like some input on what issues other people
have had when doing a report like this so I can write/design a good
solid report that is easily maintained.

 

1.)We could create a PDF with all the static content and
images.  Then open the PDF with Java and insert the dynamic content and
graphs.  Is there a way to put place holders in the PDF that I could use
with the Java to insert the dynamic data and graphs (which would be
images).



2.)Place the static data in a database and retrieve it
whenever a report is generated.  To me the database design would be
complex.  It would have to take into account pages, paragraphs, titles.
It would also have to takes into account images and the placement of the
image on the page.



3.)We could put the static content in an XML file and cache
the content in the Servlet Context when it initializes.  This might help
with performance issues.  I would think we would still have the same
design issues as the database would have, but might be easier to
maintain.

 

I am using the iText book as a reference, but did not see that
it covered this particular issue. 

 

Thanks For Your Time

Doug

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] FW: Split secure pdf

2011-09-20 Thread Mark Storer
Only if you have the owner password, or know how to hack that limitation
out of iText's source.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: mingqiang yu [mailto:mingqi...@gmail.com] 
> Sent: Tuesday, September 20, 2011 8:47 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] FW: Split secure pdf
> 
> We need to bring in all pdfs and then split them into 
> individual pages for user to browse through. Is there anyway 
> to do this with secure pdf?
> 
> Thanks!
> 
> On Tue, Sep 20, 2011 at 11:15 AM, 1T3XT BVBA  wrote:
> > On 20/09/2011 17:00, mingqiang yu wrote:
> >> It's just that itext cannot split it.
> >
> > The PDF isn't protected with a user password, only with an 
> owner password.
> > iText can split it (technically), but refuses to do so by choice.
> >
> > 
> --
> >  All the data continuously generated in your IT 
> infrastructure 
> > contains a definitive record of customers, application performance, 
> > security threats, fraudulent activity and more. Splunk 
> takes this data 
> > and makes sense of it. Business sense. IT sense. Common sense.
> > http://p.sf.net/sfu/splunk-d2dcopy1
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be 
> answered with a 
> > reference to the iText book: http://www.itextpdf.com/book/ Please 
> > check the keywords list before you ask for examples: 
> > http://itextpdf.com/themes/keywords.php
> >
> 
> --
> 
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application 
> performance, security threats, fraudulent activity and more. 
> Splunk takes this data and makes sense of it. Business sense. 
> IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Form Flattening

2011-09-16 Thread Mark Storer
> The PDF returned from the client as
> PdfStamper.getAcroFields().getFields() returns 0 fields so I 
> can't readily loop over the fields to do that.

It sounds like the form is already flattened.

To be sure, you can check for an /AcroFields dictionary within the
root/catalog:

  pdfReader.getCatalog().getAsDict(PdfName.ACROFIELDS) != null


OTOH, flattening might remove the fields list but leave the acrofields
dictionary as an empty shell, so the above test might not work.  You
should be able to toString() the acrofields dictionary and see what's
there then write code to deal with whatever is/isn't there.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] 2D dynamic barcodes

2011-09-15 Thread Mark Storer
No, iText cannot do that.

Yes, LiveCycle Designer + Acrobat can do that.

Build the whole form in LCD, then reader-enable it with Acrobat.  Easy
peasy.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: advoco [mailto:po...@op.pl] 
> Sent: Thursday, September 15, 2011 3:27 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] 2D dynamic barcodes
> 
> Because such dynamic barcode won't work when the pdf is 
> opened in free Adobe Reader. And my end user will use only 
> that. To make it work I need Adobe Reader Extensions which 
> cost thousands of dollars and frankly speaking none of the 
> companies I've spoken to was interested in selling me that. I 
> really just need two forms with working barcodes. Hard to 
> believe that there is no alternative. So maybe itext can do that?
> 
> And Acrobat is able to give some permissions (like: you can 
> save a pdf) but unfortunately doesn't work with barcodes.
> 
> I would be grateful for any tips.
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/2D-dynamic-barcodes
-tp3815440p3816950.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, 
> CA ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] limited fonts

2011-09-12 Thread Mark Storer
See that?  You learn something new every day.
 
Paulo wrote FontSelector.
 
So the code would look something like this?
 
  FontSelector selector = new FontSelector();
  selector.add(persainFont);
  selector.add(englishFont);
  Phrase textWithFonts = selector.process(myText);
 
  document.add(textWithFonts);
 
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Paulo Soares [mailto:psoa...@glintt.com] 
Sent: Monday, September 12, 2011 4:00 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] limited fonts


FontSelector

- Original Message - 
From: Mark Storer <mailto:msto...@autonomy.com>  
To: Vahid Nasiri <mailto:vahid_nas...@yahoo.com>  ; Post
all your questions about iText here
<mailto:itext-questions@lists.sourceforge.net>  
Sent: Monday, September 12, 2011 11:30 PM
Subject: Re: [iText-questions] limited fonts

It is not possible, no.
 
You have to parse your text and use the appropriate font
for a given span of characters.
 
    --Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Vahid Nasiri
[mailto:vahid_nas...@yahoo.com] 
Sent: Monday, September 12, 2011 1:41 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] limited fonts


Hello,
I have a custom font which supports a very few
characters such as A, B and C.
If I set and use this font, It will not print
the D part of ABCD, which seems correct but is it possible, like
browsers, force iText lib to switch to a default font and print that D
char too.
I need this functionality for some custom
Persian fonts. These fonts do not contain English chars definitions and
if I use them, I can not show the mixture of English and Persian texts.

Thanks!

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 ___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] limited fonts

2011-09-12 Thread Mark Storer
It is not possible, no.
 
You have to parse your text and use the appropriate font for a given
span of characters.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Vahid Nasiri [mailto:vahid_nas...@yahoo.com] 
Sent: Monday, September 12, 2011 1:41 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] limited fonts


Hello,
I have a custom font which supports a very few characters such
as A, B and C.
If I set and use this font, It will not print the D part of
ABCD, which seems correct but is it possible, like browsers, force iText
lib to switch to a default font and print that D char too.
I need this functionality for some custom Persian fonts. These
fonts do not contain English chars definitions and if I use them, I can
not show the mixture of English and Persian texts.

Thanks!

--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] IText - PDF/A-1A compliance

2011-09-01 Thread Mark Storer
You'll probably also need to buy the PDF/A ISO specification.  The
structure requirements are quite specific.

You might start by finding a PDF/A-1a file and dissecting it in
something like RUPS (free) or the "PDF Can Opener" Acrobat plugin
(commercial).

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: 1T3XT BVBA [mailto:i...@1t3xt.info] 
> Sent: Thursday, September 01, 2011 7:26 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] IText - PDF/A-1A compliance
> 
> On 1/09/2011 15:00, Damien Tacheron wrote:
> > Do you know if it is possible to generate PDF/A-1A 
> compliant pdf file 
> > with IText
> 
> You've read chapter 13, but please read on.
> Make sure you understand what is required for a PDF to be 
> PDF/A-1A compliant.
> It requires that the PDF contains structure information.
> In you code, I don't see you adding that information anywhere!
> See section 15.2.3 to find out what structure information is about.
> 
> --
> 
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even 
> better price-free! And you'll get a free "Love Thy Logs" 
> t-shirt when you download Logger. Secure your free ArcSight 
> Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Unexpected behavior while using Graphics2D

2011-09-01 Thread Mark Storer
It seems to me that the only way to fix this would be to share the
parent's byte stream across all the child objects.  Any child drawing to
the byte stream would need to have its drawing commands wrapped in
whatever clipping/etc was appropriate for that child.

And you'd want to track which child drew last so you wouldn't have to
wrap Every Individual Instruction.  In fact, you'd Have To:

Imagine that a child's calls must be wrapped in the following:

q
10 10 50 50 re
W

Q


Now try to draw some text.

"q clip BT Q"
"q clip /F1 10 Tf Q"
...

You get the idea.  None of the child state changes would make it out of
the wrapping 'q/Q'.


Further, a child's child's child might need wrappers from all it's
parents, not just the immediate parent.


This isn't rocket science, but it's certainly not simple either.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Lucas Madar [mailto:ma...@samsix.com] 
> Sent: Tuesday, August 30, 2011 11:15 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Unexpected behavior while using Graphics2D
> 
> I'm running in to a problem when I use Graphics2D.create() 
> and make several child Graphics objects. It appears that any 
> shapes or text that are drawn in this method draw in the pdf 
> based in the order in which
> Graphics2D.create() was called, not the order in which they 
> were drawn. 
> This behavior does not match Graphics2D in standard AWT 
> drawing or AWT printing.
> 
> It appears this is due to the way each PdfGraphics2D handles 
> creating "kids." The kids' contents are appended to the root 
> document in the order in which they were created. I have 
> attached a test case in which a box and some text are drawn. 
> Using iText, the box appears on top of the text, whereas 
> using standard AWT, the box appears underneath the text.
> 
> While this code is written in iText 2.x, I have verified that 
> this issue currently exists in the latest GPL version of 
> iText as well.
> 
> Thanks,
> Lucas Madar
> 

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How to update A PushbuttonField on an existing PDF

2011-08-24 Thread Mark Storer
You're throwing a Rather Large chunk of code at us and then expecting us
to execute it (on our own servlet-capable server) to get the resulting
PDF.  That's fine for commercial support, but that's not what this
mailing list is for.
 
I suggest you remove the PDF code from your servlet code.  Get it
working "stand alone" with basic file I/O first, then wrap it in a
servlet.

Having said that, nothing in your code is jumping out at me as The
Problem:
 
  //This would simulate the pdf we would display to customer to fill out
  InputStream is =
getServletContext().getResourceAsStream("wwwroot/sample2.pdf");

  // We create a reader with the InputStream
  PdfReader reader = new PdfReader(is, null);

  // We create an OutputStream for the new PDF
  ByteArrayOutputStream baos = new ByteArrayOutputStream();

  // Now we create the PDF
  PdfStamper stamper = new PdfStamper(reader, baos);

  // We get submit button from existing form and change the submit
properties of which
  AcroFields form = stamper.getAcroFields();
  PushbuttonField button =
form.getNewPushbuttonFromField("ScalepointButton");
  PdfFormField submit = button.getField();
 
submit.setAction(PdfAction.createSubmitForm("http://localhost:8084/PDFFo
rms/CapturePdf?category=" + category, null, PdfAction.SUBMIT_PDF));
  form.replacePushbuttonField("ScalepointButton", submit);
  stamper.close();

  // We write the PDF bytes to the OutputStream
  OutputStream os = response.getOutputStream();
  baos.writeTo(os);
  os.flush();

 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: n...@scalepoint.com [mailto:n...@scalepoint.com] 
Sent: Wednesday, August 24, 2011 5:51 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] How to update A PushbuttonField on an
existing PDF



Hi iText,

 

First of we are very much interested in using this application
to our product.

Currently we are new to this and still testing this if it could
cater our needs.

 

What I'm trying to do is to get an existing PDF as stream, then
setting the url of a pushbutton field that is already existing in the
PDF, then showing that PDF with the modified action.

The PDF is displayed but there was no change in the button.

Could you please point me on the right direction on this.

 

I have attached here the PDF file and the Servlet that supposed
to display the pdf with the modified button.

Your help would be greatly appreciated.

 

Thanks,

 

Nelson


--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] PDF/A-1a missing structure issue..

2011-08-16 Thread Mark Storer
You've got text outside marked content operators ("These are some famous
movies by Stanley 
> Kubrick:", "This is a movie by Akira Kurosawa: ", etc).  IIRC,
/everything/ must be properly marked up.  And "properly" has a very
specific definition.

You really need to buy a copy of the PDF/A spec in order to do "1a"
correctly.  "1b" isn't all that hard.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: myworld.amol [mailto:myworld.a...@gmail.com] 
> Sent: Tuesday, August 16, 2011 1:53 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] PDF/A-1a missing structure issue..
> 
> Hello Jose,
> Thanks for your reply.
> I tried following example to generate PDF/A-1a compliance PDF 
> using iText APIs.
> 
> 
> import java.awt.color.ICC_Profile;
> import java.io.FileInputStream;
> import java.io.FileOutputStream;
> import java.io.IOException;
> 
> import com.lowagie.text.Document;
> import com.lowagie.text.DocumentException;
> import com.lowagie.text.Image;
> import com.lowagie.text.pdf.BaseFont;
> import com.lowagie.text.pdf.PdfContentByte;
> import com.lowagie.text.pdf.PdfDictionary;
> import com.lowagie.text.pdf.PdfName;
> import com.lowagie.text.pdf.PdfString;
> import com.lowagie.text.pdf.PdfStructureElement;
> import com.lowagie.text.pdf.PdfStructureTreeRoot;
> import com.lowagie.text.pdf.PdfWriter;
>  
> 
>  
> public class ReadOutLoud {
>  
> /** The resulting PDF. */
> public static String RESULT = "D:/read_out_loud.pdf";
> /** A resource that is used in the PDF document. */
> public static String RESOURCE = "E:/hm_pics/0206_181704.jpg";
>  
> /**
>  * Creates a PDF document.
>  * @param filename the path to the new PDF document
>  * @throws DocumentException 
>  * @throws IOException 
>  */
> public void createPdf(String filename) throws 
> IOException, DocumentException {
> // step 1
>   Document document = new Document();
>   // step 2
> PdfWriter writer = PdfWriter.getInstance(document,
> new FileOutputStream(filename));
> writer.setTagged();
> writer.setUserProperties(true);
> writer.setPDFXConformance(writer.PDFA1A);
> // step 3
> document.open();
> writer.createXmpMetadata();
>   ICC_Profile icc = null;
>   try{
>icc = ICC_Profile.getInstance(new
> FileInputStream("D:/ICC_Profile/sRGB_IEC61966-2-1_black_scaled.icc"));
>writer.setOutputIntents("Custom", 
> "","http://www.color.org";, "sRGB IEC61966-2.1", icc);
>   }catch(IOException e){
>   // 
>   }
> // step 4
> PdfContentByte cb = writer.getDirectContent();
> BaseFont bf = null;
>   
>   try{
>   bf =
> BaseFont.createFont("E:/Tomcat5/webapps/EQUBE632/BuildNPlay/fo
> nts/HELR45W.TTF",
>   BaseFont.CP1252, BaseFont.EMBEDDED);
>   
>   }catch(Exception e){
>   eQube.logger.error("Error while 
> creating basefont for PDFA "+e.getMessage());
>   }
> BaseFont bf2 = bf;
>  
> PdfStructureTreeRoot root = writer.getStructureTreeRoot();
> PdfStructureElement div = new 
> PdfStructureElement(root, new PdfName("Div"));
> PdfDictionary dict;
>  
> cb.beginMarkedContentSequence(div);
>  
> cb.beginText();
> cb.moveText(36, 788);
> cb.setFontAndSize(bf, 12);
> cb.setLeading(18);
> cb.showText("These are some famous movies by Stanley 
> Kubrick: ");
> dict = new PdfDictionary();
> dict.put(PdfName.E, new PdfString("Doctor"));
> cb.beginMarkedContentSequence(new PdfName("Span"), 
> dict, true);
> cb.newlineShowText("Dr.");
> cb.endMarkedContentSequence();
> cb.showText(" Strangelove or: How I Learned to Stop 
> Worrying and Love the Bomb.");
> dict = new PdfDictionary();
> dict.put(PdfName.E, new PdfString("Eyes Wide Shut."));
> cb.beginMarkedContentSequence(new PdfName("Span"), 
> dict, true);
> cb.newlineShowText("EWS");
> cb.endMarkedContentSequence();
> cb.endText();
> dict = new PdfDictionary();

Re: [iText-questions] Urgent: AcroFields.setFieldRichValue() doesn't write out rich text

2011-08-15 Thread Mark Storer
setFieldRichValue() is a partial implementation.  The appearance
generation code doesn't know anything about the rich value, only the
regular value.
 
To get around this, you have to call
myAcroFields.setGenerateAppearances(false).  Then, when
Reader/Acrobat/etc open the PDF, they know they need to generated the
appearances themselves.  Compliant Viewers will see the rich value and
render it.
 
NOTE: This means flattening isn't going to work... not without first
being opened by Acrobat, and saved with the rich value drawn in.
 
Or you could fix it yourself.  iText can render HTML fragments (which is
what the rich text is) to PDF, I just didn't hook it up when I wrote
[s|g]etFieldRichValue() because it was an off-the-cuff feature that
helped someone at the time.  You could even do this sort of thing
yourself without diving directly into the iText source:
 
1) Get the size of the form field in question.
2) In a new document, create a page with that size
3) Use XMLWorker/HTMLWorker to draw the rich value into that new page.
4) Save the new document to a memory stream
5) Import that new document's page and use it as the appearance for the
field needing a rich value.
 
Not terribly efficient, but it'll work.  
 
PS:  I think you'll need to draw the field's borders as well, but that
code is fairly simple, and can be found in BaseField.java.
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Leonard Rosenthol [mailto:lrose...@adobe.com] 
Sent: Monday, August 15, 2011 7:12 AM
To: Post here
Subject: Re: [iText-questions] Urgent:
AcroFields.setFieldRichValue() doesn't write out rich text


You have the source code to iText - why not just trace into the
code and see what's going on??


From: Taichu Zhang 
Reply-To: Post here 
Date: Mon, 15 Aug 2011 06:52:02 -0700
To: Post here 
Subject: [iText-questions] Urgent:
AcroFields.setFieldRichValue() doesn't write out rich text


The setFieldRichValue() method in class AcroFields does not
work. However, AcroFields.getFieldRichValue() seems work. It can return
thing like this:
 
http://www.w3.org/1999/xhtml";
xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/";>read line1 plain

 
The so called rich value.
If I write similar rich value to another field by using the
following value
 

http://www.w3.org/1999/xhtml";
xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/";>write line1 bold

passed by setFieldRichValue(). I got the return code as true,
which indicates the success of the method. However, there is nothing in
the target field of the result PDF file. I do have the rich text flag
turned on for the write field in the fillable PDF form.

Please help, this is urgent as my project is due, and I have
this as a show stopper. If I can't write part of the text in the whole
text field as bold, and leave the rest of it as plain text, my entire
project is in jeopardy. I couldn't find any thing using
setFieldRichValue() in iText examples, and I googled it on internet as
well. Is this a bug, or I'm calling it the wrong way.

Thanks.

 

--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Unable to extract Tiff Image

2011-08-09 Thread Mark Storer
"Software should be totally hating on anyone foolish enough to provide
it with non-conformant documents.  Offenders should have all their
personal information, account numbers, and so forth dumped all over the
internet.  That'll show 'em".

The bottom line is that we cannot predict all the amazingly
clever ways folks can write broken PDF.  So rather than make
the effort, we take care of them as they come up.

And we try to hunt down producers of bad PDFs and have them flogged.  At
least until their morale improves.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Kevin Day [mailto:ke...@trumpetinc.com] 
> Sent: Tuesday, August 09, 2011 3:37 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Unable to extract Tiff Image
> 
> Not to be too snarky on this, but the "software should be 
> totally compliant in the face of non-comformant documents" is 
> the reason that IE messed up the browser landscape for so long.
> 
> That said, why don't you put together a proposal for a code 
> change to handle this specific situation, and I'll take a 
> look at adding it.  A patch file would be fine, or just a 
> code snippet.
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Unable-to-extract-T
iff-Image-tp3713457p3731494.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> uberSVN's rich system and user administration capabilities 
> and model configuration take the hassle out of deploying and 
> managing Subversion and the tools developers use with it. 
> Learn more about uberSVN and get a free download at:  
> http://p.sf.net/sfu/wandisco-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Inaccuracy scaling imported pages

2011-07-27 Thread Mark Storer
And it's possible that the precision issue is with your PDF viewer, not
the data given to that viewer.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Paulo Soares [mailto:psoa...@glintt.com] 
Sent: Wednesday, July 27, 2011 1:56 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Inaccuracy scaling imported pages


This looks like a precision problem. You can increase the
precision by calling ByteBuffer.HIGH_PRECISION = true.
 
Paulo

- Original Message - 
From: Markus Meyer <mailto:me...@mesw.de>  
To: iText Questions List
<mailto:itext-questions@lists.sourceforge.net>  
Sent: Wednesday, July 27, 2011 9:17 PM
Subject: [iText-questions] Inaccuracy scaling imported
pages

Hi,

when importing pages, an inaccuracy occurs. Consider the
following example:

 public static void main(String[] args)
 throws Exception
 {
 Document doc = new Document(new Rectangle(0, 0,
pt(500), pt(500)));
 PdfWriter writer = PdfWriter.getInstance(doc,
 new
FileOutputStream("44x42_scaled_blue.pdf"));
 doc.open();
 PdfContentByte content =
writer.getDirectContent();

 PdfReader reader = new
PdfReader("44x42_blue.pdf");
 PdfImportedPage page =
writer.getImportedPage(reader, 1);
 Image image = Image.getInstance(page);
 image.scaleAbsolute(pt(460), pt(440));
 image.setAbsolutePosition(0, 0);
 content.addImage(image);

 content.setColorStroke(new CMYKColor(0, 0, 0,
1.0f));
 content.rectangle(0, 0, pt(460), pt(440));
 content.stroke();

 doc.close();
 }

 /**
  * Convert millimeters to points.
  */
 private static float pt(double mm)
 {
 return (float)(72 * mm / 25.4);
 }

In this example, a file, "44x42_blue.pdf" is scaled
slightly to 460x440 
millimeters. For comparison, a rectangle of size 460x440
is drawn. If 
the file is opened, one can clearly see that the scaled
image and the 
drawn rectangle do not match. The difference is almost 2
millimeters in 
X direction. This happens with different input files.

The test files as well as the full program are available
from this link:

http://www.mesw.de/downloads/itext_scaling_problem.zip

Any help is greatly appreciated.

Best regards,
Markus




--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for
help often.
Plus, you'll get a chance to win $100 to spend on
ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
iText-questions mailing list
iText-questions@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be
answered with a reference to the iText book:
http://www.itextpdf.com/book/
Please check the keywords list before you ask for
examples: http://itextpdf.com/themes/keywords.php

--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://w

Re: [iText-questions] Merging 3 PDF Files with annotations intact

2011-07-26 Thread Mark Storer
PdfCopy or PdfSmartCopy is your best bet.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Botte, John [mailto:john.bo...@fmglobal.com] 
Sent: Tuesday, July 26, 2011 8:49 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Merging 3 PDF Files with annotations
intact



Hey all,

 

I am working on a c# application which will merge multiple pdf
documents. Some of these documents contain annotations. What is the best
method to merge these and keep annotations? Annotations include notes
and highlighted areas of the document. Is this something that can be
done, would I have to somehow flatten the annotations onto the document
before merger? Any help would be appreciated.

 

Thanks,

john

--
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Problems detecting page sizes of PDF documents

2011-07-26 Thread Mark Storer
You've assumed that 0,0 is always going to be one of the corners of the
page.  Don't.
 
Particularly with N-up printing, pages can be no where near 0,0.  If the
page you're dealing with was intended to be in the 3rd column, 4th row
of a 6x6 "page" page, it's corners could be just about anywhere,
depending on page rotation.
 
I tend to avoid getPageSizeWithRotation.  I get the page's rectangle,
and I get the page's rotation.  Much more control that way.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Bassini Massimo [mailto:m.bass...@crif.com] 
Sent: Tuesday, July 26, 2011 7:27 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Problems detecting page sizes of PDF
documents



Hi everyone, this is my first question.

I'm sorry but I've to skip presentation 'cause I'm pressed ...

 

The problem I have is the following: I'm trying to manipulate
PDF files (ex. Adding images, adding barcodes etc.).

Usually I don't have big problems but in this case ...

 

When I read the document page size via code 

reader = new
PdfReader(lOriginalFileName);

r = reader.GetPageSizeWithRotation(1);

I read a size corresponding to an A4.

The problem arises because when I read the page size in File -
Properties within Adobe Reader I see 177.8 mm x 228.6 that looks like a
custom size.

What happens is that when I append a barcode based on page size
it's attached outside the page ...

 

I tried to "save as" the original document using, for example,
this code

Document doc = new Document(new
iTextSharp.text.Rectangle(A4POINTSWIDTH, A4POINTSHEIGHT), 0, 0, 0, 0);

PdfCopy c = new PdfCopy(doc, new
FileStream(lWorkFileName, FileMode.Create));

doc.Open();

 

PdfReader reader = new
PdfReader(lOriginalFileName);

for (int i = 1; i <=
reader.NumberOfPages; i++)

{

reader.GetPageN(i).Put(PdfName.PAGE,
new PdfRectangle(A4POINTSWIDTH, A4POINTSHEIGHT));

c.AddPage(c.GetImportedPage(reader,
i));

}

doc.Close();

c.Close();

 

But the resulting document still has the same problem: looks
like an A4 within code, but it's something else, though.

 

May anybody help me please?

 

Thanks.

 

Regards

 

Massimo

 

 

--
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Different formatted PDF in dev Q Prod systems

2011-07-25 Thread Mark Storer
*SOMETHING* is always different.  And it's ever so much fun finding out
what that something is.  

There are several ways you could include debug information into a PDF.

You could build a log (StringWriter, ByteArray*Stream, whatever) and
stash that log in the PDF in any number of ways:

*You could write the log out as additional pages in the PDF (visible to
everyone who opens the PDF).
* Stuff it all into a document info field (less visible)
* Embed it in a PdfString or PdfStream hidden in the document anywhere
you like (all-but-invisible).
*Add the log as a file attachment.

Your server undoubtedly has its own logging system you could hook into
when building PDFs.

You could also generate marked content when building your tables.  This
would require that you be able to access the uncompressed content
streams after generating the PDFs to see your debug info.  I'm pretty
sure you can configure iText to not compress content streams (though it
might require tweaking the source, come to think of it), or you can use
RUPS or some similar PDF inspection tool to look at the compressed
streams.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: ajayg [mailto:searc...@rogers.com] 
> Sent: Friday, July 22, 2011 11:18 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Different formatted PDF in dev Q 
> Prod systems
> 
> Hi,
> I've an application using itext 2.1.4 rendering pdf on the 
> fly. Occasionally some users in Q/Prod environment face issue 
> of pdf having improper format.
> Basically all the pdfptable have their content width limited 
> to single cell, hence looks like vertically aligned. This 
> issue is never faced in Dev and bouncing Q server resolves 
> this issue temporarily until it occurs again. All
> 3 systems are on same JRE/Java and hardware. My question is: 
> How could itext generate diff. formatted pdfs on diff servers 
> running on same vers? 
> Since pdf is generated and have no syntax issues, there's no 
> way to debug it. Is there any way we can analyse runtime 
> behaviour and trace this issue. 
> 
> any pointers would be greatly appreciated.. 
> 
> thanks, 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Different-formatted
-PDF-in-dev-Q-Prod-systems-tp3687439p3687439.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Storage Efficiency Calculator
> This modeling tool is based on patent-pending intellectual 
> property that has been used successfully in hundreds of IBM 
> storage optimization engage- ments, worldwide.  Store less, 
> Store more with what you own, Move data to the right place. 
> Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Rotate barcode

2011-07-13 Thread Mark Storer
Fun with transformation matrixes.  Yay.

The problem is that rotation occurs around the origin, 0, 0 (the lower
left corner of a PDF page).  So if you're rotating the barcode 90
clockwise, it's being drawn off the page, below it in the +x, -y
quadrant.

To remedy this, I suggest you use AffineTransform.  It can generate a
transformation that rotates around a given point rather than the origin.
You can then get the transformation matrix out of the AffineTransform as
an array of floats (doubles?)... The order of these numbers matches the
order used by iText in the various PdfContentByte functions that take
transformations.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: bobsyouruncle [mailto:smiths...@hotmail.com] 
> Sent: Tuesday, July 12, 2011 11:43 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Rotate barcode
> 
> Hello,
> 
> I have a pdf template that I want to stamp with some data as 
> well as a barcode. I generate the barcode and add it like:
> 
> Image image = buildBarcode(getBarcode());
> PdfContentByte content = stamper.getOverContent(1);   
> image.setAbsolutePosition(600f, 1100f);
> content.addImage(image);
> 
> And it works, ehen I add the line:
> image2.setRotationDegrees(90);
> OR
> image2.setRotationDegrees(90);
> 
> the barcode disapears but the pdf still generates.
> 
> I also tried:
> 
> Image image = buildBarcode(getBarcode()); 
> PdfContentByte content = stamper.getOverContent(1);
> 
> float a = (float)Math.cos( 90 * (float)Math.PI / 180) * 
> image.getScaledHeight(); float b = (float)Math.sin( 90 * 
> (float)Math.PI / 180) * image.getScaledWidth(); float c = 
> -(float)Math.sin( 90 * (float)Math.PI / 180) * 
> image.getScaledHeight(); float d = (float)Math.cos( 90 * 
> (float)Math.PI / 180) * image.getScaledWidth(); 
> content.addImage(image2, a, b, c, d, 200, 200);
> 
> which also still generates the pdf but does not show the barcode.
> 
> Can someone please help with this.
> 
> Thanks
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Rotate-barcode-tp36
63198p3663198.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> AppSumo Presents a FREE Video for the SourceForge Community 
> by Eric Ries, the creator of the Lean Startup Methodology on 
> "Lean Startup Secrets Revealed." This video shows you how to 
> validate your ideas, optimize your ideas and identify your 
> business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Retrive flatten field with Itext

2011-07-08 Thread Mark Storer
> No tool can help you retrieving that original value.

On the contrary. If he had an empty AcroForm version of the original, he
could map out the "what and where" of every field.  For radio fields,
he'd have to record the caption so he'd know what text to look for in
that particular field's BBox.

iText's parser will still find all the text burried in that flattened
form.  It just needs to know what to do with it all.

Without an unflattened form however... They could either develop all
that information manually (some drag/drop/lable acrobat plugin perhaps),
or "by guess and by golly" the information up himself.  Very Labor
Intensive.  But still possible... And not as labor intesive as plain ol
data entry once you start talking about more than a couple instances of
a particular form.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: 1T3XT BVBA [mailto:i...@1t3xt.info] 
> Sent: Friday, July 08, 2011 6:16 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Retrive flatten field with Itext
> 
> On 8/07/2011 13:03, sudhakarnv wrote:
> > Hi  All
> >
> > Please find the doscusign flattened file.
> 
> Ouch, this isn't just a matter of retrieving text fields, you 
> also want to retrieve the state of a radio field / check box.
> The actual value of such a field (true/false, on/off, yes/no) 
> gets lost in the flattening process.
> No tool can help you retrieving that original value.
> 
> --
> 
> All of the data generated in your IT infrastructure is 
> seriously valuable.
> Why? It contains a definitive record of application 
> performance, security threats, fraudulent activity, and more. 
> Splunk takes this data and makes sense of it. IT sense. And 
> common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Retrieving Document Properties

2011-07-07 Thread Mark Storer
1. Yes.
2.
 
You'll want to use the following functions:
PdfReader.isEncrypted()
PdfReader.is128Key()
pdfReader.getPermissions()
 
getPermissions will return an integer that is a number of different
flags OR'ed together.  These flags are defined in 
PdfWriter.  Specifically, all the ALLOW_* values.
 
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: William Bell [mailto:wrb...@btinternet.com] 
Sent: Thursday, July 07, 2011 7:35 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Retrieving Document Properties


Hi,
 
I'm very 'new' to iTextSharp and to PDF documents in general
(well, from a developers point of view).
 
I am trying to retrieve the PDF document properties found on the
Security TAB in the Document Properties dialog, normally accessed by
selecting File then Properties from the application menu.
 
1. Is this possible?
2. If so, how?
 
I'd be very grateful for any help or pointers in the right
direction -  many thanks.



Regards

William



William Bell

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Some objects(type /pages ) are missing in pdffiles...??

2011-07-07 Thread Mark Storer
Can we see your "before" and "after" PDFs?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: sam_dev [mailto:gorgeious@gmail.com] 
> Sent: Thursday, July 07, 2011 12:02 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Some objects(type /pages ) are 
> missing in pdffiles...??
> 
> Hi ,
>   Thanks for your previous help, I have one 
> another problem regarding the attachments in pdf files.  
> Brief description:
> I have a normal pdf file. Everything is fine in it. But once 
> I have attached another pdf file in that particular file. The 
> file format will be changed after attaching the file. The 
> /pages type object is missing in the format.
> The file is working well but some objects are missing after 
> opening it in its binary mode. I am facing this problem in 
> adobe acrobat 9.x,10.x versions.  Can you please tell me why 
> is this happening in these both versions because I have 
> checked the lower versions. Nothing happens like that.
>  Waiting for your helpful reply.  
>   Thanks.  
>   
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Some-objects-type-p
ages-are-missing-in-pdf-files-tp3650820p3650820.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> All of the data generated in your IT infrastructure is 
> seriously valuable.
> Why? It contains a definitive record of application 
> performance, security threats, fraudulent activity, and more. 
> Splunk takes this data and makes sense of it. IT sense. And 
> common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Retrive flatten field with Itext

2011-07-07 Thread Mark Storer
There Is A Way.
 
1) Get the bounding boxes of all the fields from the unflattened form.
2) Create a RenderListener
<http://api.itextpdf.com/itext/com/itextpdf/text/pdf/parser/RenderListen
er.html>  implementation that examines the page contents' text bounding
boxes to see What Goes Where.
 
Without knowing the fields' locations, it will be VERY HARD to determine
which text is from which field... and perhaps "Impossible".
 
Can we see a flattened form?  Docusign might be adding marked content
when it flattens fields stating which text is from which field... or it
might not.  No way to know without looking at the page contents.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: sudhakar nallamaru [mailto:sudhakarbabu...@gmail.com] 
Sent: Thursday, July 07, 2011 5:13 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Retrive flatten field with Itext


Hi All
 
I have a pdf form which flattened by Docusign after digital sign
. Can we retrive the form fields with itext from this flattened form.
When i tried getFields() it is returning me empty map. 
 
IF its possible with Itext please let me know how?

-- 
Thank in Advance
Best Regards
Sudhakar


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] API documentation for 2.1.7

2011-07-06 Thread Mark Storer
You don't.  You'd have to generate it yourself from source.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Steinberg, Dan [mailto:daniel.steinb...@cengage.com] 
Sent: Wednesday, July 06, 2011 2:28 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] API documentation for 2.1.7



Where can I find API documentation for iText 2.1.7?

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Why iText can not flatten new fields

2011-06-30 Thread Mark Storer
The underlying problem, as I understand it:
 
1) an AcroFields object is created when the PDF is opened.
2) newly created fields are not added to the existing AcroFields.
3) Flattening works on the information in the AcroFields.
 
All AcroFields.Item's modifier functions are package private, and there's no 
way to add an Item from outside the class an Oh Yes There Is.  
AcroFields.getFields just hands over its internal name->Item map, so if you 
could construct the proper Item object, you could trivially insert it.
 
Potential solutions (if I'm right):
1) 
  PdfReader reader = new PdfReader(...);
  PdfFormField formFieldDict = buildFormField(); // you'll have to manage that 
one on your own
  PRIndirectReference fieldRef = reader.addPdfObject(formFieldDict);
 
  // add it to the page
  PdfDictionary pageDict = reader.getPageN(pageNum);
  PdfArray annots = pageDict.getAsArray(PdfName.ANNOTS);
  if (annots == null) {
annots = new PdfArray();
pageDict.put(PdfName.ANNOTS, annots);
  }
  annots.add(fieldRef);
 
  // add it to the doc-level field list
  PdfDictionary root = reader.getCatalog();
  PdfDictionary acroFrm = root.getAsDict(PdfName.ACROFORM);
  PdfArray flds = acroFrm.getAsArray(PdfName.FIELDS);
  flds.add(fieldRef); // just tack it on the end.
 
  PdfStamper stamper = new PdfStamper(reader, outStream);
  ...
 
 
This method adds the field to the reader prior to the creation of the 
AcroFields object, so that when it works its way through the PDF, it finds your 
new field.
 
2) Modify your copy of the iText source to make the various 
AcroFields.Item.add* function public and use them to create a new 
AcroFields.Item and add it to the AcroFields' field map.
 
  AcroFields.Item item = new AcroFields.Item();
  item.addPage( pageNum );
  item.addWidget( formFieldDict );
  item.addWidgetRef( fieldRef );
  item.addValue( formFieldDict );
  item.addMerged( formFieldDict );
  item.addTabOrder( fldDictsIndexInAnnotsArray );
 
  acroFields.getFields().put(fldName, item);
  
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: José Carrizo [mailto:c4rr...@gmail.com] 
Sent: Wednesday, June 29, 2011 7:08 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Why iText can not flatten new fields



Well, actually there is a case where I need to do it but does not 
matter, you are right, I'll try to do it that way.

Thanks so much.


El jun 29, 2011 3:39 a.m., "1T3XT BVBA"  escribió:
>
> On 29/06/2011 1:55, José Carrizo wrote:
>>
>> Hello there,
>>
>> I would like to know why the code documentation of iText says "The 
fields added with addAnnotation(PdfAnnotation, int) will never be flattened".
>>
>> I need to do that, flatten a field that has been just created with 
iText, whats the reason for that restriction.
>
>
> 1. A field that has been added to an existing PDF can be flattened in 
a second pass.
> 2. It doesn't make sense to add a field, and then immediately flatten 
it. Just add the content!
>
> 
--
> All of the data generated in your IT infrastructure is seriously 
valuable.
> Why? It contains a definitive record of application performance, 
security
> threats, fraudulent activity, and more. Splunk takes this data and 
makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a 
reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered tra

Re: [iText-questions] What to set while stamping the PDF for retaining tags described in PDF template

2011-06-30 Thread Mark Storer
> So you mean it is better to tag the PDF in java rather than 
> using tagged PDF?

That's right.

> Or it will only be possible to tag the text which is being 
> written on to the PDF using IText.

iText only supports adding tags to text/lines/images as it draws them.
It is Very Hard to modify a content stream properly.  You could wrap an
entire template in a single tag easily enough.  Adding tags inside that
template is practically beyond your reach.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: priyankasinha [mailto:priyanka16.2...@gmail.com] 
> Sent: Thursday, June 30, 2011 4:03 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] What to set while stamping the 
> PDF for retaining tags described in PDF template
> 
> Thanks for your reply Mark.
> I am using JAWS for screen reading through the PDF.
> Ok so If I have to tag the PDF in java using Itext then can 
> it tag the text coming from PDF template?

> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/What-to-set-while-s
tamping-the-PDF-for-retaining-tags-described-in-PDF-template->
tp3632881p3635342.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> All of the data generated in your IT infrastructure is 
> seriously valuable.
> Why? It contains a definitive record of application 
> performance, security threats, fraudulent activity, and more. 
> Splunk takes this data and makes sense of it. IT sense. And 
> common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] What to set while stamping the PDF for retaining tags described in PDF template

2011-06-29 Thread Mark Storer
Sadly, no.  What screen reader are you using?  Some are better than
others.  You might even be better off trying to scrape out all the
tagging information in the stream so as not to confuse it.

And writing the code to do this will be Non-Trivial.  The tagging info
in the page itself is called "marked content".  The marked content
indexes in the content refer to document-level information from the
original PDF.

You'd need to locate this hierarchical information, and copy it into
your new document, at a location that is Logical.

If the page already contains marked content, you'll also need to CHANGE
THE CONTENT STREAM (fear!), to reflect these new marked content indexes.
This particular change shouldn't be all that difficult to be honest, but
its always worth a double-shot of caution whenever you consider such a
thing.

All the particulars are spelled out in the PDF Reference, chapter 14,
sections 6 "Marked Content", 7 "Logical Structure", and 8 "Tagged PDF".
I suspect you'll also want to check out section 9 "Accessibility
Support".

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: priyankasinha [mailto:priyanka16.2...@gmail.com]
> Sent: Wednesday, June 29, 2011 6:47 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] What to set while stamping the PDF for 
> retaining tags described in PDF template
> 
> Hi,
> 
> I am using tagged PDF template for stamping the PDF. 
> In the tagged PDF template I can read out loud the headings, lists 
> etc.
> But after the PDF is getting stamped, the headings are getting lost. 
> Is there any property which I need to set so as to retain the 
> structure of tagged PDF.
> 
> 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/What-to-set-while-s
tamping-the-PDF-for-retaining-tags-described-in-PDF-template->
tp3632881p3632881.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> All of the data generated in your IT infrastructure is 
> seriously valuable.
> Why? It contains a definitive record of application 
> performance, security threats, fraudulent activity, and more. 
> Splunk takes this data and makes sense of it. IT sense. And 
> common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 


--
All of the data generated in your IT infrastructure is seriously
valuable.
Why? It contains a definitive record of application performance,
security 
threats, fraudulent activity, and more. Splunk takes this data and makes

sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a
reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] What to set while stamping the PDF for retaining tags described in PDF template

2011-06-29 Thread Mark Storer
Sadly, no.  What screen reader are you using?  Some are better than
others.  You might even be better off trying to scrape out all the
tagging information in the stream so as not to confuse it.

And writing the code to do this will be Non-Trivial.  The tagging info
in the page itself is called "marked content".  The marked content
indexes in the content refer to document-level information from the
original PDF.

You'd need to locate this hierarchical information, and copy it into
your new document, at a location that is Logical.

If the page already contains marked content, you'll also need to CHANGE
THE CONTENT STREAM (fear!), to reflect these new marked content indexes.
This particular change shouldn't be all that difficult to be honest, but
its always worth a double-shot of caution whenever you consider such a
thing.

All the particulars are spelled out in the PDF Reference, chapter 14,
sections 6 "Marked Content", 7 "Logical Structure", and 8 "Tagged PDF".
I suspect you'll also want to check out section 9 "Accessibility
Support".

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: priyankasinha [mailto:priyanka16.2...@gmail.com] 
> Sent: Wednesday, June 29, 2011 6:47 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] What to set while stamping the PDF 
> for retaining tags described in PDF template
> 
> Hi, 
> 
> I am using tagged PDF template for stamping the PDF. 
> In the tagged PDF template I can read out loud the headings, 
> lists etc. 
> But after the PDF is getting stamped, the headings are getting lost. 
> Is there any property which I need to set so as to retain the 
> structure of tagged PDF.  
> 
> 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/What-to-set-while-s
tamping-the-PDF-for-retaining-tags-described-in-PDF-template->
tp3632881p3632881.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> All of the data generated in your IT infrastructure is 
> seriously valuable.
> Why? It contains a definitive record of application 
> performance, security threats, fraudulent activity, and more. 
> Splunk takes this data and makes sense of it. IT sense. And 
> common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] formatting

2011-06-28 Thread Mark Storer
Ah.  Completely wrong formatting.  Appologies.
 
In general, the formatting script can do what you want.  I haven't used
the "built in" formatters myself, mostly because they're not documented
anywhere and therefore Subject To Change Without Notice.
 
I did notice that there's a corresponding keystroke script... that may
be required for the format script to function properly.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Yevgeniy Cherniak [mailto:yevgeniy.chern...@autofont.com] 
Sent: Monday, June 27, 2011 11:05 PM
To: Post all your questions about iTexthere
Subject: Re: [iText-questions] formatting



I want this code to work correctly and convert date I finsert in
the textfield to be in the defined format. But I don't know why doesn't
it work... 

PdfFormField ff = tf1.GetTextField();

string format = "AFDate_Format('mm/dd/')";

ff.SetAdditionalActions(PdfName.F,
PdfAction.JavaScript(format, writer));

 

     

    

 

From: Mark Storer [mailto:msto...@autonomy.com] 
Sent: Monday, June 27, 2011 7:19 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] formatting

 

Individually?  No, I don't think so.  You can set the font, font
size, text color, and background color of the control as a whole, but I
don't think you can do so for the different options.

 

Maybe with rich text, but iText only supports getting and
setting rich text values, it won't actually draw them for you.

 

--Mark Storer

  Senior Software Engineer

  Cardiff.com

 

import legalese.Disclaimer;

Disclaimer DisCard = null;

 

 

 





From: Yevgeniy Cherniak
[mailto:yevgeniy.chern...@autofont.com] 
Sent: Monday, June 27, 2011 3:57 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] formatting

Is any way to define formatting for items in acroform
field like combo box and listbox?

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Shifting content of a page

2011-06-27 Thread Mark Storer
There sure is.  
 
Option 1: PdfImportedPage is a subclass of PdfTemplate.  Rather than simply 
using PdfCopy.addPage(), you can create a new blank page of the correct 
dimensions, then draw your page as a PdfTemplate with specific coordiates via 
PdfContentByte.  The downside here is that you lose any annotations from the 
original page.
 
Option 2: With a PdfStamper, set the UnderContent to do a transformation to 
accomplish the same thing.   You should change the Rect of any annotations on 
the page to match.  This would probably require two passes over the offending 
PDFs. 
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: André Lemay [mailto:lemay.an...@gmail.com] 
Sent: Friday, June 24, 2011 8:42 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Shifting content of a page


Strange problem, but I'll do my best to explain it.

What I'm needing to do, is take pages from an existing pdf, and stitch 
them into a pdf that I'm generating. This is working fine, and I have no 
problem with it, but the pdf that gets stitched in (or rather certain pages of 
it) has a quirk which is causing problems.

It's MediaBox is set to 27,27,639,819 (so 8.5x11, but shifted 27 point 
up and right). It has no CropBox defined. The reason it's like this, is that 
this pdf (from what I'm led to understand, it's created by a third party, so I 
can't do anything about it) is itself stitched together from other pdfs, and 
certain pages of it come from source pdfs that are oversized.

Normally, this isn't a problem, as the mediabox is set correctly to the 
part of the pdf that needs to be viewable, and the resultant pdf (after I've 
stitched things together) looks fine in readers. The problem is that these get 
sent to a printer (as in a printing company), in a batch (several pdfs 
generated the same way), and the printer does something to them that changes 
the cropbox and ends up screwing up the way it comes out.

I've checked the raw pdfs in a text editor, and the media/crop boxes 
for the bad pages are as follows :
What I get from the third party : media[27,27,639,819], no cropbox 
defined
What I generated (after stitching it in) : media[27,27,639,819], 
crop[0,0,612,792]
The pdf coming out of whatever the printer is doing : 
media[27,27,639,819], crop[27,27,639,819]

The result of this is that the bottom and left edges of these pdfs are 
getting cut off.

I've tried playing around with changing the media/crop boxes, but with 
no success, I just end up generating pdfs that have edges cut off or have extra 
edges that we don't need.

What i'd like to know, is if there's some way of shifting all the 
content of the page down and left by 27 points (then I could just adjust the 
media box, and still end up showing the correct content), or if there's some 
way of copying the content within the mediabox of these pages onto a new page 
(and in so doing, resetting the mediabox coordinates to be 0-based).

Thanks


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] formatting

2011-06-27 Thread Mark Storer
Individually?  No, I don't think so.  You can set the font, font size,
text color, and background color of the control as a whole, but I don't
think you can do so for the different options.
 
Maybe with rich text, but iText only supports getting and setting rich
text values, it won't actually draw them for you.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Yevgeniy Cherniak [mailto:yevgeniy.chern...@autofont.com] 
Sent: Monday, June 27, 2011 3:57 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] formatting



Is any way to define formatting for items in acroform field like
combo box and listbox?

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] How to extract title / heading from document contents

2011-06-24 Thread Mark Storer
iText can give you the font name, size, and location of all the text on
the page.  Without PDF Structure, it is up to you to interpret that
information.
 
For a title, you might consider all the text in the largest font on the
first page to be the title.  Such heuristics will be brittle.  You could
refine or relax it in various ways to work better with your particular
PDFs, but at the end of the day, it will always be possible to find (or
create) a PDF that will break your heuristic.
 
A biography of Theodore Roosevelt might be entitled:
 
Speak softly and 
Carry a Big Stick.
 
A reasonable heuristic could determine this title to be "Carry a Big
Stick".  And it would be wrong.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Balder [mailto:bal...@redlab.be] 
Sent: Friday, June 24, 2011 8:31 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] How to extract title / heading
from document contents


This depends on the PDF,

 is the PDF Tagged? Then you might be able to find out what's
the title and heading. If it's not tagged good luck with guessing the
title and heading from the text found in the document. 

On 24/06/2011 14:10, modie wrote: 

Hi,

Sorry, I am new to iTextSharp and cannot find
documentation for it anyway,
other than this forum. I am looking to extract content
from a PDF document,
but I need to be able to understand the structure /
markup in the document. 

I want to extract the heading / title for the document
which would generally
found on the first page. Any ideas how I would do this?
In html I would look
for the h1 or h2 tag?

PS - no, I dont want the title property of the document
 

--
View this message in context:
http://itext-general.2136553.n4.nabble.com/How-to-extract-title-heading-
from-document-contents-tp3622357p3622357.html
Sent from the iText - General mailing list archive at
Nabble.com.



--
All the data continuously generated in your IT
infrastructure contains a 
definitive record of customers, application performance,
security 
threats, fraudulent activity and more. Splunk takes this
data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
___
iText-questions mailing list
iText-questions@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be
answered with a reference to the iText book:
http://www.itextpdf.com/book/
Please check the keywords list before you ask for
examples: http://itextpdf.com/themes/keywords.php


-- 

@redlabbe <http://twitter.com/redlabbe> 
redlab-log <http://www.redlab.be/blog>  

--
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Error processing PDF Zip file

2011-06-23 Thread Mark Storer
Sadly, our email server strips ".zip" files and Other Harmful
Attachments.
 
I feel so safe now.  :/
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: thiyagu rajan [mailto:thiyagu@gmail.com] 
Sent: Thursday, June 23, 2011 1:12 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Error processing PDF Zip file


Hi Mark,
 
The warnings come when we process the splited files using iText
not the original file.Please find the splited pdf files the zip file
attached.
 
Regards,
Thiyaga.


On Thu, Jun 23, 2011 at 3:40 PM, Mark Storer
 wrote:



I suspect your test file won't reproduce your warnings
(not errors, warnings).  The log said the file was produced by
iText-one-dot-really-really-old.  Your test file was created/produced by
PrimoPDF.  The log says there are several fishy entries in the cross
reference table (xref).  Test_file.pdf's cross reference table is just
fine.
 
        --Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: thiyagu rajan
[mailto:thiyagu@gmail.com] 
Sent: Thursday, June 23, 2011 12:12 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Error processing PDF
Zip file


Hi,
 
We are using iText to split the PDF file and
while processing the splited files using 'GhostScript' we are getting
the below error,s
Please find the original file (Test_file.pdf)
and the splited files (FC20110623U17825123456879.ZIP) attached.
 
 Warning: considering '00 0 n'
as a free entry.
 Warning: considering '00 0 n'
as a free entry.
 Warning: considering '00 0 n'
as a free entry.
 Warning: considering '00 0 n'
as a free entry.
 Warning: considering '00 0 n'
as a free entry.
 Warning: considering '00 0 n'
as a free entry.
 Warning: considering '00 0 n'
as a free entry. 

 This file had errors that were repaired or
ignored.
 The file was produced by: 
 >>>> iText by lowagie.com
<http://lowagie.com/>  (r1.02b;p128) <<<<
 Please notify the author of the software
that produced this
 file that it does not conform to Adobe's
published PDF
 specification. 

Please advise us on this.
 
Regards,
Thiyaga.




--
Simplify data backup and recovery for your virtual
environment with vRanger.
Installation's a snap, and flexible recovery options
mean your data is safe,
secure and there when you need it. Data protection
magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be
answered with a reference to the iText book:
http://www.itextpdf.com/book/
Please check the keywords list before you ask for
examples: http://itextpdf.com/themes/keywords.php



--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your

Re: [iText-questions] Error processing PDF Zip file

2011-06-23 Thread Mark Storer
I suspect your test file won't reproduce your warnings (not errors,
warnings).  The log said the file was produced by
iText-one-dot-really-really-old.  Your test file was created/produced by
PrimoPDF.  The log says there are several fishy entries in the cross
reference table (xref).  Test_file.pdf's cross reference table is just
fine.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: thiyagu rajan [mailto:thiyagu@gmail.com] 
Sent: Thursday, June 23, 2011 12:12 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Error processing PDF Zip file


Hi,
 
We are using iText to split the PDF file and while processing
the splited files using 'GhostScript' we are getting the below error,s
Please find the original file (Test_file.pdf) and the splited
files (FC20110623U17825123456879.ZIP) attached.
 
 Warning: considering '00 0 n' as a free entry.
 Warning: considering '00 0 n' as a free entry.
 Warning: considering '00 0 n' as a free entry.
 Warning: considering '00 0 n' as a free entry.
 Warning: considering '00 0 n' as a free entry.
 Warning: considering '00 0 n' as a free entry.
 Warning: considering '00 0 n' as a free entry. 

 This file had errors that were repaired or ignored.
 The file was produced by: 
 >>>> iText by lowagie.com (r1.02b;p128) <<<<
 Please notify the author of the software that produced this
 file that it does not conform to Adobe's published PDF
 specification. 

Please advise us on this.
 
Regards,
Thiyaga.

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Collapse bookmarks by default

2011-06-16 Thread Mark Storer
Well there you have it.  I was skimming the spec, saw "count" and ass-u-me'd it 
worked like the Pages dictionary's count.  Nope.
 
And here's a link to the relevant JavaDoc:  
http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfOutline.html#setOpen(boolean)
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Paulo Soares [mailto:psoa...@glintt.com] 
Sent: Thursday, June 16, 2011 2:32 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Collapse bookmarks by default


You believe right. Each bookmark has an open/close state but it's not a 
flag, it's done with the /Count key in the outline dictionary. PdfOutline has 
an open/close flag to control this.
 
Paulo


____

From: Mark Storer [mailto:msto...@autonomy.com] 
Sent: Wednesday, June 15, 2011 10:43 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Collapse bookmarks by default


I believe each bookmark has an open/close setting... and I'm 
wrong.
 
It doesn't look like there's any way to control that what so 
ever.  Humph.  I'd have put money on that too.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: srikanth bapanapalli 
[mailto:srikant...@hotmail.com] 
Sent: Wednesday, June 15, 2011 10:16 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Collapse bookmarks by default


Hello,
 
i created a pdf using itext, but it shows all bookmarks 
open. i want to be able to collapse bookmarks by default.
how can i do that

here is the code
 


Document document = new Document(PageSize.A4.rotate());

PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream(filename));


writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); // Working 
Correctly 

writer.setPageEvent(new PageNumber());

document.open();

 

Sreekanth 


 



  



From: srikant...@hotmail.com
To: itext-questions@lists.sourceforge.net
Subject: Collapse bookmarks by default
Date: Wed, 15 Jun 2011 13:12:01 -0400


Hello,
 
i created a pdf using itext, but it shows all bookmarks 
open. i want to be able to collapse bookmarks by default.
how can i do that
 
thanks,

Sreekanth

 






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

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




--
EditLive Enterprise is the w

Re: [iText-questions] Collapse bookmarks by default

2011-06-15 Thread Mark Storer
I believe each bookmark has an open/close setting... and I'm wrong.
 
It doesn't look like there's any way to control that what so ever.
Humph.  I'd have put money on that too.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: srikanth bapanapalli [mailto:srikant...@hotmail.com] 
Sent: Wednesday, June 15, 2011 10:16 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Collapse bookmarks by default


Hello,
 
i created a pdf using itext, but it shows all bookmarks open. i
want to be able to collapse bookmarks by default.
how can i do that

here is the code
 


Document document = new Document(PageSize.A4.rotate());

PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream(filename));

writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); //
Working Correctly 

writer.setPageEvent(new PageNumber());

document.open();

 

Sreekanth 


 



  



From: srikant...@hotmail.com
To: itext-questions@lists.sourceforge.net
Subject: Collapse bookmarks by default
Date: Wed, 15 Jun 2011 13:12:01 -0400


Hello,
 
i created a pdf using itext, but it shows all bookmarks open. i
want to be able to collapse bookmarks by default.
how can i do that
 
thanks,

Sreekanth

 



--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Default open bookmark

2011-06-14 Thread Mark Storer
What version of iText are you using?  The version I listed has been
around for Quite Some Time, well before 5.0.  If your version is as old
as I think it is, you'll need to use PdfWriter.PageModeUseOutlines.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: srikanth bapanapalli [mailto:srikant...@hotmail.com] 
Sent: Tuesday, June 14, 2011 11:26 AM
    To: Mark Storer
Subject: RE: [iText-questions] Default open bookmark


My problem is exactly like scenerio 1, but when i tried to
impliment like you mentioned
PdfWriter.setViewerPreferences method has only one parameter and

 
when i did like this 
  

Document document = new Document(PageSize.A4.rotate()); 

PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream(filename)); 

writer.setViewerPreferences(1); 


nothing has been changed.
 
Please advice. 

thanks, 

Sreekanth Bapanapalli 



  


> Date: Tue, 14 Jun 2011 09:46:39 -0700
> From: msto...@autonomy.com
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Default open bookmark
> 
> There are two possible interpretations of your question:
> 1) How can I display the bookmark tree when the PDF is opened
(probably
> not what you meant)?
> 
>
myPdfWriter.setViewerPreferences(PdfName.NONFULLSCREENPAGEMODE,
> PdfName.USEOUTLINES);
> 
> 2) How can I display a bookmark's destination when the PDF is
opened.
> 
> It's not possible to define the "open action" in terms of a
bookmark.
> But all is not lost, you can define the document open action
as a
> destination, just like you did the bookmark.
> 
> PdfAction destinationAction = PdfAction.gotoLocalPage(pageNum,
dest,
> myPdfWriter);
> myPdfWriter.setOpenAction( destinationAction );
> 
> "dest" may well be exactly the same object you used to define
the
> bookmark.
> 
> --Mark Storer
> Senior Software Engineer
> Cardiff.com
> 
> import legalese.Disclaimer;
> Disclaimer DisCard = null;
> 
> 
> 
> > -Original Message-
> > From: srikanth bapanapalli [mailto:srikant...@hotmail.com] 
> > Sent: Tuesday, June 14, 2011 7:42 AM
> > To: itext-questions@lists.sourceforge.net
> > Subject: [iText-questions] Default open bookmark
> > 
> > Iam trying to code using itext to create bookmark, but after

> > creating PDF it always doesn't show bookmark initially, we 
> > have to explicitly open the bookmark . Can we default to
open it
> > 
> > Thanks
> > Sreekanth
> >
--
> > 
> > EditLive Enterprise is the world's most technically advanced

> > content authoring tool. Experience the power of Track 
> > Changes, Inline Image Editing and ensure content is
compliant 
> > with Accessibility Checking.
> > http://p.sf.net/sfu/ephox-dev2dev
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be
answered 
> > with a reference to the iText book: 
> > http://www.itextpdf.com/book/ Please check the keywords list

> > before you ask for examples:
http://itextpdf.com/themes/keywords.php
> > 
> > 
> 
>

--
> EditLive Enterprise is the world's most technically advanced
content
> authoring tool. Experience the power of Track Changes, Inline
Image
> Editing and ensure content is compliant with Accessibility
Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lis

Re: [iText-questions] Default open bookmark

2011-06-14 Thread Mark Storer
There are two possible interpretations of your question:
1) How can I display the bookmark tree when the PDF is opened (probably
not what you meant)?

myPdfWriter.setViewerPreferences(PdfName.NONFULLSCREENPAGEMODE,
PdfName.USEOUTLINES);

2) How can I display a bookmark's destination when the PDF is opened.

It's not possible to define the "open action" in terms of a bookmark.
But all is not lost, you can define the document open action as a
destination, just like you did the bookmark.

PdfAction destinationAction = PdfAction.gotoLocalPage(pageNum, dest,
myPdfWriter);
myPdfWriter.setOpenAction( destinationAction );

"dest" may well be exactly the same object you used to define the
bookmark.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: srikanth bapanapalli [mailto:srikant...@hotmail.com] 
> Sent: Tuesday, June 14, 2011 7:42 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Default open bookmark
> 
> Iam trying to code using itext to create bookmark, but after 
> creating PDF it always doesn't show bookmark initially, we 
> have to explicitly open the bookmark . Can we default to open it
> 
> Thanks
> Sreekanth
> --
> 
> EditLive Enterprise is the world's most technically advanced 
> content authoring tool. Experience the power of Track 
> Changes, Inline Image Editing and ensure content is compliant 
> with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Parallelizing parts of iText.

2011-06-08 Thread Mark Storer
I don't have any data to back this up, but let me make a few Educated
Guesses.  What does iText do in series that could be done in parallel?
 
1) FontFactory.registerDirectories.  It opens up every font it can find
across a variety of OSes, parses them, and saves various tidbits about
each.  It can be Very Slow when there are a lot of fonts (or large
fonts) on the system.  Executing this in a separate thread and only
blocking when an as-yet-unknown font is requested could speed things
noticably.  A given PDF generally doesn't use all that many fonts.  
2) new PdfReader(...).  Parsing a PDF.  Once a PDF's bytes are loaded
into memory (which isn't always the case), parsing each object could be
done in parallel rather than in series.
3) PdfWriter.close().  It converts each object into PDF syntax and
writes them out in series.  There are several complexities involed that
make this non-trivial to parallelize, but it should be possible.  N
worker threads each with their own reused write buffer should keep
memory use down to something manageable.  A thread pool and a matching
buffer pool?
 
That's all I can think of off the top of my head.  
 
Could you keep us up to date on your progress?  I'm looking forward to
see what you come up with.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Lorand Szakacs [mailto:lorand.szak...@gmail.com] 
Sent: Tuesday, June 07, 2011 3:19 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Parallelizing parts of iText.


Hello, 

I am a research intern at the University of Illinois at
Urbana-Champaign. We are working on an parallelization tool and we're
using iText as case study. Would it be possible for you to point us to
known hotspots(computationally intensive parts) that might benefit from
parallelization?

Thank you!
-- 
Lorand Szakacs

city: Urbana-Champaign
country: Illinois, USA
--
"Science is a way of trying not to fool yourself. The principle
is that you must not fool yourself, and you are the easiest person to
fool." - Richard Feynman


--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Getting error when I tried to open the pdf in chrome browser.

2011-05-26 Thread Mark Storer
- They're taking away PDF support, for instance in the new
Google Analytics:

http://www.google.com/support/forum/p/Google+Analytics/thread?tid=148e6e
83786fdf75
 

Based on the comments on that page,  it looks like they got A Lot of
negative user feedback and are now replacing it.
--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Appearance of PdfImportedPage objectinconsistent

2011-05-25 Thread Mark Storer
In this case, it's Adobe.  I suspect that Foxit/Others are resetting
some-but-not-all of the graphic state when displaying an XObject Form.
I say "some" only because you're not saying that they're ignoring your
clipping rectangle or transformation matrix.  Ignoring the CTM would be
Blatantly Wrong, resulting in lots of pointing and screaming.  Ignoring
other bits of the graphic state is equally wrong, but more subtly so
depending on which part of the state we're talking about.  Your dash
style for example.
 
Drawing an XObject Form implicitly creates a pushState/popState combo,
but all the existing state is still there.
 
Ah.  PDF Ref 32000_2008, section 8.10.1 "Graphics->Form
Xobjects->General".  The first paragraph reads thusly:

A form XObject is a PDF content stream that is a self-contained
description of any sequence of graphics objects (including path objects,
text objects, and sampled images). A form XObject may be painted
multiple times-either on several pages or at several locations on the
same page-and produces the same results each time, subject only to the
graphics state at the time it is invoked. Not only is this shared
definition economical to represent in the PDF file, but under suitable
circumstances the conforming reader can optimize execution by caching
the results of rendering the form XObject for repeated reuse. 

Emphasis added.  I suspect that Foxit etc aren't being rigorous enough
with the "under suitable circumstances" bit in the last sentence.

 
To drive the point home, the spec further states:

When the Do operator is applied to a form XObject, a conforming
reader shall perform the following tasks: 

a)Saves the current graphics state, as if by invoking
the q operator (see 8.4.4, "Graphics State Operators") 

b)Concatenates the matrix from the form dictionary's
Matrix entry with the current transformation matrix (CTM) 

c)Clips according to the form dictionary's BBox entry 

d)Paints the graphics objects specified in the form's
content stream 

e)Restores the saved graphics state, as if by invoking
the Q operator (see 8.4.4, "Graphics State Operators") 

Except as described above, the initial graphics state for the
form shall be inherited from the graphics state that is in effect at the
time Do is invoked. 

If you want to get the default state back, then you need to save the
state at the 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Bill Groom [mailto:bgr...@razcall.com] 
Sent: Wednesday, May 25, 2011 10:37 AM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] Appearance of PdfImportedPage
objectinconsistent



Hi Mark,

 

Thanks a lot for your response. I already thought of that
workaround but was hoping for a more "elegant" solution. Apparently
there is nothing to completely reset the graphics state to the default
state directly?

 

I also figured out that pdf readers are rendering these kind of
documents in a different way. Adobe reader for example will render the
imported pdf using the current graphics state in  the document
(resulting in wrong display of image).  Foxit reader and others are
using the default graphics settings for the imported pdf in the document
which results in a correct rendering of the image. I dived into the
Adobe pdf reference but cannot figure out which pdf reader is behaving
according to the pdf specs at this moment. For now I will use your
suggestion.  

 

Thanks, 

Bill 

 

Van: Mark Storer [mailto:msto...@autonomy.com] 
Verzonden: woensdag 25 mei 2011 18:16
Aan: Post all your questions about iText here
Onderwerp: Re: [iText-questions] Appearance of PdfImportedPage
object inconsistent

 

I'm afraid this one boils down to "Doc, it hurts when I do
this".

 

Then Don't Do That.

 

If a particular page depends on a default value rather than
explicitly setting it, and that value is set prior to drawing the
PdfImportedPage, then the exlicit value will "leak through".

 

This is where the proper use of saveState/restoreState comes in.
Going by your sample code, you've mostly got the idea already.  You just
need to restoreState all the way back to the default state before doing
your clipping and drawing your imported page.

 

 

 

--Mark Storer

  Senior Software Engineer

  Cardiff.com

 

import legalese.Disclaimer;

Disclaimer DisCard = null;

 

Re: [iText-questions] Appearance of PdfImportedPage object inconsistent

2011-05-25 Thread Mark Storer
I'm afraid this one boils down to "Doc, it hurts when I do this".
 
Then Don't Do That.
 
If a particular page depends on a default value rather than explicitly
setting it, and that value is set prior to drawing the PdfImportedPage,
then the exlicit value will "leak through".
 
This is where the proper use of saveState/restoreState comes in.  Going
by your sample code, you've mostly got the idea already.  You just need
to restoreState all the way back to the default state before doing your
clipping and drawing your imported page.
 
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Bill Groom [mailto:bgr...@razcall.com] 
Sent: Wednesday, May 25, 2011 2:04 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Appearance of PdfImportedPage object
inconsistent


In some cases it is necessary to add pdf images and graphics to
a document. To do this I use PdfImportedPage. Unfortunately the
appearance of the image in the final document is not consistent but
seems to be influenced by the current graphics state of the document.
When I use for example a dashed stroke in the document the strokes in
the imported image also become dashed (in the original image they have
been defined solid).

A similar issue occurs when text in the imported graphic pdf
uses a same font as the text in the document. In the imported pdf all
fonts are embedded (the same is true for the final document). In some
cases the alignment and spacing of characters differs from the original
graphic.

It is not possible to change something in the imported
images/graphics. Is there a way to force a PdfImportedPage object to be
treated as a seperate, independent pdf without being influenced by
graphics state of the document? 

A snippet of the code being used:
.
contentbyte.saveState();
contentbyte.rectangle(0, 0, 200, 200);
contentbyte.clip();
contentbyte.newPath();
PdfImportedPage image = writer.getImportedPage(reader, 1);
contentbyte.addTemplate(image, 1, 0, 0, 1, 0, 0);
contentbyte.restoreState();
.

Thanks,
Bill


--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Place text in speacified x y coordinate

2011-05-23 Thread Mark Storer
It's up to you to give the correct coordinates to align your text with whatever 
else on the page you want it aligned.

You might find PdfContentByte.showTextAligned() to be useful.  It can 
right/center/left align your text based on the coordinate you pass in, and can 
apply rotation.  However, it still needs the correct coordinates.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: karthik B [mailto:karthik87_...@yahoo.co.in] 
> Sent: Monday, May 23, 2011 5:19 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Place text in speacified x y coordinate
> 
> Hi ,
> Again regarding placing of text.
> 
> I use barcode fonts to genrate the barcode. I get a encoded 
> string and apply the barcode font for the encoded string, but 
> while applying the Y coordinate is not correctly aligned. Do 
> i need to set any property.
> 
> I have used both the methods, one given by you and next is using
> 
> pdfContentByte.BeginText()
> pdfContentByte.SetFontAndSize(bf1, 28.3)
> pdfContentByte.SetTextMatrix(arr(0), arr(1))
> pdfContentByte.ShowText("!2.3.-f"")
> pdfContentByte.Stroke()
> 
> Could you please help in fixing this issue, Thanks & Regards 
> Karthik B 
> 
> 
> --- On Thu, 19/5/11, 1T3XT BVBA  wrote:
> 
> > From: 1T3XT BVBA 
> > Subject: Re: [iText-questions] Place text in speacified x y 
> coordinate
> > To: itext-questions@lists.sourceforge.net
> > Date: Thursday, 19 May, 2011, 9:05 PM
> > Op 19/05/2011 17:09, karthik B
> > schreef:
> > > Hi,
> > > I tried with the rectangle. It is perfectly matching
> > with the inedisgn coordinates and my calculation to render.
> > OK, now that you're sure about the coordinates of the 
> rectangle, use 
> > those coordinates in combination with ColumnText.
> > 
> > ColumnText ct = new ColumnText(writer.getDirectContent());
> > ct.setSimpleColumn(x1, y1, x2, y2);
> > ct.addText(new Phrase("Sample"));
> > ct.go();
> > 
> > Or something like that, I wrote this from memory, you should check 
> > chapter 3 of the book for the correct syntax.
> > 
> > 
> --
> >  What Every C/C++ and Fortran developer Should Know!
> > Read this article and learn how Intel has extended the reach of its 
> > next-generation tools to help Windows* and Linux* C/C++ and Fortran 
> > developers boost performance applications - including clusters.
> > http://p.sf.net/sfu/intel-dev2devmay
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be 
> answered with a 
> > reference to the iText book: http://www.itextpdf.com/book/ Please 
> > check the keywords list before you ask for examples:
> > http://itextpdf.com/themes/keywords.php
> > 
> 
> --
> 
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach 
> of its next-generation tools to help Windows* and Linux* 
> C/C++ and Fortran developers boost performance applications - 
> including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] open POPUP window on pdf load

2011-05-19 Thread Mark Storer
I'm not sure you can do this unless you wrap the PDF in an HTML page and
have them talk to each other.
 
In the PDF, everything starts hidden until it gets a "wake up" message
from the host HTML page, at which point the script reveals everything
(save perhaps a "go fill in the registration page" message).
 
 
Err... there's quite a few hoops to jump through here.  Why don't you
simply put the PDF behind an HTML login/registration page?  Does the PDF
need to stand alone?
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: itextdev123 [mailto:se.sandeepk...@gmail.com] 
Sent: Wednesday, May 18, 2011 11:50 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] open POPUP window on pdf load


HI , My requirement is to open a registration form before
showing PDF content to user. So what I want is... when user opens PDF,
Registration Form should open on top PDF (as modal window, PDF content
should be grayed out) .. Registration Form URL is like
www.example.com/register.html. once user registers, only then PDF
content should be actually visible to user. Please let me know how can I
open Registration Form Popup on PDF loading. Thanks 



View this message in context: open POPUP window on pdf load
<http://itext-general.2136553.n4.nabble.com/open-POPUP-window-on-pdf-loa
d-tp3533583p3533583.html> 
Sent from the iText - General mailing list archive
<http://itext-general.2136553.n4.nabble.com/>  at Nabble.com.


--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Optional context retrieval

2011-05-19 Thread Mark Storer
There were some potentially-relevant fixes in 5.0.6:

Parsing PDF:
CMapAwareDocumentFont: Some PDFs have a diff map bigger than 256
characters.
CMapParser: Fix to read broken ToUnicode cmaps.
Cache the fonts used in text extraction.

However, the fonts in this document don't use CMaps, so that's probably
not it.  I think we're simply not extracting the encoding differences
properly.  This could be a bug in iText, though I haven't dug any
deeper.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Michael [mailto:ad...@tradeplatform.us] 
> Sent: Wednesday, May 18, 2011 7:36 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Optional context retrieval
> 
> Mark Storer  autonomy.com> writes:
> 
> > 
> > On the contray.  I think it would.  What version of iText 
> are you using?
> > 
> > --Mark Storer
> >   Senior Software Engineer
> >   Cardiff.com
> 
> itextsharp-5.05. (I am a license holder as well)
> 
> 
> --
> 
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach 
> of its next-generation tools to help Windows* and Linux* 
> C/C++ and Fortran developers boost performance applications - 
> including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Optional context retrieval

2011-05-18 Thread Mark Storer
On the contray.  I think it would.  What version of iText are you using?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Michael [mailto:ad...@tradeplatform.us] 
> Sent: Wednesday, May 18, 2011 1:28 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Optional context retrieval
> 
> Mark Storer  autonomy.com> writes:
> 
> > 
> > Not sure who built this file, but everything after the 
> first byte in 
> > that line is worthless crap:
> > "({02})Tj" would have produced the same results (without confusing 
> > "examine document").
> > 
> Well, this pdf is produced by CutePDF Writer when the screen 
> is printed to a file - that's where report.pdf comes from. 
> What is interesting, however, that "save as text" feature of 
> Adobe Acrobat Pro v.9 (that's what I have), correctly exports 
> the report in the text file.
> 
> Are you on the opinion that iText will not be able to 
> retrieve the text from this pdf?
> 
> 
> --
> 
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its 
> next-generation tools to help Windows* and Linux* C/C++ and Fortran 
> developers boost performance applications - including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php
> 
> 

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Optional context retrieval

2011-05-18 Thread Mark Storer
Ah.  I was using the "preflight check" find hidden text feature (and in
Acrobat Pro X)... I'm not even sure that particular report exists in X.

At any rate, I think that might be a bug in the "hidden text detection",
which would explain why I cannot find it in 'X'.  Those are all spaces
(in a custom encoding).

Here's a line from the content stream:

[({02})-4.99539({01})-4.99539({01})-4.99539({01})-4.99508({01})-4.99508(
{01})-4.99508({01})-4.99508({01})-4.99508({01})-4.99448({01})-4.99508({0
1})-4.99508({01})-4.99508({01})-4.99569({01})-4.99569({01})-4.99569({01}
)-4.99569({01})-4.99569({01})-4.99448({01})-4.99569({01})-4.99569({01})-
4.99569({01})-4.99569({01})-4.99569({01})-4.99569({01})-4.99569({01})-4.
99569({01})-4.99569({01})-4.99569({01})-4.99569({01})-4.99569({01})-4.99
691({01})-4.99448({01})-4.99448({01})-4.99448({01})-4.99448({01})-4.9920
4({01})-4.99448({01})-4.99448({01})-4.99448({01})-4.99448({01})-4.99448(
{01})-4.99448({01})-4.99448({01})-4.99448({01})-4.99448({01})-4.99448({0
1})-4.99448({01})-4.99448({01})-4.99448({01})-4.99448({01})]TJ

The {XX} is how my PDF Inspector Thingy displays non-ascii values.  In
this particular font's encoding, the 0x01 is a space.

Not sure who built this file, but everything after the first byte in
that line is worthless crap:
"({02})Tj" would have produced the same results (without confusing
"examine document").

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Michael [mailto:ad...@tradeplatform.us] 
> Sent: Wednesday, May 18, 2011 12:48 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Optional context retrieval
> 
> Mark Storer  autonomy.com> writes:
> > 
> > Err... There's no hidden text in that PDF.
> > 
> > --Mark Storer
> >   Senior Software Engineer
> >   Cardiff.com
> 
> Just to be sure I downloaded report.pdf that I myself 
> submitted. I am using Adobe Acrobat Pro, menu 
> Document->Examine Document. When I click on "Examine 
> Document" the toolbar shows two entries for this pdf: 
> "Metadata" adn "Hidden text". Hidden text preview is what I 
> did the screenshot from. I assume that "hidden" text is what 
> itext defines as "optional content".
> 
> Did you by any chance looked at my code? test1(string 
> filepath) returns last two lines of the page. If not for the 
> optional content - why all text is not being retrieved?
> 
> 
> 
> 
> --
> 
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach 
> of its next-generation tools to help Windows* and Linux* 
> C/C++ and Fortran developers boost performance applications - 
> including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Optional context retrieval

2011-05-18 Thread Mark Storer
Err... There's no hidden text in that PDF.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Michael [mailto:ad...@tradeplatform.us] 
> Sent: Wednesday, May 18, 2011 9:54 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Optional context retrieval
> 
> Mark Storer  autonomy.com> writes:
> 
> > Can we see the PDF?
> > 
> > --Mark Storer
> >   Senior Software Engineer
> >   Cardiff.com
> 
> Absolutely, and thank you for the quick response! Here is the link:
> 
> http://rapidshare.com/files/874892705/report.pdf
> 
> Let me know if you have problems downloading it and I'll try 
> to find another storage for it.
> 
> 
> --
> 
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its 
> next-generation tools to help Windows* and Linux* C/C++ and Fortran 
> developers boost performance applications - including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php
> 
> 

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Problem with stamping certain PDF documents

2011-05-18 Thread Mark Storer
You don't change the margins, you adapt to them.  If you want your text
centered on the page rather than:
 
float centerX = pageRect.getWidth() / 2f;
float centerY = pageRect.getHeight() / 2f;
 
you take the actual coordinates into account, not just their relative
positions:
 
float centerX = pageRect.getLeft() + (pageRect.getWidth() / 2f);
float centerY = pageRect.getBottom() + (pageRect.getHeight() / 2f);
 
You should get pageRect from reader.getCropBox(pageNum) or
reader.getBoxSize(pageNum, "crop");
 
Another debugging trick I just thought of when finding a coordinate like
this would be to draw a number of concentric circles in different
colors, so you can see where your coordinate is on the page.  Draw the
largest first or it'll cover all the others.
 
PdfContentByte content = writer.getContent();
 
float RADIUS_INCREMENT = Math.max(pageRect.getHeight(),
pageRect.getWidth()) / 5;
Color circleColors[2] = {Color.Gray, Color.Black}; 
for (int i = 10; i > 0; --i) {
content.setColorFill(circleColors[i % 2]; // alternating gray and
black circles
float radius = RADIUS_INCREMENT * i;
content.arc(xCoord + radius, yCoord + radius, xCoord - radius,
yCoord - radius, 0f, 360f);
    content.fill();
}
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Varunkumar Nagarajan [mailto:varunkuma...@gmail.com] 
Sent: Wednesday, May 18, 2011 9:20 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Problem with stamping certain PDF
documents


>> 2.  You're assuming that the lower left corner of a PDF page
is always
"0,0".  It's not.  And your problem debugging landscape pages
sounds
like what happens when you get a transformation matrix wrong.

When debugging rotation like this, I often expand the page
margins 1000
points in every direction.  This lets me see where my content
"landed"
when my transformation is wrong. 

-- I think this should be the culprit. Could you please let me
know how to change the margins. 

>> 3. Not sure what you mean by "changed the orientation to
vertical".  Did
you use a "-V" charmap?

-- Setting the rotation as 90 in ShowTextAligned

Thanks,
Varun


On Wed, May 18, 2011 at 9:19 PM,
 wrote:


Send iText-questions mailing list submissions to
   itext-questions@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web,
visit

https://lists.sourceforge.net/lists/listinfo/itext-questions
or, via email, send a message with subject or body
'help' to
   itext-questions-requ...@lists.sourceforge.net

You can reach the person managing the list at
   itext-questions-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is
more specific
than "Re: Contents of iText-questions digest..."


Today's Topics:

  1. Form based PDF (New Developer)
  2. Re: Problem with stamping certain PDF documents
(Alexis Pigeon)
  3. Re: Form based PDF (Balder)
  4. Re: Form based PDF (Alexis Pigeon)
  5. Re: Sibstitute image in PDF with OCR text (Paulo
Soares)
  6. Re: Problem with stamping certain PDF documents
(Mark Storer)



--

Message: 1
Date: Wed, 18 May 2011 09:54:25 -0400
From: New Developer 
Subject: [iText-questions] Form based PDF
To: itext-questions@lists.sourceforge.net
Message-ID:

Content-Type: text/plain; charset=us-ascii

Does anyone know
How can I create a PDF or use a jpg image of a form  and
then allow
iTextPDF to "fill out the form"  on an Android device  ?

I have a form that I want to capture as the background
either PDF or Image
and then allow  and android user to use iTextPDF to fill
in the form and save
both the completed form as a PDF and the data filled in
as an XML or Text Document

any help would be greatly appreciated

Thanks in advance


--
 

Re: [iText-questions] Optional context retrieval

2011-05-18 Thread Mark Storer
I believe "hidden text" in that context is text that has been drawn with
Text Render Mode 3 (no stroke, no fill).  It may include text that has
been clipped as well.

In either case, iText will pick it up.

I see a lot of "unknown character" characters in that screen shot.  If
Acrobat cannot successfully extract the text content, iText won't be
able to either.

Can we see the PDF?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Michael [mailto:ad...@tradeplatform.us] 
> Sent: Wednesday, May 18, 2011 8:49 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Optional context retrieval
> 
> I am trying to retrieve text from the pdf file and I am 
> having difficulties with (I guess) optional content. I placed 
> the screenshot of the file opened in Adobe Pro here:
> 
> http://imageshack.us/f/863/samplereport.jpg/
> 
> Adobe shows the "hidden" text and also successfully exports 
> the file to "text" 
> format. I am trying to use iTextSharp to do the same, but I 
> can't extract the text that is visible in Adobe. 
> 
> Any help/advise is greatly appreciated. 
> 
> internal class PageReader
> {
> public void readPage(String pagepath)
> {
> test1(pagepath);// returns non-askii result
> test2(pagepath);// returns only the last line (I 
> guess it is "direct content.
> }
> 
> private void test1(String pagepath)
> {
> PdfReader reader = new PdfReader(pagepath);
> String textres = "";
> for (int i = 1; i <= reader.NumberOfPages; ++i)
> {
> byte[] lastpage = reader.GetPageContent(1);
> if (lastpage == null)
> return;
> 
> PRTokeniser tokenizer = new PRTokeniser(lastpage);
> while (tokenizer.NextToken())
> if (tokenizer.TokenType == 
> PRTokeniser.TokType.STRING)
> textres += tokenizer.StringValue;
> }
> }
> 
> private void test2(String pagepath)
> {
>  PdfReader reader = new PdfReader(pagepath);
> // String str = 
> PdfTextExtractor.GetTextFromPage(reader, 1);
> 
> PdfReaderContentParser parser = new 
> PdfReaderContentParser(reader);
> TextExtractionStrategy strategy = new 
> TextExtractionStrategy();
> String str = "";
> for (int i = 1; i <= reader.NumberOfPages; ++i)
> {
> 
> parser.ProcessContent(i, strategy);
> str += strategy.txt;
> }
> }
> }
> 
> internal class TextExtractionStrategy : IRenderListener
> {
> public void BeginTextBlock() { }
> public void EndTextBlock() { }
> public void RenderImage(ImageRenderInfo renderInfo) { }
> public void RenderText(TextRenderInfo renderInfo)
> {
> _str += renderInfo.GetText();
> }
> private String _str;
> 
> public String txt { get { return _str; } }
> }
> 
> 
> 
> --
> 
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach 
> of its next-generation tools to help Windows* and Linux* 
> C/C++ and Fortran developers boost performance applications - 
> including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Problem with stamping certain PDF documents

2011-05-18 Thread Mark Storer
2.  You're assuming that the lower left corner of a PDF page is always
"0,0".  It's not.  And your problem debugging landscape pages sounds
like what happens when you get a transformation matrix wrong.
 
When debugging rotation like this, I often expand the page margins 1000
points in every direction.  This lets me see where my content "landed"
when my transformation is wrong.
 
3. Not sure what you mean by "changed the orientation to vertical".  Did
you use a "-V" charmap?
 
5.  Embedding won't matter if it's a transformation problem.
 
 
I suspect your "bad" PDFs are those with rotated pages and/or pages with
non "0,0" lower left corners.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Varunkumar Nagarajan [mailto:varunkuma...@gmail.com] 
Sent: Wednesday, May 18, 2011 5:25 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Problem with stamping certain PDF
documents


Hi, 

This is Varun from Hyderabad, India. I am trying to stamp PDF
documents with some text message. It does not seem to be working on
**some of the PDF** documents. Please help me solve the issue. Listing
down the things I have tried. 

1. Changing the content layer. In our service, we are writing to
the 'overContent' layer. Hence, this should not be a problem even if the
actual content overshoots the margin. I tried adding to 'underContent'
layer as well. But, no luck.
2. Absolute positioning for watermarks. The current version of
the service uses the width and height of the page to determine where the
watermarks have to be positioned. The service also uses the rotation
property to position the watermarks. While I was debugging the problem,
figured out that rotation was incorrect for the pages in landscape. I
tried hard-coding the position but nothing showed up even after that.
3. Changing the text orientation. Tried changing the text
orientation of the watermark to vertical. Again, no luck. 
4. Ability to edit the PDF. The next thing I tried was to ensure
that the PDF file is editable. I was able to add annotations from Adobe
Acrobat. No problem with edit-ability.
5. Changing the font. Tried embedding the font used for
displaying the watermark. No luck.
6. Checked the PDF properties to see if I can catch anything.
(File -> Properties from Adobe reader). All the properties seem to be
similar that of the one which works.

But, the same code works on all other PDFs. Could this be
related to some property of PDF file? Thanks in advance.

Thanks,
Varun

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] import data field properties to pdf

2011-05-12 Thread Mark Storer
I was thinking the lack for a update_data_fields corresponded
with a similar limitation in iText. Seems to be the case.

 
On the contrary. iText is quite capable of changing PDFs to your heart's
content, provided you're willing to Dive Deep into the internal PDF
structure.  iText also has high-level support for a wide variety of PDF
features, including everything in your proposed text format.
 
However, someone has to write a parser for that format and the
corresponding iText calls.  That hasn't happened.  There's nothing in
your proposed format that iText can't handle at a higher level.
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Tom D. Davidson [mailto:t...@tomdavidson.org] 
Sent: Thursday, May 12, 2011 10:28 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] import data field properties to
pdf


Hello and thank you for the quite response. Here is a summary
for the issue for the next searcher: 

PDF with many many field groups that have the wrong states. I
would like to update the states with my text editor for via Gnu/Linux
command line. pdftk is an easy to use tool that uses iText.


pdftk has dump_data and update_data that allows a users to
export the metadata, modify the text file, then update the metadata from
the text file.
pdftk also has dump_data_fields that your can get a nicely
formated list of all the fields and their properties. But there is not a
corresponding update_data_fields. It would be easy to modify the text
file and keep the correct structure.
I was thinking the lack for a update_data_fields corresponded
with a similar limitation in iText. Seems to be the case.



However if you want "to manipulate [a PDF] in [your]
text editor", that wouldn't be wise.

Right, I have the same concern about modifying the PDF. But not
of modifying a nicely formated dump of the data fields.

RUPS[1] seems to be the answer. But since updating is not
possible I guess Ill spend the next few years of my life updating all
the field individually via Acrobat :D

thanks again for the quick answer, even if its not the one i was
hopping for.
br, tom

[1] http://sourceforge.net/projects/itextrups/


--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] bug on RadioCheckField.CheckType?

2011-05-12 Thread Mark Storer
Yep.  Strange.

In the mean time, you can:

  String typeChars[] = {"4", "l", "8", "u", "n", "H"};
  myPdfFormField.setMKNormalCaption( typeChars[RadioCheckField.TYPE_* -
1] );

(which is pretty what setCheckType causes in the resulting PdfFormField,
minus setting the font /again/)

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: newbie2itext [mailto:newbie2c...@hotmail.com] 
> Sent: Thursday, May 12, 2011 7:43 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] bug on RadioCheckField.CheckType?
> 
> RadioCheckField.cs
> function
> "protected PdfFormField GetField(bool isRadio)"
> line# 358
> 
> 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/bug-on-RadioCheckFi
eld-CheckType-tp3516150p3517728.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php
> 
> 

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] bug on RadioCheckField.CheckType?

2011-05-11 Thread Mark Storer
Line #/file name?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: newbie2itext [mailto:newbie2c...@hotmail.com] 
> Sent: Wednesday, May 11, 2011 4:53 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] bug on RadioCheckField.CheckType?
> 
> I'm using iTextSharp 5.05.
> 
> I tried to set CheckType to be non-default type but failed to do it.
> My suspicion is that in RadioCheckField.GetField(), the value 
> is reset all the time.
> 
> I guess the solution is delete the statement "CheckType = 
> TYPE_CHECK;"?
> 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/bug-on-RadioCheckFi
eld-CheckType-tp3516150p3516150.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Achieve unprecedented app performance and reliability What 
> every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation 
> tools to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Font rotation in the VerticalText

2011-05-06 Thread Mark Storer
Options:
Search text and replace '-' and '|' with '|' and '-' respectively prior
to adding it to the VerticalText.

Search the text and add only those characters in a font that swaps them
for you.

Create one or more Type 3 fonts (single byte, so you'd have to do more
text searching to figure out which font to use after your 256th unique
character), and use that font instead.


All the options involve searching your input string[s] prior to adding
them to a VerticalText.  I suggest going the "replacement" route.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp] 
> Sent: Friday, May 06, 2011 10:15 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Font rotation in the VerticalText
> 
> Hi,
> I'm trying to use a BaseFont loaded from a font file in a 
> VerticalText. It goes almost fine but some characters like 
> hyphen or parenthesis have to be rotated in the VerticalText.
> 
> For example:
> 
> A-B
> 
> should be like
> 
> A
> |
> B
> 
> instead of
> 
> A
> -
> B
> 
> When I used standard font such as "HeiseiKakuGo-W5" those are 
> rotated correctly but if a font is loaded from a file such as 
> "/Windows/Fonts/msgothic.ttc" then not rotated. I created 
> those fonts like followings:
> 
> BaseFont.createFont("HeiseiKakuGo-W5","UniJIS-UCS2-V",BaseFont
.NOT_EMBEDDED);
> //Good
> BaseFont.createFont("/Windows/Fonts/msgothic.ttc,0",BaseFont.I
> DENTITY_V,
> BaseFont.EMBEDDED); //Bad
> 
> My question is what is the difference between these fonts and 
> is there any way to fix this problem.
> Thanks in advance.
> Seiji Takegata
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Adding input via text boxes to current PDFdocument using .NET

2011-05-06 Thread Mark Storer
iText can create PDFs with form fields, or add form fields to existing
PDFs.

But there's a problem with your workflow.  Using Adobe Reader, you
cannot save form data locally from a PDF...  Mostly.

The exception is for PDFs that have been "Reader Enabled".  You can
reader enable a PDF in one of two ways:

1) Save it from Acrobat Pro (I think this was introduced in v8, not
sure) with the Proper Settings.  
2) Buy an Acrobat Server Thingy from Adobe.  Not at all cheap.

So saving the form and emailing it has some issues, but might work
anyway.  As a sure-fire alternative, PDF forms can submit their data
over the internet, either in their native FDF, or via an HTML-style
POST.  I'd think that would be more stream-lined.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: vandiar [mailto:magus169...@gmail.com] 
> Sent: Thursday, May 05, 2011 7:10 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Adding input via text boxes to 
> current PDFdocument using .NET
> 
> We are designing an IMS for the University of Louisiana at 
> Monroe. Everything they do right now is done manually ala 
> print PDF, scan, and then fax. What we are trying to do is 
> automate this process and do it via email. I want to be able 
> to add some of the data elements through the use of visual 
> studio to the current PDF documents. Any suggestions? Thanks 
> in advance!
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Adding-input-via-te
xt-boxes-to-current-PDF-document-using-NET-> tp3500569p3500569.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] itext, coldFusion, annotations and Pop-Up Notes

2011-05-05 Thread Mark Storer
You probably just want the /Subject:
 
PdfString subj = annot.getAsString(PdfName.SUBJECT);
String subjStr = subj.toString();
subjStr = subjStr.substring(subjStr.indexOf('-'));
 
You'll have to translate that to CF-speak, but I think you get the idea.
 
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Brendan Ganning [mailto:brendan.gann...@gmail.com] 
Sent: Thursday, May 05, 2011 12:02 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] itext, coldFusion,annotations and
Pop-Up Notes


I agree, I don't mind parsing out the values. If I have the full
content stream, I would just parese it out and get this nissianIQi and
parse it.  I originally was able to read in the PDF via coldfusion's pdf
tag.  However after someone did a save as on the pdf I lost part of the
stream. 

Forgive me as I am new to this, so what you are saying is I can
get the content stream through something like


/* Read the PDF */
reader =
CreateObject("java","com.lowagie.text.pdf.PdfReader").init(expandPath("t
est.pdf"));

/* Get the Page Dictionary object, I think I need this to read
the stream? */
pageDict = reader.getPageN(1);

/* Create a pdfname object */
pdfname = createObject("java","com.lowagie.text.pdf.PdfName");

Now I see the dictionary has a getAsStream
however pageDict.getAsStream(pdfName) doesnt work.

Thanks for the help and patience.

On Thu, May 5, 2011 at 1:43 PM, 1T3XT BVBA 
wrote:


Op 5/05/2011 20:10, Brendan Ganning schreef:

> As I stated I can get the comments, but ideally I
would like to get
> the values 2N1, 01H, 01K


Well, those values are to be retrieved from this content
stream:

q
0 0 0 0 k
1 i
/RelativeColorimetric ri
/GS12 gs
82.192 43.137 m
82.192 21.8718 64.9532 4.633 43.688 4.633 c
22.4228 4.633 5.184 21.8718 5.184 43.137 c
5.184 64.4022 22.4228 81.641 43.688 81.641 c
64.9532 81.641 82.192 64.4022 82.192 43.137 c
f*
q
82.692 43.137 m
82.692 21.5957 65.2293 4.133 43.688 4.133 c
22.1467 4.133 4.684 21.5957 4.684 43.137 c
4.684 64.6783 22.1467 82.141 43.688 82.141 c
65.2293 82.141 82.692 64.6783 82.692 43.137 c
W* n
0 0 0 1 K
2 w 10 M 0 j 0 J []0 d
/GS18 gs
82.692 43.137 m
82.692 21.5957 65.2293 4.133 43.688 4.133 c
22.1467 4.133 4.684 21.5957 4.684 43.137 c
4.684 64.6783 22.1467 82.141 43.688 82.141 c
65.2293 82.141 82.692 64.6783 82.692 43.137 c
h
S
Q
/GS19 gs
82.192 43.137 m
82.192 21.8718 64.9532 4.633 43.688 4.633 c
22.4228 4.633 5.184 21.8718 5.184 43.137 c
5.184 64.4022 22.4228 81.641 43.688 81.641 c
64.9532 81.641 82.192 64.4022 82.192 43.137 c
f*
q
82.692 43.137 m
82.692 21.5957 65.2293 4.133 43.688 4.133 c
22.1467 4.133 4.684 21.5957 4.684 43.137 c
4.684 64.6783 22.1467 82.141 43.688 82.141 c
65.2293 82.141 82.692 64.6783 82.692 43.137 c
W* n
0 0 0 1 K
2 w 10 M 0 j 0 J []0 d
/GS20 gs
82.692 43.137 m
82.692 21.5957 65.2293 4.133 43.688 4.133 c
22.1467 4.133 4.684 21.5957 4.684 43.137 c
4.684 64.6783 22.1467 82.141 43.688 82.141 c
65.2293 82.141 82.692 64.6783 82.692 43.137 c
h
S
Q
0 0 0 1 k
/GS21 gs
BT
/T1_3 1 Tf
24 0 0 24 21.6575 37.4273 Tm
(\001\002\022)Tj
ET
0 0 0 0 k
/GS22 gs
95.825 32.9 255.64 21.871 re
f
0 0 0 1 K
1 w 10 M 0 j 0 J []0 d
/GS23 gs
95.825 32.9 255.64 21.871 re
h
S
0 0 0 1 k
BT
/T1_4 1 Tf
14 0 0 14 100.75 38.2191 Tm
(A)Tj
/T1_5 1 Tf
(**/9/43')

Re: [iText-questions] itext, coldFusion, annotations and Pop-Up Notes

2011-05-05 Thread Mark Storer
Here's the edited dump from an internal tool of one of those
annotations:
1 (CosDict& 35)
2 AP (CosDict)
291 C (CosArray)
295 CreationDate = D:20110504082511-05'00' (CosString)
296 F = 4 (CosInteger)
297 M = D:20110504082511-05'00' (CosString)
298 NM = 05ff164d-f023-4832-9f58-497e4a7f2e50 (CosString)
299 Name = nissanIQi-01K (CosName)
300 P (CosDict& 10)
(this caused my tool to go up to the page, then spider down to
Everything Else on the whole page... lots of irrelevant crap)
1215 Popup (CosDict& 38 line 476)
1216 Rect (CosArray)
1221 Subj = nissanIQi-01K (CosString)
1222 Subtype = Stamp (CosName)
1223 T = ganningb (CosString)
1224 Type = Annot (CosName)
 
It looks like you need to get the Name or Subject and parse out the bit
you want.
 
PS: It also looks like this file was originally created with iText 1.4.

 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Brendan Ganning [mailto:brendan.gann...@gmail.com] 
Sent: Thursday, May 05, 2011 11:11 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] itext, coldFusion,annotations and
Pop-Up Notes


Hi Mark, 

Sure.  Here is the PDF

As I stated I can get the comments, but ideally I would like to
get the values 2N1, 01H, 01K
Thanks for the help.


    On Thu, May 5, 2011 at 1:07 PM, Mark Storer
 wrote:


May we see the PDF?
         
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Brendan Ganning
[mailto:brendan.gann...@gmail.com] 
Sent: Thursday, May 05, 2011 10:04 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] itext, coldFusion,
annotations and Pop-Up Notes


I am trying to grab either the text or stamp
information from a pdf through coldfusion.  Right now I have a PDF with
3 Stamps and 1 Comment box.  Each stamp is composed of two elements. A
text piece and a circle stamp with text such as 2d0f. I am trying to get
the stamp info. I am close, but I must be missing something. 


//Load my PDF ( it has 1 comment, and 3 stamps.
Each stamp has a text box and a cirle with text)
reader =
CreateObject("java","com.lowagie.text.pdf.PdfReader").init(expandPath("t
est.pdf"));
// PDF is just one page
pageDict = reader.getPageN(1);

pdfname =
createObject("java","com.lowagie.text.pdf.PdfName");

// Get Annotations
annots = pageDict.getAsArray(pdfname.ANNOTS);

iterator = annots.listIterator()>




   
   
   
   
   
   

content=#reader.getPdfObject(annot.get(pdfname.CONTENTS))#
   
   
   
   
 
  
   it was null 
   
   
   





--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective
network
management toolset available today.  Delivers lowest
initial
acquisition cost and overall TCO of any competing
solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be
answered with a reference to the iText book:
http://www.itextpdf.com/book/
Please ch

Re: [iText-questions] itext, coldFusion, annotations and Pop-Up Notes

2011-05-05 Thread Mark Storer
May we see the PDF?
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Brendan Ganning [mailto:brendan.gann...@gmail.com] 
Sent: Thursday, May 05, 2011 10:04 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] itext, coldFusion, annotations and
Pop-Up Notes


I am trying to grab either the text or stamp information from a
pdf through coldfusion.  Right now I have a PDF with 3 Stamps and 1
Comment box.  Each stamp is composed of two elements. A text piece and a
circle stamp with text such as 2d0f. I am trying to get the stamp info.
I am close, but I must be missing something. 


//Load my PDF ( it has 1 comment, and 3 stamps.  Each stamp has
a text box and a cirle with text)
reader =
CreateObject("java","com.lowagie.text.pdf.PdfReader").init(expandPath("t
est.pdf"));
// PDF is just one page
pageDict = reader.getPageN(1);

pdfname = createObject("java","com.lowagie.text.pdf.PdfName");

// Get Annotations
annots = pageDict.getAsArray(pdfname.ANNOTS);

iterator = annots.listIterator()>




   
   
   
   
   
   

content=#reader.getPdfObject(annot.get(pdfname.CONTENTS))#
   
   
   
   
 
  
   it was null 
   
   
   


--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] AcroFields.Item field - how to get "is ithidden"?

2011-05-03 Thread Mark Storer
http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.
pdf

Annotations and fields are defined in chapter 12 (Interactive Features),
sections 5 and 7.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: archie14 [mailto:ad...@tradeplatform.us] 
> Sent: Tuesday, May 03, 2011 3:14 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions]AcroFields.Item field - how to 
> get "is ithidden"?
> 
> Mark Storer  autonomy.com> writes:
> 
> > 
> > Whoops...
> > 
> > >  if (flags & PdfAnnotation.FLAGS_HIDDEN != 0) {
> > 
> > Should be
> > 
> >if (flags.intValue() & PdfAnnotation.FLAGS_HIDDEN != 0) {
> > 
> > "flags" is a PdfNumber... It has no implicit "int" 
> conversion, so you 
> > must explicitly call one of the *Value() functions.
> > > I think he means PdfAnnotation.FLAGS_HIDDEN.
> > > 
> > > >PdfDictionary pdct = field.GetMerged(k);
> > >  PdfNumber flags = pdct.getAsNumber(PdfName.F);
> > >  if (flags & PdfAnnotation.FLAGS_HIDDEN != 0) {
> > >// it's hidden
> > >  } else {
> >
> 
> Thank you very much, it is exactly what I was looking for. I 
> am confused with the meaning of PdfName.F. When I was 
> searching for the answer I found this flag, but in the table 
> of "actions for interactive form field." (table 7.4 in the 
> textinaction book). Nowhere did I find the description of 
> PdfName.F as hidden value. Can you point me to the 
> documentation source for this info?
> Thanks again for the help.
> 
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] AcroFields.Item field - how to get "is ithidden"?

2011-05-03 Thread Mark Storer
Whoops...

>  if (flags & PdfAnnotation.FLAGS_HIDDEN != 0) {

Should be

   if (flags.intValue() & PdfAnnotation.FLAGS_HIDDEN != 0) {

"flags" is a PdfNumber... It has no implicit "int" conversion, so you
must explicitly call one of the *Value() functions.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Mark Storer [mailto:msto...@autonomy.com] 
> Sent: Tuesday, May 03, 2011 1:26 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] AcroFields.Item field - how to 
> get "is ithidden"?
> 
> I think he means PdfAnnotation.FLAGS_HIDDEN.
> 
> >PdfDictionary pdct = field.GetMerged(k);
>  PdfNumber flags = pdct.getAsNumber(PdfName.F);
>  if (flags & PdfAnnotation.FLAGS_HIDDEN != 0) {
>// it's hidden
>  } else {
>it's visible.
>  }
> 
> 
> 
> 
> --Mark Storer
>   Senior Software Engineer
>   Cardiff.com
>  
> import legalese.Disclaimer;
> Disclaimer DisCard = null;
>  
>  
> 
> > -Original Message-
> > From: Leonard Rosenthol [mailto:lrose...@adobe.com]
> > Sent: Tuesday, May 03, 2011 11:32 AM
> > To: Post all your questions about iText here
> > Subject: Re: [iText-questions] AcroFields.Item field - how 
> to get "is 
> > it hidden"?
> > 
> > Check the rectangle to see if it's inside the CropBox.
> > 
> > -Original Message-
> > From: archie14 [mailto:ad...@tradeplatform.us]
> > Sent: Tuesday, May 03, 2011 10:50 AM
> > To: itext-questions@lists.sourceforge.net
> > Subject: [iText-questions] AcroFields.Item field - how to 
> get "is it 
> > hidden"?
> > 
> > I am enumerating fields in the document and need to know if 
> the field 
> > is hidden. My understanding is that this property is located in 
> > PdfDictionary instance. Studying "IText in Action 2nd ed" I 
> can't find 
> > the description of how to query for the visibility flag (not for 
> > TextField etc, but for AcroFields.Item class)
> > 
> > I will appreciate any help/advise.
> > 
> > Here is what I do:
> > 
> > AcroFields fields = reader.AcroFields;
> > IEnumerator > en =
> > fields.Fields.GetEnumerator();
> > 
> > while (en.MoveNext())
> > {
> >String fieldName = en.Current.Key;
> >AcroFields.Item field = en.Current.Value;
> >for (int k = 0; k < field.Size; ++k)
> >{
> >PdfDictionary pdct = field.GetMerged(k);
> > 
> >// What key is responsible for the visibility? Or 
> ITextinAct. 
> > page #?
> >}
> > }
> > 
> > 
> > --
> > 
> > WhatsUp Gold - Download Free Network Management Software The most 
> > intuitive, comprehensive, and cost-effective network management 
> > toolset available today.  Delivers lowest initial 
> acquisition cost and 
> > overall TCO of any competing solution.
> > http://p.sf.net/sfu/whatsupgold-sd
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be 
> answered with a 
> > reference to the iText book:
> > http://www.itextpdf.com/book/ Please check the keywords list before 
> > you ask for examples: http://itextpdf.com/themes/keywords.php
> > 
> > --
> > 
> > WhatsUp Gold - Download Free Network Management Software The most 
> > intuitive, comprehensive, and cost-effective network management 
> > toolset available today.  Delivers lowest initial 
> acquisition cost and 
> > overall TCO of any competing solution.
> > http://p.sf.net/sfu/whatsupgold-sd
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be 
> answered with a 
> > reference to the iText book:
> > http://www.itextpdf.com/book/ Please check the keywords list before 
> > 

Re: [iText-questions] AcroFields.Item field - how to get "is it hidden"?

2011-05-03 Thread Mark Storer
I think he means PdfAnnotation.FLAGS_HIDDEN.

>PdfDictionary pdct = field.GetMerged(k);
 PdfNumber flags = pdct.getAsNumber(PdfName.F);
 if (flags & PdfAnnotation.FLAGS_HIDDEN != 0) {
   // it's hidden
 } else {
   it's visible.
 }




--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Leonard Rosenthol [mailto:lrose...@adobe.com] 
> Sent: Tuesday, May 03, 2011 11:32 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] AcroFields.Item field - how to 
> get "is it hidden"?
> 
> Check the rectangle to see if it's inside the CropBox.
> 
> -Original Message-
> From: archie14 [mailto:ad...@tradeplatform.us]
> Sent: Tuesday, May 03, 2011 10:50 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] AcroFields.Item field - how to get 
> "is it hidden"?
> 
> I am enumerating fields in the document and need to know if 
> the field is hidden. My understanding is that this property 
> is located in PdfDictionary instance. Studying "IText in 
> Action 2nd ed" I can't find the description of how to query 
> for the visibility flag (not for TextField etc, but for 
> AcroFields.Item class)
> 
> I will appreciate any help/advise.
> 
> Here is what I do:
> 
> AcroFields fields = reader.AcroFields;
> IEnumerator > en =
> fields.Fields.GetEnumerator();
> 
> while (en.MoveNext())
> {
>String fieldName = en.Current.Key;
>AcroFields.Item field = en.Current.Value;
>for (int k = 0; k < field.Size; ++k)
>{
>PdfDictionary pdct = field.GetMerged(k);
> 
>// What key is responsible for the visibility? Or 
> ITextinAct. page #?
>}
> } 
> 
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How to set line spacing for a multi-line formfield?

2011-05-03 Thread Mark Storer
Not really, no.
 
You can set the TL (Text Leading) in the /DA (Default Appearance)
string, but there's no guarantee that it'll be used.  Some versions of
Reader do, but I think the most recent do not.  I haven't tried messing
with the /DA in a while now so I can't tell you which versions will or
won't work in detail (though I can say that Acrobat X ignores TL).
 
You can also build a custom appearance for the field while filling it.
You'd have to apply that appearance to the AcroFields.Item.widget's
manually, with PdfDictionary.put(), or with Item.writeToAll()... or
rewrite some portion of TextField to look for a TL command in the DA and
use it (which would make use of the normal field appearance generation
code).
 
No matter how you apply a custom appearance like that, your still at the
mercy of the PDF viewing app (Reader) if the user changes a field value.
 
Finally, you could chain together several 1-line text fields with
script.  Ugly hack, I know... but it would allow you to control the
spacing between them, and let users change the value.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Eric Chow [mailto:eric...@gmail.com] 
Sent: Monday, May 02, 2011 9:19 PM
To: Post all your questions about iText here
Subject: [iText-questions] How to set line spacing for a
multi-line formfield?


Hello,

Is it possible to set a specific line-height(line spacing) for a
multi-line form field at run-time in iText Java?



Best regards,
Eric



--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Get Hyperlink text from PDF using c#

2011-05-03 Thread Mark Storer
I suggest you use PdfTextExtractor with a
LocationTextExtractionStrategy, then search the String returned by the
text extractor for "http://"; and parse out the rest of the URL.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: gayatri parthasarathy [mailto:gayatri.parthasara...@gmail.com] 
> Sent: Tuesday, May 03, 2011 5:17 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Get Hyperlink text from PDF using c#
> 
> Yes Mark. I need to get all the hyperlinks which starts with 
> http:// from a pdf file using c#. Please share any code 
> snippet for this.
> 
> On 4/26/11, Mark Storer  wrote:
> > Are you talking "text on the page that starts with 
> 'http://'" or "link 
> > annotations"?
> >
> > --Mark Storer
> >   Senior Software Engineer
> >   Cardiff.com
> >
> > import legalese.Disclaimer;
> > Disclaimer DisCard = null;
> >
> >
> >
> >> -Original Message-
> >> From: gayatri parthasarathy 
> [mailto:gayatri.parthasara...@gmail.com]
> >> Sent: Tuesday, April 26, 2011 5:04 AM
> >> To: itext-questions@lists.sourceforge.net
> >> Subject: [iText-questions] Get Hyperlink text from PDF using c#
> >>
> >> Hi,
> >>
> >>   Please share any code snippet for getting the hyperlink 
> text from a 
> >> pdf file. i am using itextsharp library.
> >>
> >> Thanks in advance
> >>
> >> --
> >> 
> >> WhatsUp Gold - Download Free Network Management Software The most 
> >> intuitive, comprehensive, and cost-effective network management 
> >> toolset available today.  Delivers lowest initial acquisition cost 
> >> and overall TCO of any competing solution.
> >> http://p.sf.net/sfu/whatsupgold-sd
> >> ___
> >> iText-questions mailing list
> >> iText-questions@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/itext-questions
> >>
> >> iText(R) is a registered trademark of 1T3XT BVBA.
> >> Many questions posted to this list can (and will) be 
> answered with a 
> >> reference to the iText book:
> >> http://www.itextpdf.com/book/ Please check the keywords 
> list before 
> >> you ask for examples: http://itextpdf.com/themes/keywords.php
> >>
> >>
> >
> > 
> --
> >  WhatsUp Gold - Download Free Network Management 
> Software The 
> > most intuitive, comprehensive, and cost-effective network 
> management 
> > toolset available today.  Delivers lowest initial 
> acquisition cost and 
> > overall TCO of any competing solution.
> > http://p.sf.net/sfu/whatsupgold-sd
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be 
> answered with a 
> > reference to the iText book: http://www.itextpdf.com/book/ Please 
> > check the keywords list before you ask for examples:
> > http://itextpdf.com/themes/keywords.php
> >
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] character spacing in vertical text

2011-05-03 Thread Mark Storer
You should be able to get it from the trunk right now and try it out.  I didn't 
really... /test/ anything.  I went "Klingon Programmer" there for a moment:

http://gradha.sdf-eu.org/textos/klingon_programmer.en.html

"What is this talk of 'release'? Klingons do not make software 'releases'. Our 
software 'escapes' leaving a bloody trail of designers and quality assurance 
people in its wake."

Yeah, like that.  ;)

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp] 
> Sent: Tuesday, May 03, 2011 1:25 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] character spacing in vertical text
> 
> Great!
> I will wait for your patch, hopefully included in the future release.
> Thanks.
> 
> 2011/5/3 Mark Storer :
> > It would appear that a chunk's character spacing is ignored 
> in the current version of VerticalText:
> >
> >    void writeLine(PdfLine line, PdfContentByte text, PdfContentByte 
> > graphics) {
> >        PdfFont currentFont = null;
> >        PdfChunk chunk;
> >        for (Iterator j = line.iterator(); j.hasNext(); ) {
> >            chunk = j.next();
> >
> >            if (chunk.font().compareTo(currentFont) != 0) {
> >                currentFont = chunk.font();
> >                text.setFontAndSize(currentFont.getFont(), 
> > currentFont.size());
> >            }
> >            BaseColor color = chunk.color();
> >            if (color != null)
> >                text.setColorFill(color);
> >            text.showText(chunk.toString());
> >            if (color != null)
> >                text.resetRGBColorFill();
> >        }
> >    }
> >
> > In order to obey character spacing, we'd need to add 
> something like this:
> >
> >            float charSpacing = chunk.getCharacterSpacing();
> >            if (charSpacing != 0f)
> >                text.setCharacterSpacing(charSpacing);
> >
> >            text.showText(chunk.toString());
> >
> >            if (charSpacing != 0f)
> >                text.setCharacterSpacing(0f);
> >
> >
> > It would be cleaner to add a "current character spacing" 
> member variable, and only set the characer spacing when the 
> chunk requested something different.  Ditto for the text 
> color for that matter... Though changing the text (fill) 
> color extends outside the bounds of a given text block, so 
> there's definitely a sound reason for the current implementation.
> >
> > None the less, I've written up a quick patch that will use 
> character spacing if present.  It also uses PdfDocument's 
> behavior where a missing character spacing attribute in a 
> given chunk simply means "don't change anything".  That way 
> you can just set the spacing in the first chunk and forget 
> about it rather than setting it for every single chunk.
> >
> >
> >
> > --Mark Storer
> >  Senior Software Engineer
> >  Cardiff.com
> >
> > import legalese.Disclaimer;
> > Disclaimer DisCard = null;
> >
> >
> >
> >> -Original Message-
> >> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp]
> >> Sent: Monday, May 02, 2011 1:30 PM
> >> To: Post all your questions about iText here
> >> Subject: Re: [iText-questions] character spacing in vertical text
> >>
> >> Hi,
> >> In vertical text, character spacing would be vertical spacing and 
> >> leading be horizontal spacing. Vertical text is like the following 
> >> image.
> >>
> >> http://kawausotei.cocolog-nifty.com/easy/images/2008/03/19/mok
> > iticapture.png
> >>
> >> VerticalText.setLeading works in this maner but 
> >> Chunk.setCharacterSpacing in the VerticalText won't work as I 
> >> expected.
> >>
> >> 2011/5/3 Mark Storer :
> >> > Forgive me, but aren't they the same thing in vertical text?
> >> >
> >> > --Mark Storer
> >> >  Senior Software Engineer
> >> >  Cardiff.com
> >> >
> >> > import legalese.Disclaimer;
> >> > Disclaimer DisCard = null;
> >> >
> >> >
> >> >
> >> >> -Original Message-
> >> >> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp]
> >> >> Sent: Monday, May 02, 2011 12:43 PM
> >> >> T

Re: [iText-questions] character spacing in vertical text

2011-05-02 Thread Mark Storer
It would appear that a chunk's character spacing is ignored in the current 
version of VerticalText:

void writeLine(PdfLine line, PdfContentByte text, PdfContentByte graphics) {
PdfFont currentFont = null;
PdfChunk chunk;
for (Iterator j = line.iterator(); j.hasNext(); ) {
chunk = j.next();

if (chunk.font().compareTo(currentFont) != 0) {
currentFont = chunk.font();
text.setFontAndSize(currentFont.getFont(), currentFont.size());
}
BaseColor color = chunk.color();
if (color != null)
text.setColorFill(color);
text.showText(chunk.toString());
if (color != null)
text.resetRGBColorFill();
}
}

In order to obey character spacing, we'd need to add something like this:

float charSpacing = chunk.getCharacterSpacing();
if (charSpacing != 0f)
text.setCharacterSpacing(charSpacing);

text.showText(chunk.toString());

if (charSpacing != 0f)
text.setCharacterSpacing(0f);


It would be cleaner to add a "current character spacing" member variable, and 
only set the characer spacing when the chunk requested something different.  
Ditto for the text color for that matter... Though changing the text (fill) 
color extends outside the bounds of a given text block, so there's definitely a 
sound reason for the current implementation.

None the less, I've written up a quick patch that will use character spacing if 
present.  It also uses PdfDocument's behavior where a missing character spacing 
attribute in a given chunk simply means "don't change anything".  That way you 
can just set the spacing in the first chunk and forget about it rather than 
setting it for every single chunk.



--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp] 
> Sent: Monday, May 02, 2011 1:30 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] character spacing in vertical text
> 
> Hi,
> In vertical text, character spacing would be vertical spacing 
> and leading be horizontal spacing. Vertical text is like the 
> following image.
> 
> http://kawausotei.cocolog-nifty.com/easy/images/2008/03/19/mok
iticapture.png
> 
> VerticalText.setLeading works in this maner but 
> Chunk.setCharacterSpacing in the VerticalText won't work as I 
> expected.
> 
> 2011/5/3 Mark Storer :
> > Forgive me, but aren't they the same thing in vertical text?
> >
> > --Mark Storer
> >  Senior Software Engineer
> >  Cardiff.com
> >
> > import legalese.Disclaimer;
> > Disclaimer DisCard = null;
> >
> >
> >
> >> -Original Message-
> >> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp]
> >> Sent: Monday, May 02, 2011 12:43 PM
> >> To: Post all your questions about iText here
> >> Subject: Re: [iText-questions] character spacing in vertical text
> >>
> >> Thank you for your reply.
> >> I tried setLeading() but it set line spacing instead of character 
> >> spacing.
> >> Thank you anyway.
> >>
> >> 2011/5/3 Mark Storer :
> >> > VerticalText.setLeading()
> >> >
> >> > --Mark Storer
> >> >  Senior Software Engineer
> >> >  Cardiff.com
> >> >
> >> > import legalese.Disclaimer;
> >> > Disclaimer DisCard = null;
> >> >
> >> >
> >> >
> >> >> -Original Message-
> >> >> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp]
> >> >> Sent: Saturday, April 30, 2011 12:24 AM
> >> >> To: itext-questions@lists.sourceforge.net
> >> >> Subject: [iText-questions] character spacing in vertical text
> >> >>
> >> >> Hello,
> >> >> I wonder if there's a way to specify character spacing 
> in vertical 
> >> >> text.
> >> >> I've tried setCharacterSpacing method with Chunk object
> >> then add it
> >> >> to VerticalText object using addText(Chunk chunk) method but no 
> >> >> effect.
> >> >> Any suggestion will be appreciated.
> >> >> Thank you.
> >> >> Seiji Takegata.
> >> >>
> >> >> --
> >> >> 
> >> >> WhatsUp Gold - Download Free Net

Re: [iText-questions] character spacing in vertical text

2011-05-02 Thread Mark Storer
Forgive me, but aren't they the same thing in vertical text?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp] 
> Sent: Monday, May 02, 2011 12:43 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] character spacing in vertical text
> 
> Thank you for your reply.
> I tried setLeading() but it set line spacing instead of  
> character spacing.
> Thank you anyway.
> 
> 2011/5/3 Mark Storer :
> > VerticalText.setLeading()
> >
> > --Mark Storer
> >  Senior Software Engineer
> >  Cardiff.com
> >
> > import legalese.Disclaimer;
> > Disclaimer DisCard = null;
> >
> >
> >
> >> -Original Message-
> >> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp]
> >> Sent: Saturday, April 30, 2011 12:24 AM
> >> To: itext-questions@lists.sourceforge.net
> >> Subject: [iText-questions] character spacing in vertical text
> >>
> >> Hello,
> >> I wonder if there's a way to specify character spacing in vertical 
> >> text.
> >> I've tried setCharacterSpacing method with Chunk object 
> then add it 
> >> to VerticalText object using addText(Chunk chunk) method but no 
> >> effect.
> >> Any suggestion will be appreciated.
> >> Thank you.
> >> Seiji Takegata.
> >>
> >> --
> >> 
> >> WhatsUp Gold - Download Free Network Management Software The most 
> >> intuitive, comprehensive, and cost-effective network management 
> >> toolset available today.  Delivers lowest initial acquisition cost 
> >> and overall TCO of any competing solution.
> >> http://p.sf.net/sfu/whatsupgold-sd
> >> ___
> >> iText-questions mailing list
> >> iText-questions@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/itext-questions
> >>
> >> iText(R) is a registered trademark of 1T3XT BVBA.
> >> Many questions posted to this list can (and will) be 
> answered with a 
> >> reference to the iText book:
> >> http://www.itextpdf.com/book/ Please check the keywords 
> list before 
> >> you ask for examples: http://itextpdf.com/themes/keywords.php
> >>
> >>
> >
> > 
> --
> >  WhatsUp Gold - Download Free Network Management 
> Software The 
> > most intuitive, comprehensive, and cost-effective network 
> management 
> > toolset available today.  Delivers lowest initial 
> acquisition cost and 
> > overall TCO of any competing solution.
> > http://p.sf.net/sfu/whatsupgold-sd
> > ___
> > iText-questions mailing list
> > iText-questions@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> > iText(R) is a registered trademark of 1T3XT BVBA.
> > Many questions posted to this list can (and will) be 
> answered with a 
> > reference to the iText book: http://www.itextpdf.com/book/ Please 
> > check the keywords list before you ask for examples: 
> > http://itextpdf.com/themes/keywords.php
> >
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] character spacing in vertical text

2011-05-02 Thread Mark Storer
VerticalText.setLeading()

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: TAKEGATA Seiji [mailto:takeg...@veltec.co.jp] 
> Sent: Saturday, April 30, 2011 12:24 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] character spacing in vertical text
> 
> Hello,
> I wonder if there's a way to specify character spacing in 
> vertical text.
> I've tried setCharacterSpacing method with Chunk object then 
> add it to VerticalText object using addText(Chunk chunk) 
> method but no effect.
> Any suggestion will be appreciated.
> Thank you.
> Seiji Takegata.
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How to activate the zoom feature for interactive PDF file? Urgent help!!

2011-05-02 Thread Mark Storer
That has nothing to do with iText, so is Off Topic.  Might I suggest you
ask here instead?

http://superuser.com/

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: butterfamily [mailto:kimseng...@gmail.com] 
> Sent: Thursday, April 28, 2011 3:46 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] How to activate the zoom feature 
> for interactive PDF file? Urgent help!!
> 
> Does anyone know how to activate the zoom feature in Adobe 
> acrobat reader for an Interactive page flipping PDF file?
>  
> I have exported an Indesign file to a page flipping swf and i 
> imported it into Acrobat and saved it as a page flipping PDF 
> file. My question is when i tried to zoom in the page in 
> acrobat reader 9, only the page white background is zoomed in 
> and not the swf content itself. May I know what do i need to 
> activate??
>  
> I have a sample file that can actually zoom in the swf 
> content in Acrobat reader but i can't seem to know how to 
> activate it. please help!!
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/How-to-activate-the
-zoom-feature-for-interactive-PDF-file-Urgent-help->
tp3482463p3482463.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Portability of BaseFont.createFont (was Re:Purpose of book/{build, examples}.xml?

2011-05-02 Thread Mark Storer
> IIUC, then instead of the change I made, I could have make 
> this change (to book/src/part1/chapter02/DirectorPhrases2.java):
> 
>   timesbd = FontFactory.getFont("timesbd");
> 
>   times = FontFactory.getFont("times");
> 
> Is that right?

If you've already called FontFactory.registerDirectories(), then yes.


--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Larry Evans [mailto:cppljev...@suddenlink.net] 
> Sent: Monday, May 02, 2011 10:23 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Portability of 
> BaseFont.createFont (was Re:Purpose of book/{build, examples}.xml?
> 
> On 05/02/11 11:47, Mark Storer wrote:
> > This is what FontFactory.registerDirectories() is for.
> > RegisterDirectories calls FontFactory.registerDirectory() on a wide 
> > variety of commonly used font paths:
> > 
> > public int registerDirectories() {
> > int count = 0;
> > String windir = System.getenv("windir");
> > String fileseparator = System.getProperty("file.separator");
> > if (windir != null && fileseparator != null) {
> > count += registerDirectory(windir + 
> fileseparator + "fonts");
> > }
> > count += registerDirectory("/usr/share/X11/fonts", true);
> > count += registerDirectory("/usr/X/lib/X11/fonts", true);
> > count += 
> registerDirectory("/usr/openwin/lib/X11/fonts", true);
> > count += registerDirectory("/usr/share/fonts", true);
> > count += 
> registerDirectory("/usr/X11R6/lib/X11/fonts", true);
> > count += registerDirectory("/Library/Fonts");
> > count += registerDirectory("/System/Library/Fonts");
> > return count;
> > }
> > 
> > The "true" param tells registerDirectory to scan all 
> subdirectories, 
> > so it would find "/usr/share/fonts/truetype/msttcorefonts".
> > 
> > The only problem with registerDirectories is that it takes time 
> > directly proportionate to the number and size of the fonts on your 
> > system to execute.  If you're relaunching the app that uses 
> iText on a 
> > regular basis rather than loading it once, registerDirectories can 
> > consume the majority of your execution time.
> > 
> > YMMV.
> > 
> > Looking at the above code, you could add a "windir" environment 
> > variable to just about any system with a "/fonts" folder 
> and be Good 
> > To Go.  We might want to consider a more general 
> enviromental variable 
> > for this very occasion, or perhaps a specific list of fonts.
> > 
> > --Mark Storer
> >   Senior Software Engineer
> >   Cardiff.com
> 
> Thanks Mark.
> 
> IIUC, then instead of the change I made, I could have make 
> this change (to book/src/part1/chapter02/DirectorPhrases2.java):
> 
>   timesbd = FontFactory.getFont("timesbd");
> 
>   times = FontFactory.getFont("times");
> 
> Is that right?
> 
> [snip]
> >> -Original Message-
> >> From: Larry Evans [mailto:cppljev...@suddenlink.net]
> >> Sent: Monday, May 02, 2011 7:42 AM
> >> To: itext-questions@lists.sourceforge.net
> >> Subject: [iText-questions] Portability of BaseFont.createFont (was 
> >> Re:Purpose of book/{build, examples}.xml?
> [snip]
> >> standard place to put things.  Anyway, I found the fonts here:
> >>
> >>   /usr/share/fonts/truetype/msttcorefonts
> >>
> >> I changed:
> >>
> >>   book/src/part1/chapter02/DirectorPhrases2.java
> >>
> >> by substituting:
> >>
> >>   /usr/share/fonts/truetype/msttcorefonts
> >>
> >> for:
> >>
> >>   c:/windows/fonts/
> >>
> >> in the 2 statements:
> >>   timesbd = BaseFont.createFont(
> >> "c:/windows/fonts/timesbd.ttf",
> >>  BaseFont.WINANSI, BaseFont.EMBEDDED);
> >>   times = BaseFont.createFont(
> >> "c:/windows/fonts/times.ttf",
> >>  BaseFont.WINANSI, BaseFont.EMBEDDED);
> >>
> >> and that .java file now compiles without problem; however, I will 
> >> have to make similar changes to all files that have similar errors.
> [snip]
> Now, the only reason I can think of why the path to the font 
> file was hardcoded instead of usi

Re: [iText-questions] Portability of BaseFont.createFont (was Re:Purpose of book/{build, examples}.xml?

2011-05-02 Thread Mark Storer
This is what FontFactory.registerDirectories() is for.
RegisterDirectories calls FontFactory.registerDirectory() on a wide
variety of commonly used font paths:

public int registerDirectories() {
int count = 0;
String windir = System.getenv("windir");
String fileseparator = System.getProperty("file.separator");
if (windir != null && fileseparator != null) {
count += registerDirectory(windir + fileseparator +
"fonts");
}
count += registerDirectory("/usr/share/X11/fonts", true);
count += registerDirectory("/usr/X/lib/X11/fonts", true);
count += registerDirectory("/usr/openwin/lib/X11/fonts", true);
count += registerDirectory("/usr/share/fonts", true);
count += registerDirectory("/usr/X11R6/lib/X11/fonts", true);
count += registerDirectory("/Library/Fonts");
count += registerDirectory("/System/Library/Fonts");
return count;
}

The "true" param tells registerDirectory to scan all subdirectories, so
it would find "/usr/share/fonts/truetype/msttcorefonts".

The only problem with registerDirectories is that it takes time directly
proportionate to the number and size of the fonts on your system to
execute.  If you're relaunching the app that uses iText on a regular
basis rather than loading it once, registerDirectories can consume the
majority of your execution time.  

YMMV.

Looking at the above code, you could add a "windir" environment variable
to just about any system with a "/fonts" folder and be Good To Go.  We
might want to consider a more general enviromental variable for this
very occasion, or perhaps a specific list of fonts.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Larry Evans [mailto:cppljev...@suddenlink.net] 
> Sent: Monday, May 02, 2011 7:42 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Portability of BaseFont.createFont 
> (was Re:Purpose of book/{build, examples}.xml?
> 
> On 05/02/11 01:15, 1T3XT BVBA wrote:
> > Op 1/05/2011 19:28, Larry Evans schreef:
> >> Did an `svn update` then `ant execute` which got much 
> fewer errors, 
> >> but still got some suggesting a windows path expression (using c:) 
> >> instaad of something more generic was used:
> > That's documented on p374.
> > 
> > The rationale is that we make it easy for Windows users to run the 
> > code, whereas Linux users are smart enough to fix this problem.
> > 
> > Using the c:/windows/fonts/ path is the "simple" solution.
> > The generic solution is explained from section 11.4.1 on (p374).
> > 
> Thanks for the reference.  However, the suggestion on that 
> page to look at:
> 
>   /usr/share/X11/fonts/
> 
> doesn't work for ubuntu, which I gather is typical for linux 
> distributions which sometimes (maybe often) don't have a 
> standard place to put things.  Anyway, I found the fonts here:
> 
>   /usr/share/fonts/truetype/msttcorefonts
> 
> I changed:
> 
>   book/src/part1/chapter02/DirectorPhrases2.java
> 
> by substituting:
> 
>   /usr/share/fonts/truetype/msttcorefonts
> 
> for:
> 
>   c:/windows/fonts/
> 
> in the 2 statements:
>   timesbd = BaseFont.createFont(
> "c:/windows/fonts/timesbd.ttf",
>  BaseFont.WINANSI, BaseFont.EMBEDDED);
>   times = BaseFont.createFont(
> "c:/windows/fonts/times.ttf",
>  BaseFont.WINANSI, BaseFont.EMBEDDED);
> 
> and that .java file now compiles without problem; however, I 
> will have to make similar changes to all files that have 
> similar errors.  Wouldn't providing a constant string, 
> somewhere, for the directory where the fonts are located make 
> the code more portable?  I mean something like the:
> 
>public static final String RESULT =
> "results/part1/chapter02/director_phrases_2.pdf";
> 
> only it would be:
> 
>   public static final String FONTSDIR
> = "c:/windows/fonts/";
> 
> for windows, and:
> 
>   public static final String FONTSDIR
> = "/usr/share/fonts/truetype/msttcorefonts/";
> 
> for ubuntu, and, as suggested on p. 374:
> 
>   public static final String FONTSDIR
> = "/Library/fonts/";
> 
> for Mac.  Also, this os specific code could be documented in 
> maybe a README.protability.txt file or something like that.  
> It would be nice if the `mv clean install` command could make 
> this change automagically.  Software oackages made with make 
> usually 

Re: [iText-questions] How to watermark a digitally signed pdfprogramatically

2011-04-28 Thread Mark Storer
A single reply will suffice in the future.
 
May we see your output from both signed and unsigned PDFs?
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Kiran Nepal [mailto:kiran_2...@yahoo.com] 
Sent: Thursday, April 28, 2011 11:25 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] How to watermark a digitally
signed pdfprogramatically


Hi Leonard,
 
The code doesn't throw any error, it executes fine but there is no
change in digitally signed pdf. It is fine for me even it would show the
signature invalid after the modification.
 
My code works fine for normal pdf i.e pdf without digital signature.
 
I would really appreciate any help.
 
Regards,
Kiran

--- On Thu, 4/28/11, Leonard Rosenthol  wrote:



From: Leonard Rosenthol 
Subject: Re: [iText-questions] How to watermark a digitally
signed pdf programatically
To: "Post all your questions about iText here"

Date: Thursday, April 28, 2011, 10:00 AM



What do you mean "doesn't work"?  

 

An error is thrown?  The code executes fine but nothing shows on
the PDF?  Other?!?!? 

  

Be aware, of course, that modifying a digitally signed PDF will
cause the signature to show as INVALID (for obvious reasons) 

  

Leonard 

  

From: Kiran Nepal [mailto:kiran_2...@yahoo.com] 
Sent: Thursday, April 28, 2011 9:27 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] How to watermark a digitally signed
pdf programatically

  

Hi Friends, 

I urgently need to add watermark on a digitally signed pdf
programatically using C#. I can watermark normal pdf using the code
below but, it doesn't work for a pdf that with digital signature. Can
you please help me to solve this issue. 

The following code works and adds watermark on a normal pdf and doesn't
work for digitally signed pdf 

public void AddWatermarkText(string sourceFile, string
outputFile, string watermarkText, iTextSharp.text.pdf.BaseFont
watermarkFont, float watermarkFontSize, iTextSharp.text.Color
watermarkFontColor, float watermarkFontOpacity, float
watermarkRotation,string waterMarkWord) 
{ 
iTextSharp.text.pdf.PdfReader reader = null; 
iTextSharp.text.pdf.PdfStamper stamper = null; 
iTextSharp.text.pdf.PdfGState gstate = null; 
iTextSharp.text.pdf.PdfContentByte underContent = null; 
iTextSharp.text.Rectangle rect = null; 

int pageCount = 0; 
try 
{ 
   { 
reader = new
iTextSharp.text.pdf.PdfReader(sourceFile); 
rect = reader.GetPageSizeWithRotation(1); 
//stamper = new
iTextSharp.text.pdf.PdfStamper(reader, new
System.IO.FileStream(outputFile, System.IO.FileMode.Create));//original
working but not for signed certificate 
stamper = new PdfStamper(reader, new
System.IO.FileStream(outputFile, System.IO.FileMode.CreateNew), '\0',
true); //Runs but doesn't work for signed pdf 

//PdfStamper stamp = new PdfStamper(reader, new
BinaryReader("c:\\my_dir\\" + SignedPdf + "-watermarked.pdf"), '\0',
true); //Google for writing in Signed Pdf 


if (watermarkFont == null) 
{ 
watermarkFont =
iTextSharp.text.pdf.BaseFont.CreateFont(iTextSharp.text.pdf.BaseFont.HEL
VETICA, iTextSharp.text.pdf.BaseFont.CP1252,
iTextSharp.text.pdf.BaseFont.NOT_EMBEDDED); 
} 
if (watermarkFontColor == null) 
{ 
watermarkFontColor = iTextSharp.text.Color.BLUE;

} 
gstate = new iTextSharp.text.pdf.PdfGState(); 
gstate.FillOpacity = watermarkFontOpacity; 
gstate.StrokeOpacity = watermarkFontOpacity; 
pageCount = reader.NumberOfPages; 
for (int i = 1; i <= pageCount; i++) 
{ 
//underContent = stamper.GetUnderContent(1);
//If we need just one page, comment for loop and pagecount and write (1)
instead of i 
underContent = stamper.GetUnderContent(i);
//write uder the other text///GetOverContent for above the existing page

//_with1 = underContent; 
underContent.SaveState(); 
underContent.SetGState(gstate); 
underContent.SetColorFill(watermarkFontColor); 
underContent.BeginText(

Re: [iText-questions] How to watermark a digitally signedpdf programatically

2011-04-28 Thread Mark Storer
Oh, and setting the pdf version to "1.0" is probably a bad idea.  That
might be ignored due to using append mode, but it wouldn't hurt to get
the version from your reader and preserve it.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Leonard Rosenthol [mailto:lrose...@adobe.com] 
Sent: Thursday, April 28, 2011 10:01 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] How to watermark a digitally
signedpdf programatically



What do you mean "doesn't work"?  

 

An error is thrown?  The code executes fine but nothing shows on
the PDF?  Other?!?!?

 

Be aware, of course, that modifying a digitally signed PDF will
cause the signature to show as INVALID (for obvious reasons)

 

Leonard

 

From: Kiran Nepal [mailto:kiran_2...@yahoo.com] 
Sent: Thursday, April 28, 2011 9:27 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] How to watermark a digitally signed
pdf programatically

 

Hi Friends, 

I urgently need to add watermark on a digitally signed pdf
programatically using C#. I can watermark normal pdf using the code
below but, it doesn't work for a pdf that with digital signature. Can
you please help me to solve this issue. 

The following code works and adds watermark on a normal pdf and doesn't
work for digitally signed pdf 

public void AddWatermarkText(string sourceFile, string
outputFile, string watermarkText, iTextSharp.text.pdf.BaseFont
watermarkFont, float watermarkFontSize, iTextSharp.text.Color
watermarkFontColor, float watermarkFontOpacity, float
watermarkRotation,string waterMarkWord) 
{ 
iTextSharp.text.pdf.PdfReader reader = null; 
iTextSharp.text.pdf.PdfStamper stamper = null; 
iTextSharp.text.pdf.PdfGState gstate = null; 
iTextSharp.text.pdf.PdfContentByte underContent = null; 
iTextSharp.text.Rectangle rect = null; 

int pageCount = 0; 
try 
{ 
   { 
reader = new
iTextSharp.text.pdf.PdfReader(sourceFile); 
rect = reader.GetPageSizeWithRotation(1); 
//stamper = new
iTextSharp.text.pdf.PdfStamper(reader, new
System.IO.FileStream(outputFile, System.IO.FileMode.Create));//original
working but not for signed certificate 
stamper = new PdfStamper(reader, new
System.IO.FileStream(outputFile, System.IO.FileMode.CreateNew), '\0',
true); //Runs but doesn't work for signed pdf 

//PdfStamper stamp = new PdfStamper(reader, new
BinaryReader("c:\\my_dir\\" + SignedPdf + "-watermarked.pdf"), '\0',
true); //Google for writing in Signed Pdf 


if (watermarkFont == null) 
{ 
watermarkFont =
iTextSharp.text.pdf.BaseFont.CreateFont(iTextSharp.text.pdf.BaseFont.HEL
VETICA, iTextSharp.text.pdf.BaseFont.CP1252,
iTextSharp.text.pdf.BaseFont.NOT_EMBEDDED); 
} 
if (watermarkFontColor == null) 
{ 
watermarkFontColor = iTextSharp.text.Color.BLUE;

} 
gstate = new iTextSharp.text.pdf.PdfGState(); 
gstate.FillOpacity = watermarkFontOpacity; 
gstate.StrokeOpacity = watermarkFontOpacity; 
pageCount = reader.NumberOfPages; 
for (int i = 1; i <= pageCount; i++) 
{ 
//underContent = stamper.GetUnderContent(1);
//If we need just one page, comment for loop and pagecount and write (1)
instead of i 
underContent = stamper.GetUnderContent(i);
//write uder the other text///GetOverContent for above the existing page

//_with1 = underContent; 
underContent.SaveState(); 
underContent.SetGState(gstate); 
underContent.SetColorFill(watermarkFontColor); 
underContent.BeginText(); 
underContent.SetFontAndSize(watermarkFont,
watermarkFontSize); 
underContent.SetTextMatrix(30, 30); 
 
underContent.ShowTextAligned(iTextSharp.text.Element.ALIGN_CENTER,
watermarkText, rect.Width / 2, rect.Height / 2, watermarkRotation); 
underContent.EndText(); 
underContent.RestoreState(); 
} 
} 
  stamper.Close(); 
reader.Close(); 
} 
catch (Exception ex

Re: [iText-questions] How to watermark a digitally signed pdfprogramatically

2011-04-28 Thread Mark Storer
What do you mean by "it doesn't work".  Does it produce a PDF?  Is it
valid?  Is the signature invalid (you cannot get around that)?
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Kiran Nepal [mailto:kiran_2...@yahoo.com] 
Sent: Thursday, April 28, 2011 9:27 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] How to watermark a digitally signed
pdfprogramatically


Hi Friends, 

I urgently need to add watermark on a digitally signed pdf
programatically using C#. I can watermark normal pdf using the code
below but, it doesn't work for a pdf that with digital signature. Can
you please help me to solve this issue. 

The following code works and adds watermark on a normal pdf and doesn't
work for digitally signed pdf 

public void AddWatermarkText(string sourceFile, string
outputFile, string watermarkText, iTextSharp.text.pdf.BaseFont
watermarkFont, float watermarkFontSize, iTextSharp.text.Color
watermarkFontColor, float watermarkFontOpacity, float
watermarkRotation,string waterMarkWord) 
{ 
iTextSharp.text.pdf.PdfReader reader = null; 
iTextSharp.text.pdf.PdfStamper stamper = null; 
iTextSharp.text.pdf.PdfGState gstate = null; 
iTextSharp.text.pdf.PdfContentByte underContent = null; 
iTextSharp.text.Rectangle rect = null; 

int pageCount = 0; 
try 
{ 
   { 
reader = new
iTextSharp.text.pdf.PdfReader(sourceFile); 
rect = reader.GetPageSizeWithRotation(1); 
//stamper = new
iTextSharp.text.pdf.PdfStamper(reader, new
System.IO.FileStream(outputFile, System.IO.FileMode.Create));//original
working but not for signed certificate 
stamper = new PdfStamper(reader, new
System.IO.FileStream(outputFile, System.IO.FileMode.CreateNew), '\0',
true); //Runs but doesn't work for signed pdf 

//PdfStamper stamp = new PdfStamper(reader, new
BinaryReader("c:\\my_dir\\" + SignedPdf + "-watermarked.pdf"), '\0',
true); //Google for writing in Signed Pdf 


if (watermarkFont == null) 
{ 
watermarkFont =
iTextSharp.text.pdf.BaseFont.CreateFont(iTextSharp.text.pdf.BaseFont.HEL
VETICA, iTextSharp.text.pdf.BaseFont.CP1252,
iTextSharp.text.pdf.BaseFont.NOT_EMBEDDED); 
} 
if (watermarkFontColor == null) 
{ 
watermarkFontColor = iTextSharp.text.Color.BLUE;

} 
gstate = new iTextSharp.text.pdf.PdfGState(); 
gstate.FillOpacity = watermarkFontOpacity; 
gstate.StrokeOpacity = watermarkFontOpacity; 
pageCount = reader.NumberOfPages; 
for (int i = 1; i <= pageCount; i++) 
{ 
//underContent = stamper.GetUnderContent(1);
//If we need just one page, comment for loop and pagecount and write (1)
instead of i 
underContent = stamper.GetUnderContent(i);
//write uder the other text///GetOverContent for above the existing page

//_with1 = underContent; 
underContent.SaveState(); 
underContent.SetGState(gstate); 
underContent.SetColorFill(watermarkFontColor); 
underContent.BeginText(); 
underContent.SetFontAndSize(watermarkFont,
watermarkFontSize); 
underContent.SetTextMatrix(30, 30); 
 
underContent.ShowTextAligned(iTextSharp.text.Element.ALIGN_CENTER,
watermarkText, rect.Width / 2, rect.Height / 2, watermarkRotation); 
underContent.EndText(); 
underContent.RestoreState(); 
} 
} 
  stamper.Close(); 
reader.Close(); 
} 
catch (Exception ex) 
{ 
throw ex; 
} 
} 


 
Thanks
Kiran


--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this 

Re: [iText-questions] How to retrieve AcroFields Items in order?

2011-04-27 Thread Mark Storer
"Tab" order as listed in the Items is really just their order in the
annotation array.  It doesn't respect the /Tabs entry in the source
page[s].

The good news (such as it is) is that the annotation order is also the
Z-order.  That rarely matters... But when it does, it DOES.

Writing a Comparator that took two Items and sorted
them by tab order (and page number?) would be trivial.  A Comparator
that sorted top-to-bottom/left-to-right would be a little tougher, but
manageable.  

Sorting by Structure is relatively involved.  IIRC, you can't just sort
by MCID.  You have to traverse the structure tree, but at least you can
use the MCID to look up where to find a given Thing in that tree.  The
PDF Reference spells out how you're supposed to look up such things, in
chapter 14, sections 6 (Marked Content), 7 (Logical Structure) and 8
(Tagged PDF).  Mostly "logical structure":

http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.
pdf

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Hawk Turner [mailto:hawktur...@gmail.com] 
> Sent: Wednesday, April 27, 2011 7:42 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] How to retrieve AcroFields Items in order?
> 
> I have been searching for a way to get a list of the 
> AcroFields items from a PDF in order, either by their 
> position on the page or at least their tab order.  Since they 
> are stored and returned as a HashMap, their natural ordering 
> is not preserved.  Currently I am retrieving the fields using 
> acroForm.getFields() and then sorting them based on the field 
> name, but this causes some confusion.  I had also started 
> trying to sort by tab order but this appeared to be 
> inconsistently available.  Are there any other options?
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Editing PDF using iText. Creating new APIs

2011-04-26 Thread Mark Storer
Good hunting:

http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.
pdf

"com.itextpdf.text.pdf.parser.PdfContentStreamProcessor" would be a good
place to start, but there's still a Large amount of work ahead of you.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: Leonard Rosenthol [mailto:lrose...@adobe.com] 
> Sent: Tuesday, April 26, 2011 5:11 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Editing PDF using iText. 
> Creating new APIs
> 
> And if you REALLY insist on doing it - you will need to start 
> by reading ISO 32000 (the PDF standard) and all associated 
> material to get a DEEP DEEP understanding of PDF.   And after 
> those couple of weeks of study, you can begin to think about 
> how complex the problem is and how much work is involved...
> 
> -Original Message-
> From: 1T3XT BVBA [mailto:i...@1t3xt.info]
> Sent: Monday, April 25, 2011 11:54 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Editing PDF using iText. 
> Creating new APIs
> 
> Op 26/04/2011 8:25, Naresh Chaurasia schreef:
> > I had been given a task of doing text replacement in pdf files
> 
> Stop right there. PDF is not a format for editing.
> Ask the original source that was used to create the PDF, 
> change that source, create a new PDF.
> 
> If the PDF is a tagged PDF, you could convert the PDF to XML, 
> change the XML and then create a new PDF from that XML as is 
> done in the second edition of the book (chapter 15, the Moby 
> Dick example), but this is a dead end too: the XML doesn't 
> know anything about the style of the content.
> 
> If what you're asking for were possible, there would already 
> be a product for it. Do you know of any Adobe product that 
> can do this? If not, don't bother to start coding.
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Get Hyperlink text from PDF using c#

2011-04-26 Thread Mark Storer
Are you talking "text on the page that starts with 'http://'" or "link
annotations"?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: gayatri parthasarathy [mailto:gayatri.parthasara...@gmail.com] 
> Sent: Tuesday, April 26, 2011 5:04 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Get Hyperlink text from PDF using c#
> 
> Hi,
> 
>   Please share any code snippet for getting the hyperlink 
> text from a pdf file. i am using itextsharp library.
> 
> Thanks in advance
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] PDF/A Validation

2011-04-26 Thread Mark Storer
Okay, the PDF/A1-b scanner in Acrobat X Pro, says this in the "trigger
values" section:

XMP property is predefined but is not used in accordance with the
definition
  Trigger values
Property existints in PDF/A standard: is true
  dc:description[1]
  dc:title[1]
Predefined XMP property in PDF/A standard matches definition: is not
true
  dc:description{1]
  dc:title[1]

What exactly that means is a tad confusing.  Fortunately, I have a copy
of the PDF/A spec handy... And that wasn't much help.  Here's the
relevant raw XMP:

http://purl.org/dc/elements/1.1/";>
  application/pdf
 
QPJOBLOG
  QPJOBLOG
  Created with iText on
iSeries
 
BeppeCostagliola


Note that the subject and creator are fine... Both have containers.
"title" and "decription" are not, both contain .  I suspect
that if I were to replace "alt" with "bag" in a binary editor, it'd
pass.  Lets find out, shall we?

Nope.  That didn't help.  And I'm fresh out of ideas.  

NOTE:  I used a BINARY editor, not a text editor.  PDF is a binary
format, byte offsets count.  Text editors have a nasty habit of making
EOL characters consistent across the entire file.  When that file
contains compressed binary data, they tend to mistake some portion of
that data as EOLs and "fix" them, resulting in broken PDFs.  There are
lots of free binary editors floating around... I used "Frhed", "free hex
editor", from sourceforge just now.  It's fine, but I'm sure there are
better ones out there.

Leonard might have an idea or two, but I'm stumped.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: beppecosta [mailto:beppeco...@yahoo.it] 
> Sent: Monday, April 25, 2011 11:38 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] PDF/A Validation
> 
> http://itext-general.2136553.n4.nabble.com/file/n3474837/PDFA-
> INVALID.pdf
> PDFA-INVALID.pdf 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp
3465491p3474837.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> WhatsUp Gold - Download Free Network Management Software The 
> most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] PDF/A Validation

2011-04-22 Thread Mark Storer
A link or attachment to the list would be fine.  If it's Big, you can send it 
to my email directly.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: beppecosta [mailto:beppeco...@yahoo.it] 
Sent: Thursday, April 21, 2011 11:45 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] PDF/A Validation


Yes.
Where can I send it ?



--- Gio 21/4/11, Mark Storer-2 [via iText - General] <[hidden email]> ha 
scritto:



    Da: Mark Storer-2 [via iText - General] <[hidden email]>
Oggetto: Re: PDF/A Validation
A: "beppecosta" <[hidden email]>
Data: Giovedì 21 Aprile 2011, 20:00


How odd.  Can we see the PDF? 

--Mark Storer 
  Senior Software Engineer 
  Cardiff.com 
  
import legalese.Disclaimer; 
Disclaimer DisCard = null; 
  
  


> -Original Message- 
> From: beppecosta [mailto:[hidden email]] 
> Sent: Thursday, April 21, 2011 9:06 AM 
> To: [hidden email] 
> Subject: Re: [iText-questions] PDF/A Validation 
> 
> I tried to set the document properties before the 
> createXmpMetadata()  but the validator says that there is an 
> invalid use of XMP metadata. Without anu property set, 
> however, the document passes ok. 
> 
> -- 
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp 
<http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp?by-user=t&by-user=t>
 
3465491p3466304.html 

> Sent from the iText - General mailing list archive at Nabble.com. 
> 
> -- 
>  
> Benefiting from Server Virtualization: Beyond Initial 
> Workload Consolidation -- Increasing the use of server 
> virtualization is a top priority.Virtualization can reduce 
> costs, simplify management, and improve application 
> availability and disaster protection. Learn more about 
> boosting the value of server virtualization. 
> http://p.sf.net/sfu/vmware-sfdev2dev
> ___ 
> iText-questions mailing list 
> [hidden email] 
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA. 
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

-- 
Fulfilling the Lean Software Promise 
Lean software platforms are now widely adopted and the benefits have 
been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
___ 
iText-questions mailing list 
[hidden email] 
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA. 
Many questions posted to this list can (and will) be answered with a 
reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php





If you reply to this email, your message will be added to the 
discussion below:

http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp3465491p3466537.html
 
<http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp3465491p3466537.html?by-user=t>
  
To unsubscribe from PDF/A Validation, click here. 




View this message in context: Re: PDF/A Validation 
<http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp3465491p3467496.html>
 
Sent from the iText - General mailing list archive 
<http://itext-general.2136553.n4.nabble.com/>  at Nabble.com.


--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demon

Re: [iText-questions] PDF/A Validation

2011-04-21 Thread Mark Storer
How odd.  Can we see the PDF?

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: beppecosta [mailto:beppeco...@yahoo.it] 
> Sent: Thursday, April 21, 2011 9:06 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] PDF/A Validation
> 
> I tried to set the document properties before the 
> createXmpMetadata()  but the validator says that there is an 
> invalid use of XMP metadata. Without anu property set, 
> however, the document passes ok. 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp
3465491p3466304.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Benefiting from Server Virtualization: Beyond Initial 
> Workload Consolidation -- Increasing the use of server 
> virtualization is a top priority.Virtualization can reduce 
> costs, simplify management, and improve application 
> availability and disaster protection. Learn more about 
> boosting the value of server virtualization. 
> http://p.sf.net/sfu/vmware-sfdev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] PDF/A Validation

2011-04-21 Thread Mark Storer
Just make your doc-info changes before calling createXmpMetadata()
instead of after.  Should be fine.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: beppecosta [mailto:beppeco...@yahoo.it] 
> Sent: Thursday, April 21, 2011 8:55 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] PDF/A Validation
> 
> I don't write any property and now it seems that the 
> validation is ok. 
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp
3465491p3466276.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Benefiting from Server Virtualization: Beyond Initial 
> Workload Consolidation -- Increasing the use of server 
> virtualization is a top priority.Virtualization can reduce 
> costs, simplify management, and improve application 
> availability and disaster protection. Learn more about 
> boosting the value of server virtualization. 
> http://p.sf.net/sfu/vmware-sfdev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] PDF/A Validation

2011-04-21 Thread Mark Storer
Don't change any of the metadata fields (author, title, etc) after you
call createXmpMetadata.  Do all that beforehand.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: beppecosta [mailto:beppeco...@yahoo.it] 
> Sent: Thursday, April 21, 2011 3:15 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] PDF/A Validation
> 
> Document document = createDocument(pageSize, BACKGROUND, 
> PAGEWIDTH, PAGEHEIGHT,
>LEFTMARGIN, TOPMARGIN, 
> ORIENTATION); PdfWriter writer = 
> PdfWriter.getInstance(document, new FileOutputStream(TOPDF));
> 
> if (PDFA.equals("Y")) {
>writer.setPdfVersion(PdfWriter.PDF_VERSION_1_4);
>writer.setPDFXConformance(PdfWriter.PDFA1B);
>writer.createXmpMetadata();
> }
> ...
> ...
> document.addTitle("Created with iText on iSeries"); 
> document.addSubject(FILE); document.addKeywords(MEMBER); 
> document.addCreator("SCS2ITEXT"); 
> document.addAuthor("BeppeCostagliola");
> document.addHeader("Expires", "0");
> ...
> ...
> document.add(new Paragraph(0, line, font)); ...
> if (PDFA.equals("Y")) {
>   ICC_Profile icc = ICC_Profile.getInstance(new 
> FileInputStream("/pdf/srgb.profile"));
>   writer.setOutputIntents("CustomTNT", "", 
> "http://www.color.org";, "sRGB IEC61966-2.1", icc); }
> 
> document.close();
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/PDF-A-Validation-tp
3465491p3465549.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Benefiting from Server Virtualization: Beyond Initial 
> Workload Consolidation -- Increasing the use of server 
> virtualization is a top priority.Virtualization can reduce 
> costs, simplify management, and improve application 
> availability and disaster protection. Learn more about 
> boosting the value of server virtualization. 
> http://p.sf.net/sfu/vmware-sfdev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Editing existing PDF file - Newly added textnot visible

2011-04-20 Thread Mark Storer
PDF's Z-order is simply the order in which things are drawn.  If you
draw A then B, B is on top of A.  If B happens to completely cover A,
then you won't see A when the PDF is rendered.

You're adding a PdfImportedPage to the page after you draw your text.
Add it before instead.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 

> -Original Message-
> From: vikasgupta [mailto:vikas...@gmail.com] 
> Sent: Wednesday, April 20, 2011 7:36 AM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Editing existing PDF file - 
> Newly added textnot visible
> 
> Its true I dont know much about iText usage or how to use 
> properly as I am using it for first time. If possible can you 
> let me know where in code I am covering text that I am writing.
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Editing-existing-PD
F-file-Newly-added-text-not-visible-tp3462037p3463205.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> Benefiting from Server Virtualization: Beyond Initial 
> Workload Consolidation -- Increasing the use of server 
> virtualization is a top priority.Virtualization can reduce 
> costs, simplify management, and improve application 
> availability and disaster protection. Learn more about 
> boosting the value of server virtualization. 
> http://p.sf.net/sfu/vmware-sfdev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered 
> with a reference to the iText book: 
> http://www.itextpdf.com/book/ Please check the keywords list 
> before you ask for examples: http://itextpdf.com/themes/keywords.php
> 
> 

--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


  1   2   3   4   5   6   7   8   9   >