Re: [iText-questions] Add Text content to existing PDF

2010-02-11 Thread 1T3XT info
Frank Stephan wrote:
> Hi,
> 
> ok, than I have to use stamper.getOverContent(i) to get the DirectContent cb
> of a specific page.
> I pass the cb to my ColumnText and add the builing blocks. Right?

That's correct. There are ColumnText examples here:
http://itextpdf.com/examples/index.php?page=toc&id=3
(for documents built from scratch).

If you need an example where ColumnText is used with
existing documents, you need to look at chapters 6 to 8.
A simple example:
http://itextpdf.com/examples/index.php?page=example&id=117 (ch6)
A complex example:
http://itextpdf.com/examples/index.php?page=example&id=163 (ch8)
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

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

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


[iText-questions] [Book] FYI iText in Action 2E on 2 in MEAP Bestsellers Top 10

2010-02-11 Thread Bruno Lowagie
See http://lowagie.com/

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

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


Re: [iText-questions] [Book]

2010-02-11 Thread mkl

Bruno,


Bruno Lowagie (iText) wrote:
> You (and the other people on the mailing list) are always welcome to post
> corrections!

In that case...

Listing 8.13 Choices.java in the book, ChoiceFields.java in svn:

  new_exportvalues[n] = "JP";

should have been

  new_exportvalues[n+1] = "JP";

Regards,   Michael.
-- 
View this message in context: 
http://old.nabble.com/-Book--tp27559300p27559887.html
Sent from the iText - General mailing list archive at Nabble.com.


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

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


Re: [iText-questions] Add Text content to existing PDF

2010-02-11 Thread Frank Stephan
Hi,

ok, than I have to use stamper.getOverContent(i) to get the DirectContent cb
of a specific page.
I pass the cb to my ColumnText and add the builing blocks. Right?

Greetings
Frank

> -Ursprüngliche Nachricht-
> Von: 1T3XT info [mailto:i...@1t3xt.info] 
> Gesendet: Freitag, 12. Februar 2010 08:11
> An: Post all your questions about iText here
> Betreff: Re: [iText-questions] Add Text content to existing PDF
> 
> 
> Frank Stephan wrote:
> > Hi,
> > 
> > I want to add content to an existing pdf. I know it is 
> possible using 
> > DirectContentByte. Is it possible to add content using Phrase, 
> > Paragraph, PdfPTable, too?
> 
> That's explained in chapter 3 of the second edition of "iText in 
> Action". You need the ColumnText object to achieve this.
> 
> (Note that you can't "EDIT" a PDF document as you would do 
> with a Word 
> document; you can only add Phrases, Paragraphs, PdfPTables at 
> absolute 
> positions without changing the existing content.)
> -- 
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
> 
> --
> 
> SOLARIS 10 is the OS for Data Centers - provides features 
> such as DTrace, Predictive Self Healing and Award Winning 
> ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev
> ___
> iText-questions mailing list iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/ You can also search the 
> keywords list: http://1t3xt.info/tutorials/keywords/


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

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


Re: [iText-questions] Add Text content to existing PDF

2010-02-11 Thread 1T3XT info
Frank Stephan wrote:
> Hi,
> 
> I want to add content to an existing pdf. I know it is possible using
> DirectContentByte.
> Is it possible to add content using Phrase, Paragraph, PdfPTable, too?

That's explained in chapter 3 of the second edition of "iText in 
Action". You need the ColumnText object to achieve this.

(Note that you can't "EDIT" a PDF document as you would do with a Word 
document; you can only add Phrases, Paragraphs, PdfPTables at absolute 
positions without changing the existing content.)
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

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

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


Re: [iText-questions] Error Generated While Creating an PDF using iTextSharp

2010-02-11 Thread 1T3XT info
a...@viscus wrote:
> I m using iTextSharp 2.0 with .Net 2.0 to create PDF document.

You won't get free support for a version that old.

> But I m getting error message 
> "An error exist on this page. Acrobat may not display this page correctly.
> Please contact the person who create the PDF document to correct the
> problem." 
> http://old.nabble.com/file/p27558791/errormsg.png 

There's a bug in your code (not in iText).
More recent versions of iTextSharp throw an exception in some
of the cases that are caused by programming errors made by
developers using iText.

> Although this error is occurred only once when i open the document first
> time, then after no error message displayed on my machine. And all the
> contents are displayed correctly. But this is not the same case with other
> machine too.
> 
> Can any one help me regarding possible mistake i did while writing code for
> PDF generation 

Your mistake is probably a violation against one of the rules
explained in the PDF Reference (graphics state or text state).
We can't tell you what you're doing wrong, because you aren't
giving us more specific information.

We'd have to look at your code (but that's called "debugging"
and we don't do that for free) or at your PDF (depending on
the nature of your PDF, it could take us minutes to find what's
wrong, or hours if your PDF is too complex).
If it's only minutes, we can do it for free; if it's hours,
you should consider paid support.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

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

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


Re: [iText-questions] How do i convert a color pdf to black & white or grayscale pdf.

2010-02-11 Thread 1T3XT info

Yuttakrong Junsom wrote:

Dear Specialist iTextSharp.

 I have any problem following.
I want to convert PDF files to black and white or color is gray. 
How to do that.I'm search from Google and are not met.


With respect.


This question has already been answered.
Maybe you should read the answers before reposting the question:
http://thread.gmane.org/gmane.comp.java.lib.itext.general/49592
--
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

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

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

Re: [iText-questions] Add Footer with page number Version(5.0.1)

2010-02-11 Thread 1T3XT info
von462 wrote:
> Hi,
> 
> I am trying to replace my old code for adding footer to a page to make it
> compatible with the new version(5.0.1), which does not support HeaderFooter
> class anymore. My existing code looks like this:
> 
> HeaderFooter footer = new HeaderFooter(new Phrase("page: "), true);
> footer.setBorder(Rectangle.NO_BORDER);
> footer.setAlignment(2);
> document.setFooter(footer);

HeaderFooter hasn't been supported since 2005.
There's no mention of it in the first edition of the book.

If you look for Headers/footer on the keywords list on 1t3xt.info,
you'll find some examples: http://1t3xt.info/tutorials/keywords/
http://1t3xt.info/tutorials/keywords/?page=keyword&id=290

If you want an iText 5 example, page events are explained in
chapter 5: http://itextpdf.com/examples/index.php?page=toc&id=5
For instance: this is a "Page X of Y" example:
http://itextpdf.com/examples/index.php?page=example&id=104
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

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

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


Re: [iText-questions] [Book]

2010-02-11 Thread Bruno Lowagie
Via-Reque, Alfonso wrote:
> Regarding 2^nd  edition.
> 
> Just a brief editorial note.  On the first page of chapter 9 the sentence:
> 
> When I want to travel by train or by*** plain* …
> 
> Should read
> 
> … plane …

Oops, you're right. This will be corrected.
You (and the other people on the mailing list)
are always welcome to post corrections!
best regards,
Bruno

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

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


[iText-questions] Add Text content to existing PDF

2010-02-11 Thread Frank Stephan
Hi,

I want to add content to an existing pdf. I know it is possible using
DirectContentByte.
Is it possible to add content using Phrase, Paragraph, PdfPTable, too?

Greetings
Frank


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

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


[iText-questions] How do i convert a color pdf to black & white or grayscale pdf.

2010-02-11 Thread Yuttakrong Junsom


Dear Specialist iTextSharp.

 I have any problem following.
I want to convert PDF files to black and white or color is gray. 
How to do that.I'm search from Google and are not met.

With respect.
YJ.

  
_
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

[iText-questions] Error Generated While Creating an PDF using iTextSharp

2010-02-11 Thread a...@viscus

I m using iTextSharp 2.0 with .Net 2.0 to create PDF document. But I m
getting error message 
"An error exist on this page. Acrobat may not display this page correctly.
Please contact the person who create the PDF document to correct the
problem." 
http://old.nabble.com/file/p27558791/errormsg.png 

Although this error is occurred only once when i open the document first
time, then after no error message displayed on my machine. And all the
contents are displayed correctly. But this is not the same case with other
machine too.

Can any one help me regarding possible mistake i did while writing code for
PDF generation 
-- 
View this message in context: 
http://old.nabble.com/Error-Generated-While-Creating-an-PDF-using-iTextSharp-tp27558791p27558791.html
Sent from the iText - General mailing list archive at Nabble.com.


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

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


[iText-questions] Add Footer with page number Version(5.0.1)

2010-02-11 Thread von462

Hi,

I am trying to replace my old code for adding footer to a page to make it
compatible with the new version(5.0.1), which does not support HeaderFooter
class anymore. My existing code looks like this:

HeaderFooter footer = new HeaderFooter(new Phrase("page: "), true);
footer.setBorder(Rectangle.NO_BORDER);
footer.setAlignment(2);
document.setFooter(footer);

Thanks.
-- 
View this message in context: 
http://old.nabble.com/Add-Footer-with-page-number-Version%285.0.1%29-tp27555204p27555204.html
Sent from the iText - General mailing list archive at Nabble.com.


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

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


[iText-questions] [Book]

2010-02-11 Thread Via-Reque, Alfonso
Regarding 2nd edition.

Just a brief editorial note.  On the first page of chapter 9 the
sentence:
When I want to travel by train or by plain ...

Should read
... plane ...

Alfonso Via-Reque
Sr. Applications Developer/Analyst
3200 Highland Ave.
Downers Grove, Il 60515
630-737-5045

Data Classification: Coventry Internal Use Only



Email Confidentiality Notice: The information contained in this transmission is 
confidential, proprietary or privileged and may be subject to protection under 
the law, including the Health Insurance Portability and Accountability Act 
(HIPAA).

The message is intended for the sole use of the individual or  entity to whom 
it is addressed.  If you are not the intended recipient, you are notified that 
any use, distribution or copying of the message is strictly prohibited and may 
subject you to criminal or civil penalties.  If you received this transmission 
in error, please contact the sender immediately by replying to this email and 
delete the material from any  computer.--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] Exporting XMP XML from PDF file

2010-02-11 Thread 1T3XT info
G. Ken Holman wrote:
> Please forgive me if these are duplicate questions but I'm having 
> problems searching this mail list:
> 
>(1) - which archive of this mail list is presented well for searching?

I regularly switch between GMANE and Nabble.
They both have their strengths and weaknesses.

>(2) - I need to read the XMP XML in an existing PDF file in order to access
>  some field content I've embedded using a custom XMP schema; which
>  iText library calls will give me access to the XMP?

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

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

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


Re: [iText-questions] FW: Mail to iTextSharp

2010-02-11 Thread 1T3XT info
Leonard Rosenthol wrote:
> I am sure Bruno meant that there are no APIs in iText that would enable this 
> in an easy fashion.

That's what I meant.
I lacked the time to elaborate on the answer.
I knew that if I said "yes", I'd be asked "how?",
probably followed with the question "do you have a code sample?".
My "No, you can't!" anticipated on those questions.

> I will point out that to do this comprehensively is quite complex,

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

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

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


Re: [iText-questions] How to underline/strikethru a FREETEXT Annotation?

2010-02-11 Thread Leonard Rosenthol
For some reason I had thought that RC (RichContent, added in PDF 1.5) didn't 
work with FreeText annotations - but ISO 32000-1, 12.5.6.2 clearly states that 
it works on ANY "markup annotation".  My mistake, sorry about that.  Glad you 
caught it!

As you have seen, FoxIt is NOT a fully ISO 32000-1 compliant reader.  It does 
NOT implement the full PDF specification.  I would recommend that you contact 
them to have them add it (and perhaps the myriad of other things they don't 
support!)

Leonard

-Original Message-
From: th...@gmx.de [mailto:th...@gmx.de] 
Sent: Thursday, February 11, 2010 6:49 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] How to underline/strikethru a FREETEXT 
Annotation?

OK, I partially got it to work by using "RC":

String styles = "";
if(a.underline && !a.strikeout)
{
styles = "text-decoration:underline;";
}
else if(a.strikeout && !a.underline)
{
styles = "text-decoration:line-through;";
}
else if(a.strikeout && a.underline)
{
styles = "text-decoration:line-through underline;";
}

if (a.bold)
{
styles += "font-weight:bold;";
}
if (a.italic)
{
styles += "font-style:italic;";
}

freeText.put(PdfName.RC, new PdfString("http://www.w3.org/1999/xhtml\";
xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\";
xfa:APIVersion=\"Acrobat:8.2.0\" xfa:spec=\"2.0.2\">" + a.text +
""));

At least it works properly in Acrobat, but is totally ignored in i.e.
Foxit PDFReader (and I guess in any other PDF Reader).

So if anybody else has some more tips please tell me :)

Thanks!

2010/2/11  :
> Thanks Mark,
>
> could you maybe share some code with me please? I am rather new to iText...
>
> Thanks a lot!
>
> 2010/2/11 Mark Storer :
>> If you really want arbitrary text/font/color/etc in an annotation, you can 
>> build a PushbuttonField, use the Icon-Only style, and set that button's Icon 
>> to any ol PdfTemplate you like.
>>
>> I use that trick a lot when building forms whose appearance doesn't fit into 
>> normal AcroForms.  I draw their background into an icon-only button, then 
>> draw the data-entry portion on top (with transparent borders/background).  
>> This also lets me show-hide the entire "field", rather than just parts... 
>> without monkeying about with Optional Content Groups.
>>
>> --Mark Storer
>>  Senior Software Engineer
>>  Cardiff.com
>>
>> #include 
>> typedef std::Disclaimer DisCard;
>>
>>
>>
>>> -Original Message-
>>> From: Leonard Rosenthol [mailto:lrose...@adobe.com]
>>> Sent: Wednesday, February 10, 2010 4:03 PM
>>> To: 'Post all your questions about iText here'
>>> Subject: Re: [iText-questions] How to underline/strikethru a FREETEXT
>>> Annotation?
>>>
>>>
>>> No, it is not possible with PDF in general (has nothing to do
>>> with iText).
>>>
>>> You should consider using regular content (aka a Stamp) instead.
>>>
>>> -Original Message-
>>> From: th...@gmx.de [mailto:th...@gmx.de]
>>> Sent: Wednesday, February 10, 2010 6:21 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: [iText-questions] How to underline/strikethru a
>>> FREETEXT Annotation?
>>>
>>> I wonder if it is possible with iText to underline/strikethru
>>> a FREETEXT PdfAnnotation.
>>>
>>> My current code:
>>>
>>> PdfContentByte pcb = new PdfContentByte(writer);
>>> BaseFont font = FontFactory.getFont(BaseFont.HELVETICA, 20,
>>> Font.STRIKETHRU).getCalculatedBaseFont(false);
>>> pcb.setFontAndSize(font, 20);
>>> pcb.setColorFill(BaseColor.RED);
>>>
>>> PdfAnnotation freeText = PdfAnnotation.createFreeText(writer,
>>>                     new Rectangle(startX, startY, endX, endY),
>>>                     "My text to underline",
>>>                     pcb);
>>>
>>> writer.addAnnotation(freeText);
>>>
>>> Changing the style of the Font that I get from FontFactory
>>> only works with BOLD and ITALIC - but not for UNDERLINE or STRIKETHRU.
>>>
>>> Could anybody please help me out there? How can I add an
>>> underline for a FREETEXT Annotation (yes, it has to be an Annotation).
>>>
>>> Thank you very much!
>>> --
>>> NEU: Mit GMX DSL über 1000,- ¿ sparen!
>>> http://portal.gmx.net/de/go/dsl02
>>>
>>> --
>>> 
>>> SOLARIS 10 is the OS for Data Centers - provides features
>>> such as DTrace,
>>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>>> http://p.sf.net/sfu/solaris-dev2dev
>>> ___
>>> iText-questions mailing list
>>> iText-questions@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>
>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> Check the site with examples before you ask questions:
>> http://www.1t3xt

Re: [iText-questions] FW: Mail to iTextSharp

2010-02-11 Thread Leonard Rosenthol
I am sure Bruno meant that there are no APIs in iText that would enable this in 
an easy fashion.

It is certainly possible to use the low level object APIs in iText to find 
everything in the PDF where colors can be specified and then run the 
appropriate algorithms on them to convert them to grayscale (as there is only 
monochrome for images) and put the changed data back.

I will point out that to do this comprehensively is quite complex, especially 
when dealing with function conversion for shadings.

-Original Message-
From: Mike Marchywka [mailto:marchy...@hotmail.com] 
Sent: Thursday, February 11, 2010 7:12 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] FW: Mail to iTextSharp

> Date: Thu, 11 Feb 2010 08:25:24 +0100
> From: i...@1t3xt.info
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] FW: Mail to iTextSharp
>
> suphat phuenpha wrote:
>> If I want to convert a color PDF files to black and white or gray.
>> What can I do that ?
>
> You can't.


Isn't this just a matter of finding all the color tables or models and changing 
them to grey?
When you say can't you mean there is nothing in the API that does this in a few 
lines
or it is fundamentally impossible ( without say rendering to pixels and makes 
new PDF pages out
of color-modified pixels)?



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

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


Re: [iText-questions] How to underline/strikethru a FREETEXTAnnotation?

2010-02-11 Thread Mark Storer
Sure, it would go something like this (writing in the email off the cuff):

static int buttonCounter = 0;
public void addTemplateAsIcon( PdfStamper stamper, PdfTemplate template, 
Rectangle rect, int pageNum ) {
  PushbuttonField push = new PushbuttonField( stamper.getWriter(), rect,  
"blah" + (buttonCounter++) );

  push.setTemplate( template );
  push.setLayout( PushbuttonField.LAYOUT_ICON_ONLY ); // no caption, just the 
template
  push.setOptions( BaseField.READ_ONLY ); // it's just there to look pretty, 
not to actually be clicked

  // you might want to mess with the scaling/adjustment settings a bit
  push.setScaleIcon( PushbuttonField.SCALE_ICON_NEVER ); // don't scale the 
template to fit the button bounds
  push.setScaleIconHorizontalAdjustment( 0.5f ); // horizontal centered
  push.setScaleIconVerticalAdjustment( 0.5f ) // vertical centered

  stamper.addAnnotation( push.getField(), pageNum );
}

You'll have to fill in the template yourself.  You could use HTMLWorker to fill 
a page to a document in memory, and import it (inefficient but easy), or write 
your own text layout code.  I believe a ColumnText object can write directly to 
a PdfContentByte (or one of its descendents, like oh... say... PdfTemplate).  
That's a happy medium leaning heavily towards the "efficient" end of the 
spectrum.  Building and parsing a PDF just to import a page is a bit much in my 
mind (not that I haven't done it, and with HTMLWorker to boot).

--Mark Storer 
  Senior Software Engineer 
  Cardiff.com

#include  
typedef std::Disclaimer DisCard; 



> -Original Message-
> From: th...@gmx.de [mailto:th...@gmx.de]
> Sent: Thursday, February 11, 2010 12:56 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] How to underline/strikethru a
> FREETEXTAnnotation?
> 
> 
> Thanks Mark,
> 
> could you maybe share some code with me please? I am rather 
> new to iText...
> 
> Thanks a lot!
> 
> 2010/2/11 Mark Storer :
> > If you really want arbitrary text/font/color/etc in an 
> annotation, you can build a PushbuttonField, use the 
> Icon-Only style, and set that button's Icon to any ol 
> PdfTemplate you like.
> >
> > I use that trick a lot when building forms whose appearance 
> doesn't fit into normal AcroForms.  I draw their background 
> into an icon-only button, then draw the data-entry portion on 
> top (with transparent borders/background).  This also lets me 
> show-hide the entire "field", rather than just parts... 
> without monkeying about with Optional Content Groups.
> >
> > --Mark Storer
> >  Senior Software Engineer
> >  Cardiff.com
> >
> > #include 
> > typedef std::Disclaimer DisCard;
> >
> >
> >
> >> -Original Message-
> >> From: Leonard Rosenthol [mailto:lrose...@adobe.com]
> >> Sent: Wednesday, February 10, 2010 4:03 PM
> >> To: 'Post all your questions about iText here'
> >> Subject: Re: [iText-questions] How to underline/strikethru 
> a FREETEXT
> >> Annotation?
> >>
> >>
> >> No, it is not possible with PDF in general (has nothing to do
> >> with iText).
> >>
> >> You should consider using regular content (aka a Stamp) instead.
> >>
> >> -Original Message-
> >> From: th...@gmx.de [mailto:th...@gmx.de]
> >> Sent: Wednesday, February 10, 2010 6:21 PM
> >> To: itext-questions@lists.sourceforge.net
> >> Subject: [iText-questions] How to underline/strikethru a
> >> FREETEXT Annotation?
> >>
> >> I wonder if it is possible with iText to underline/strikethru
> >> a FREETEXT PdfAnnotation.
> >>
> >> My current code:
> >>
> >> PdfContentByte pcb = new PdfContentByte(writer);
> >> BaseFont font = FontFactory.getFont(BaseFont.HELVETICA, 20,
> >> Font.STRIKETHRU).getCalculatedBaseFont(false);
> >> pcb.setFontAndSize(font, 20);
> >> pcb.setColorFill(BaseColor.RED);
> >>
> >> PdfAnnotation freeText = PdfAnnotation.createFreeText(writer,
> >>                     new Rectangle(startX, startY, endX, endY),
> >>                     "My text to underline",
> >>                     pcb);
> >>
> >> writer.addAnnotation(freeText);
> >>
> >> Changing the style of the Font that I get from FontFactory
> >> only works with BOLD and ITALIC - but not for UNDERLINE or 
> STRIKETHRU.
> >>
> >> Could anybody please help me out there? How can I add an
> >> underline for a FREETEXT Annotation (yes, it has to be an 
> Annotation).
> >>
> >> Thank you very much!
> >> --
> >> NEU: Mit GMX DSL über 1000,- ¿ sparen!
> >> http://portal.gmx.net/de/go/dsl02
> >>
> >> --
> >> 
> >> SOLARIS 10 is the OS for Data Centers - provides features
> >> such as DTrace,
> >> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> >> http://p.sf.net/sfu/solaris-dev2dev
> >> ___
> >> iText-questions mailing list
> >> iText-questions@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/itext-questions
> >>
> >> Buy the iText book: http://www.1t3xt.com/doc

Re: [iText-questions] RTF to PDF conversion?

2010-02-11 Thread 1T3XT info
Joe Silvestro wrote:
> Does iText handle RTF to PDF conversion?

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

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

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


[iText-questions] RTF to PDF conversion?

2010-02-11 Thread Joe Silvestro
Does iText handle RTF to PDF conversion?

Joe Silvestro
joe.silves...@phaseforward.com
781-902-4946

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

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

[iText-questions] RTF to PDF?

2010-02-11 Thread Joe Silvestro
Does iText handle converting RTF file to PDF?

Joe Silvestro
joe.silves...@phaseforward.com
781-902-4946

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

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

Re: [iText-questions] Rich text fields with acro forms

2010-02-11 Thread Claus Brøndby Reimer
great thanks, i will have a look on the HtmlWorker


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

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


Re: [iText-questions] FW: Mail to iTextSharp

2010-02-11 Thread Paulo Soares
 

> -Original Message-
> From: Mike Marchywka [mailto:marchy...@hotmail.com] 
> Sent: Thursday, February 11, 2010 12:12 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] FW: Mail to iTextSharp
> 
> 
> 
> 
> 
> 
> 
> 
> 
> > Date: Thu, 11 Feb 2010 08:25:24 +0100
> > From: i...@1t3xt.info
> > To: itext-questions@lists.sourceforge.net
> > Subject: Re: [iText-questions] FW: Mail to iTextSharp
> >
> > suphat phuenpha wrote:
> >> If I want to convert a color PDF files to black and white or gray.
> >> What can I do that ?
> >
> > You can't.
> 
> 
> Isn't this just a matter of finding all the color tables or 
> models and changing them to grey?

No. There's a lot of colorspaces in a PDF and there's not a single way to 
convert from them to grey, a bit better with color profiles. Then there's the 
images that must be also converted. Then there's transparency and the several 
ways that colors can be blended that won't work the same way in grey.

> When you say can't you mean there is nothing in the API that 
> does this in a few lines

That's it.

> or it is fundamentally impossible ( without say rendering to 
> pixels and makes new PDF pages out
> of color-modified pixels)?
> 

It's possible but difficult and only commercial apps can do it. The same with 
color separations.

Paulo


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

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


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

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

Re: [iText-questions] Placing a screenAnnotation in a PdfPCell

2010-02-11 Thread Paulo Soares
PdfAnnotation videoAnnotation =
PdfAnnotation.createScreen(
cb.getPdfWriter(),
rect, 
"TEST Movies Annotation", fs,
"video/mpeg", true); 

Paulo

> -Original Message-
> From: KevinJC [mailto:endlessmin...@yahoo.com] 
> Sent: Thursday, February 11, 2010 2:36 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Placing a screenAnnotation in a PdfPCell
> 
> 
> IText version: 5.0.1
> 
> Hello All. I'm a newbie here.
> 
> I'm trying to place a screen annotation inside a PdfPCell via 
> a PdfPCellEvent as such.
> 
> 
> class VideoCellEvent implements PdfPCellEvent {
>   public void cellLayout(PdfPCell cell, Rectangle 
> rect, PdfContentByte[] canvas) {
>  logger.info("inside cellLayout");
> PdfContentByte cb = canvas[PdfPTable.TEXTCANVAS];
> PdfFileSpecification fs;
> try {
> fs = PdfFileSpecification.fileEmbedded(
> cb.getPdfWriter(),
> "../resources/movies/form.mpg", 
> "form.mpg", null
> );
> 
> PdfAnnotation videoAnnotation =
> PdfAnnotation.createScreen(
> cb.getPdfWriter(),
> new Rectangle(200f, 700f, 300f, 800f), 
> "TEST Movies Annotation", fs,
> "video/mpeg", true);
> 
> 
> cb.getPdfWriter().addAnnotation(videoAnnotation);
> 
> 
> } 
> catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> 
> 
> 
> 
>   }
> }
> 
> When the above code is executed. The annotation does play. 
> However. It shows in the middle of the page. Not at all what 
> I was expecting.
> 
> Does anyone know how to get the screen annotation inside the cell.
> 
> Thanks in advance.
> 
> 
>   
> 
> 

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.


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

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

[iText-questions] Exporting XMP XML from PDF file

2010-02-11 Thread G. Ken Holman
Please forgive me if these are duplicate questions but I'm having 
problems searching this mail list:

   (1) - which archive of this mail list is presented well for searching?

   (2) - I need to read the XMP XML in an existing PDF file in order to access
 some field content I've embedded using a custom XMP schema; which
 iText library calls will give me access to the XMP?

Thanks for your help!

. . . . . . . . . . . Ken

--
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your XML training:   http://www.CraneSoftwrights.com/z/i/
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com/z/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman mailto:gkhol...@cranesoftwrights.com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/z/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


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

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


Re: [iText-questions] FW: Mail to iTextSharp

2010-02-11 Thread Mike Marchywka








> Date: Thu, 11 Feb 2010 08:25:24 +0100
> From: i...@1t3xt.info
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] FW: Mail to iTextSharp
>
> suphat phuenpha wrote:
>> If I want to convert a color PDF files to black and white or gray.
>> What can I do that ?
>
> You can't.


Isn't this just a matter of finding all the color tables or models and changing 
them to grey?
When you say can't you mean there is nothing in the API that does this in a few 
lines
or it is fundamentally impossible ( without say rendering to pixels and makes 
new PDF pages out
of color-modified pixels)?




> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
  
_
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] How to underline/strikethru a FREETEXT Annotation?

2010-02-11 Thread thubb
OK, I partially got it to work by using "RC":

String styles = "";
if(a.underline && !a.strikeout)
{
styles = "text-decoration:underline;";
}
else if(a.strikeout && !a.underline)
{
styles = "text-decoration:line-through;";
}
else if(a.strikeout && a.underline)
{
styles = "text-decoration:line-through underline;";
}

if (a.bold)
{
styles += "font-weight:bold;";
}
if (a.italic)
{
styles += "font-style:italic;";
}

freeText.put(PdfName.RC, new PdfString("http://www.w3.org/1999/xhtml\";
xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\";
xfa:APIVersion=\"Acrobat:8.2.0\" xfa:spec=\"2.0.2\">" + a.text +
""));

At least it works properly in Acrobat, but is totally ignored in i.e.
Foxit PDFReader (and I guess in any other PDF Reader).

So if anybody else has some more tips please tell me :)

Thanks!

2010/2/11  :
> Thanks Mark,
>
> could you maybe share some code with me please? I am rather new to iText...
>
> Thanks a lot!
>
> 2010/2/11 Mark Storer :
>> If you really want arbitrary text/font/color/etc in an annotation, you can 
>> build a PushbuttonField, use the Icon-Only style, and set that button's Icon 
>> to any ol PdfTemplate you like.
>>
>> I use that trick a lot when building forms whose appearance doesn't fit into 
>> normal AcroForms.  I draw their background into an icon-only button, then 
>> draw the data-entry portion on top (with transparent borders/background).  
>> This also lets me show-hide the entire "field", rather than just parts... 
>> without monkeying about with Optional Content Groups.
>>
>> --Mark Storer
>>  Senior Software Engineer
>>  Cardiff.com
>>
>> #include 
>> typedef std::Disclaimer DisCard;
>>
>>
>>
>>> -Original Message-
>>> From: Leonard Rosenthol [mailto:lrose...@adobe.com]
>>> Sent: Wednesday, February 10, 2010 4:03 PM
>>> To: 'Post all your questions about iText here'
>>> Subject: Re: [iText-questions] How to underline/strikethru a FREETEXT
>>> Annotation?
>>>
>>>
>>> No, it is not possible with PDF in general (has nothing to do
>>> with iText).
>>>
>>> You should consider using regular content (aka a Stamp) instead.
>>>
>>> -Original Message-
>>> From: th...@gmx.de [mailto:th...@gmx.de]
>>> Sent: Wednesday, February 10, 2010 6:21 PM
>>> To: itext-questions@lists.sourceforge.net
>>> Subject: [iText-questions] How to underline/strikethru a
>>> FREETEXT Annotation?
>>>
>>> I wonder if it is possible with iText to underline/strikethru
>>> a FREETEXT PdfAnnotation.
>>>
>>> My current code:
>>>
>>> PdfContentByte pcb = new PdfContentByte(writer);
>>> BaseFont font = FontFactory.getFont(BaseFont.HELVETICA, 20,
>>> Font.STRIKETHRU).getCalculatedBaseFont(false);
>>> pcb.setFontAndSize(font, 20);
>>> pcb.setColorFill(BaseColor.RED);
>>>
>>> PdfAnnotation freeText = PdfAnnotation.createFreeText(writer,
>>>                     new Rectangle(startX, startY, endX, endY),
>>>                     "My text to underline",
>>>                     pcb);
>>>
>>> writer.addAnnotation(freeText);
>>>
>>> Changing the style of the Font that I get from FontFactory
>>> only works with BOLD and ITALIC - but not for UNDERLINE or STRIKETHRU.
>>>
>>> Could anybody please help me out there? How can I add an
>>> underline for a FREETEXT Annotation (yes, it has to be an Annotation).
>>>
>>> Thank you very much!
>>> --
>>> NEU: Mit GMX DSL über 1000,- ¿ sparen!
>>> http://portal.gmx.net/de/go/dsl02
>>>
>>> --
>>> 
>>> SOLARIS 10 is the OS for Data Centers - provides features
>>> such as DTrace,
>>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>>> http://p.sf.net/sfu/solaris-dev2dev
>>> ___
>>> iText-questions mailing list
>>> iText-questions@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>
>>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
>>
>> --
>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> http://p.sf.net/sfu/solaris-dev2dev
>> ___
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> Check the site with examples before you ask questions: 
>> http://www.1t3xt.info/examples/
>> You can also search the keywords

Re: [iText-questions] Set visible signature on multiple/all pages

2010-02-11 Thread mkl

Carles,

half a month ago you wondered


Carles Barrobés wrote:
> whether it is possible to make one signature visible on more than one
> location.

which I doubted


mkl wrote:
> Hhmmm, even though having a number of widget annotations (e.g. one per
> page) for the same signature field can be constructed, I doubt that's
> supported, especially after reading the section on signature fields in the
> specification.

but that idea remained at the back of my mind.

Thus, I now simply tried it; and indeed, at least Acrobat and Reader v9.3
seem to accept such a construct!

E.g. 
http://old.nabble.com/file/p27544126/2274_2007_H_PROVISIONAL%2B-%2Bmultifield%2B-%2BAdobe.pdf
MultiAnnotationSignature.pdf 

Regards,   Michael.
-- 
View this message in context: 
http://old.nabble.com/Set-visible-signature-on-multiple-all-pages-tp27244918p27544126.html
Sent from the iText - General mailing list archive at Nabble.com.


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

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

Re: [iText-questions] How to underline/strikethru a FREETEXT Annotation?

2010-02-11 Thread thubb
Thanks Mark,

could you maybe share some code with me please? I am rather new to iText...

Thanks a lot!

2010/2/11 Mark Storer :
> If you really want arbitrary text/font/color/etc in an annotation, you can 
> build a PushbuttonField, use the Icon-Only style, and set that button's Icon 
> to any ol PdfTemplate you like.
>
> I use that trick a lot when building forms whose appearance doesn't fit into 
> normal AcroForms.  I draw their background into an icon-only button, then 
> draw the data-entry portion on top (with transparent borders/background).  
> This also lets me show-hide the entire "field", rather than just parts... 
> without monkeying about with Optional Content Groups.
>
> --Mark Storer
>  Senior Software Engineer
>  Cardiff.com
>
> #include 
> typedef std::Disclaimer DisCard;
>
>
>
>> -Original Message-
>> From: Leonard Rosenthol [mailto:lrose...@adobe.com]
>> Sent: Wednesday, February 10, 2010 4:03 PM
>> To: 'Post all your questions about iText here'
>> Subject: Re: [iText-questions] How to underline/strikethru a FREETEXT
>> Annotation?
>>
>>
>> No, it is not possible with PDF in general (has nothing to do
>> with iText).
>>
>> You should consider using regular content (aka a Stamp) instead.
>>
>> -Original Message-
>> From: th...@gmx.de [mailto:th...@gmx.de]
>> Sent: Wednesday, February 10, 2010 6:21 PM
>> To: itext-questions@lists.sourceforge.net
>> Subject: [iText-questions] How to underline/strikethru a
>> FREETEXT Annotation?
>>
>> I wonder if it is possible with iText to underline/strikethru
>> a FREETEXT PdfAnnotation.
>>
>> My current code:
>>
>> PdfContentByte pcb = new PdfContentByte(writer);
>> BaseFont font = FontFactory.getFont(BaseFont.HELVETICA, 20,
>> Font.STRIKETHRU).getCalculatedBaseFont(false);
>> pcb.setFontAndSize(font, 20);
>> pcb.setColorFill(BaseColor.RED);
>>
>> PdfAnnotation freeText = PdfAnnotation.createFreeText(writer,
>>                     new Rectangle(startX, startY, endX, endY),
>>                     "My text to underline",
>>                     pcb);
>>
>> writer.addAnnotation(freeText);
>>
>> Changing the style of the Font that I get from FontFactory
>> only works with BOLD and ITALIC - but not for UNDERLINE or STRIKETHRU.
>>
>> Could anybody please help me out there? How can I add an
>> underline for a FREETEXT Annotation (yes, it has to be an Annotation).
>>
>> Thank you very much!
>> --
>> NEU: Mit GMX DSL über 1000,- ¿ sparen!
>> http://portal.gmx.net/de/go/dsl02
>>
>> --
>> 
>> SOLARIS 10 is the OS for Data Centers - provides features
>> such as DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> http://p.sf.net/sfu/solaris-dev2dev
>> ___
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
>
> --
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
>
>
> --
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
>

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

Buy the iText book: http://

Re: [iText-questions] How to underline/strikethru a FREETEXT Annotation?

2010-02-11 Thread thubb
Hmm strange, I can edit a freetext annotation I created with iText (no
underline!) with Acrobat and add an underline to that annotation. So
to me it seems it is not "impossible"...

2010/2/11 Leonard Rosenthol :
> No, it is not possible with PDF in general (has nothing to do with iText).
>
> You should consider using regular content (aka a Stamp) instead.
>
> -Original Message-
> From: th...@gmx.de [mailto:th...@gmx.de]
> Sent: Wednesday, February 10, 2010 6:21 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] How to underline/strikethru a FREETEXT Annotation?
>
> I wonder if it is possible with iText to underline/strikethru a FREETEXT 
> PdfAnnotation.
>
> My current code:
>
> PdfContentByte pcb = new PdfContentByte(writer);
> BaseFont font = FontFactory.getFont(BaseFont.HELVETICA, 20, 
> Font.STRIKETHRU).getCalculatedBaseFont(false);
> pcb.setFontAndSize(font, 20);
> pcb.setColorFill(BaseColor.RED);
>
> PdfAnnotation freeText = PdfAnnotation.createFreeText(writer,
>                    new Rectangle(startX, startY, endX, endY),
>                    "My text to underline",
>                    pcb);
>
> writer.addAnnotation(freeText);
>
> Changing the style of the Font that I get from FontFactory only works with 
> BOLD and ITALIC - but not for UNDERLINE or STRIKETHRU.
>
> Could anybody please help me out there? How can I add an underline for a 
> FREETEXT Annotation (yes, it has to be an Annotation).
>
> Thank you very much!
> --
> NEU: Mit GMX DSL über 1000,- ¿ sparen!
> http://portal.gmx.net/de/go/dsl02
>
> --
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
>
> --
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions: 
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
>

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

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