Re: [iText-questions] PdfTextExtractor doesn't return any text

2011-02-18 Thread Pakhu

Version 5.0.6.0 solves the problem. I've checked several files that used to
have problems with and now all of them are rendered properly


Thank you Paulo
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/PdfTextExtractor-doesn-t-return-any-text-tp3312023p3313877.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] (no subject)

2011-02-18 Thread Gerry Harris
Greetings to the list,

I'm a new user to iText and I'm trying to place a PNG picture on my
document.  I can get the image to show up where I want, but the transparency
of the image turns grey, so instead of being an image of a yield sign on a
white (or sometimes light blue) background, it's now an image of a yield
sign on a grey background on a white (or sometimes light blue) background.

I'm using VB.Net 2010 and if someone could point me to some examples
of how to properly get a transparency to show up (or not show up as it were)
I would be extremely grateful.

I've been using iText for a couple days now and I have everything
figured out, except for how to get the transparency to work.

Thanks in advance!



Gerry Harris
gsaint...@shawbiz.ca


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] ITextSharp, FDF problem.

2011-02-18 Thread Keith O


Hi,

please try what Paulo said first:

> From: psoa...@glintt.com
> To: itext-questions@lists.sourceforge.net
> Date: Fri, 18 Feb 2011 18:18:56 +
> Subject: Re: [iText-questions] ITextSharp, FDF problem.
>
> You must call pdfStamper.Close() even if you set CloseStream to false.
> There are a lot of streams floating around, I advise you to read
> HttpContext.Current.Request.InputStream to a byte[] and see what you
> got and do a pdfFlat.ToArray() to check for the flattened pdf integrity
> before further processing.
>
> Paulo

another problem, not related to iText[Sharp] is with the code you're using to 
send the email, if it's what you're really using:


> From: br...@spencehackney.com
> To: itext-questions@lists.sourceforge.net
> Date: Fri, 18 Feb 2011 12:34:17 -0500
> Subject: [iText-questions] ITextSharp, FDF problem.

> Private Sub Send(ByVal attachement As String)
    ^^

you can't pass a string when you're trying to attach a PDF and expect it to 
work. you need a Stream (the PDF),  and must pass the correct MIME type.

see here:

http://kuujinbo.info/iTextSharp/pdfSendMail.aspx

for how to attach the file properly.
  
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] more complex Clipping Path

2011-02-18 Thread Leonard Rosenthol
You can either do it as a clipping path _OR_ you can do it as a mask (soft or 
hard) using a raster image.

-Original Message-
From: amonk [mailto:krzysztof.wy...@gmail.com] 
Sent: Friday, February 18, 2011 12:02 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] more complex Clipping Path


hmm, 
I know this way, but what if ...
my clipping path look like this?
http://itext-general.2136553.n4.nabble.com/file/n3313452/clip.jpg 

I'm sure that this path can be corretly interpreted to iText drawing
(moveTo,LineTo,curveBezier.etc.) and apply clipping path.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/more-complex-Clipping-Path-tp3310866p3313452.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] PdfTextExtractor doesn't return any text

2011-02-18 Thread Paulo Soares
>
This problem only existed in iTextSharp (it's fixed now). If the problem
persists in C# or Java please post the code you are using to test.

Paulo

Paulo Soares  glintt.com> writes:

> 
> It's a bug in the toUnicode parsing. I will be fixed next week.
> 
> Paulo
> 
> 
> From: Pakhu [mailto:fpons  hotelmanagement.es]
> Sent: Friday, February 18, 2011 3:58 AM
> To: itext-questions  lists.sourceforge.net
> Subject: [iText-questions] PdfTextExtractor doesn't return any text
> 
> Some pdf files, specially those built by means of wkhtmltopdf, cannot be
readed by PdfTextExtractor. If
> using LocationTextExtractionStrategy I can get most fo the LocationalVector
except the text strings.
> Renderinfo.gettext() only gets empty strings. I 've uploaded a sample file. Is
there any workaround?
> Thanks
989-2011-02-17-REF6132738954_KAEMP-0.pdf
> 
> View this message in context: PdfTextExtractor doesn't return any
text
> Sent from the iText - General mailing list
archive at Nabble.com.
> 
> Aviso Legal:
> Esta mensagem 
> 
> --
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> 
> ___
> iText-questions mailing list
> iText-questions  lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] more complex Clipping Path

2011-02-18 Thread Mark Storer
If you have a path definition for one of those (with lines and curves
and so forth), then the process is basically the same.

OTOH, if you want varying levels of alpha, you need to use a
Transparency Group as a soft mask onto a PdfTemplate.

Chapter 10.1.4 of iText in Action 2nd edition covers it to some extent
(COMPLEX subject, says so right there).  You can use a transparency
group as a soft mask for another PdfTemplate.

Ah!  Listing 10.22.  You can dig it up online or in the book if you have
one.



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

> -Original Message-
> From: amonk [mailto:krzysztof.wy...@gmail.com] 
> Sent: Friday, February 18, 2011 12:02 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] more complex Clipping Path
> 
> 
> hmm,
> I know this way, but what if ...
> my clipping path look like this?
> http://itext-general.2136553.n4.nabble.com/file/n3313452/clip.jpg 
> 
> I'm sure that this path can be corretly interpreted to iText drawing
> (moveTo,LineTo,curveBezier.etc.) and apply clipping path.
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/more-complex-Clippi
ng-Path-tp3310866p3313452.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> The ultimate all-in-one performance toolkit: Intel(R) 
> Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] more complex Clipping Path

2011-02-18 Thread 1T3XT BVBA
Op 18/02/2011 21:01, amonk schreef:
> hmm,
> I know this way, but what if ...
> my clipping path look like this?
> http://itext-general.2136553.n4.nabble.com/file/n3313452/clip.jpg
>
> I'm sure that this path can be corretly interpreted to iText drawing
> (moveTo,LineTo,curveBezier.etc.) and apply clipping path.
I wouldn't work with a clipping path with figures like that.
I'd use an image mask.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Unsubscribe

2011-02-18 Thread 1T3XT BVBA

Op 18/02/2011 19:37, Jon Rowlan schreef:


I have tried a number of times to remove myself from this list to no 
avail.


Can a sysop please oblige.

Many thanks and all the best iText people, thanks for your help.


Either you've succeeded in unsubscribing,
or you've registered using a different e-mail address,
but I can't find a Jon.Rowlan in the list of subscribers.
The closest address I found was JonR800.
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] more complex Clipping Path

2011-02-18 Thread amonk

hmm, 
I know this way, but what if ...
my clipping path look like this?
http://itext-general.2136553.n4.nabble.com/file/n3313452/clip.jpg 

I'm sure that this path can be corretly interpreted to iText drawing
(moveTo,LineTo,curveBezier.etc.) and apply clipping path.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/more-complex-Clipping-Path-tp3310866p3313452.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] Unsubscribe

2011-02-18 Thread Jon Rowlan
I have tried a number of times to remove myself from this list to no
avail.

 

Can a sysop please oblige.

 

Many thanks and all the best iText people, thanks for your help.

 

jON



--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] decrypt pdf's

2011-02-18 Thread Mark Storer
To add a little more detail in the "modify iText" department, you'd need
to change com.itext.text.pdf.PdfReader.java, lines 768-777.
Specifically, you'd need to wrap them in a loop that could try all your
passwords and only throw if none of them worked.
 
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Stefano Pentrelli [mailto:stefano.pentre...@wavepost.it] 
Sent: Friday, February 18, 2011 7:35 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] decrypt pdf's



Dear,
I state that the company I work for bought me the book,
I need the following, I have to merge several pdf, part of which
is crypted to the metadata that indiscriminately can have a password of
4 in my possession, how can I do a test on the password without having
an exception?

Ascolta

Trascrizione fonetica

 

Dizionario - Visualizza dizionario dettagliato
 

1.interiezione 

1.hello

2.hi

3.bye

4.bye-bye

5.hallo

6.so long

7.cheerio

8.hullo

 

Stefano

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Input string was not in a correct format

2011-02-18 Thread Mark Storer
wkhtmltopdf is quite good I'm told.  It even evaluates JavaScript within
the HTML before rendering to PDF:
 
http://code.google.com/p/wkhtmltopdf/
 
No, that's not even remotely iText related.  On the other hand, it looks
like our HTML->PDF conversion will receive quite a bit of
attention/effort between now and our next release (whenever that might
be).
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Thangapandiyan Manoharan
[mailto:t.manoha...@accentra.co.in] 
Sent: Friday, February 18, 2011 12:45 AM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] Input string was not in a correct
format



Hi Yannis,

 

I have changed but it's not working.  I think, Itext is not good
enough to convert html to PDF.I need to convert client uploaded HTML
file into PDF, So in that situation I can't parse the HTML file.  If you
know any other HTML to PDF Conversion free dll. Please suggest.

 

Thanks,

Thangapandiyan.M

 

From: Iliadis Yannis [mailto:ilyan...@gmail.com] 
Sent: 17 February 2011 08:30 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Input string was not in a correct
format

 

I looked at the html source of b.html and you're using
"http://www.tandlcontracting.com\images\payillustrationheaderTLC.jpg";
as the image resource path.

The use of "\" instead of "/" may having something to do with
not being able to locate the image resource (error 404).
By parsing this URL as a string in java will also result in an
error since the backslash "\" is used for string special characters.

So try the following URL
"http://www.tandlcontracting.com/images/payillustrationheaderTLC.jpg"; it
might work.

Yannis

2011/2/17 Thangapandiyan Manoharan 

Hi,

 

Thanks for your response. I have explained my doubt below.
Please suggest.

 

 

I can't create a pdf file with the attached a.html file. The pdf
file will be empty.

 

Also , Input string was not in a correct format. Error happened
for the attached b.html file. 

 

Also,

 

The following error message happened if I have using the
following image tag. but  Src of image tag is correct. Its work If I
have changed to src as a physical path.

 

http://www.excelliumbusinesssystem.com/portal/images/ExcelliumDocLo
go.JPG" />

 

 

Error Message

The remote server returned an error: (404) Not Found.

Error Source

System

Error Stack Trace

at System.Net.HttpWebRequest.GetResponse() at
iTextSharp.text.Image.GetInstance(Uri url) at
iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
Hashtable h) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader)
at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHand
ler doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean
html) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader
reader, StyleSheet style, Hashtable interfaceProps) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader
reader, StyleSheet style) 

Error Base

System.Net.WebException: The remote server returned an error: (404) Not
Found. at System.Net.HttpWebRequest.GetResponse() at
iTextSharp.text.Image.GetInstance(Uri url) at
iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
Hashtable h) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader)
at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHand
ler doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean
html) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader
reader, StyleSheet style, Hashtable interfaceProps) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader
reader, StyleSheet style)

Error Exception

System.Net.WebException: The remote server returned an error: (404) Not
Found. at System.Net.HttpWebRequest.GetResponse() at
iTextSharp.text.Image.GetInstance(Uri url) at
iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
Hashtable h) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader)
at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHand
ler doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean
html) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader
reader, StyleSheet style, Hashtable interfaceProps) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader
reader, StyleSheet style) 

 

Thanks,

Thangapandiyan.M

 

From: Glen Hamel [mailto:glen.ha...@auricn

Re: [iText-questions] decrypt pdf's

2011-02-18 Thread Mark Storer
You don't.  You have to try each one, catch the exception, then try the
next.  iText wasn't written with attempting multiple passwords on the
same PdfReader in mind.  Yes, this means a lot of redundant IO and
computation.  Can't be avoided at this time.  If you'd like to alter
PdfReader's source so that it tries multiple passwords you provide, we'd
appreciate it if you could share your enhancement.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer DisCard = null;
 
 




From: Stefano Pentrelli [mailto:stefano.pentre...@wavepost.it] 
Sent: Friday, February 18, 2011 7:35 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] decrypt pdf's



Dear,
I state that the company I work for bought me the book,
I need the following, I have to merge several pdf, part of which
is crypted to the metadata that indiscriminately can have a password of
4 in my possession, how can I do a test on the password without having
an exception?

Ascolta

Trascrizione fonetica

 

Dizionario - Visualizza dizionario dettagliato
 

1.interiezione 

1.hello

2.hi

3.bye

4.bye-bye

5.hallo

6.so long

7.cheerio

8.hullo

 

Stefano

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] ITextSharp, FDF problem.

2011-02-18 Thread Paulo Soares
You must call pdfStamper.Close() even if you set CloseStream to false. There 
are a lot of streams floating around, I advise you to read 
HttpContext.Current.Request.InputStream to a byte[] and see what you got and do 
a pdfFlat.ToArray() to check for the flattened pdf integrity before further 
processing.

Paulo


From: Brian English [mailto:br...@spencehackney.com]
Sent: Friday, February 18, 2011 5:34 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] ITextSharp, FDF problem.

Hi,

I posted to the itextsharp mailing list and got a response that it had been 
closed, and to use the itext mailing list.  Maybe someone can help me with this?

We currently have a site which will have a pdf which will post the FDF to a 
url.  The idea is, once the FDF posts to the url, we have some asp.net (vb.net) 
code that will grab the data, flatten it and send an email to a user (basically 
send them the pdf filled in).  As of yet, I have been unable to get this to 
work.  Below is what I am currently doing (this is a variation of an example 
that we found online at:  http://asp-net-whidbey.blogspot.com/

Please note the below example is from a dotnetnuke module, however, for the 
purpose of this, you can ignore the dnn parts:

When the fdf is posted to our page, the page load will fire, and this part 
appears to be functioning correctly:

Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load
Me.lblContent.Visible = False
If String.Compare(HTTPContext.Current.Request.ContentType, 
"application/vnd.fdf", true) = 0 Then
ProcessPDF()
End If
End Sub

I may have some incorrect assumptions here.  This is my assumptions:  
pdfformfilename is the pdf file, that we flatten the data to.  I need to read 
the fdf from HTTPContext.Current.Request.InputStream.  Basically, we load the 
pdf into pdfreader.  We create pdfstamper passing in pdfreader and pdfflat.  We 
set the data by using setFields.  After this, we save the file to the server, 
create an email and set the attachment.  A corrupt pdf is being sent, so it is 
working, almost, however, I think I may have some misunderstandings on how some 
of this works.

Private Sub ProcessPDF()
Dim pdfFormFileName As String = 
HttpContext.Current.Server.MapPath("NHCS_Employment_Application_20110126_Fillable.pdf")
Dim pdfFlat As MemoryStream = New MemoryStream()
Dim pdfreader As PdfReader = New PdfReader(pdfFormFileName)
Dim pdfStamper As PdfStamper = New PdfStamper(pdfreader, pdfFlat)
Dim fdfReader As FdfReader = New 
FdfReader(HttpContext.Current.Request.InputStream)
Dim pdfForm As AcroFields = pdfStamper.AcroFields

pdfForm.SetFields(fdfReader)
pdfStamper.FormFlattening = True
pdfStamper.Writer.CloseStream = False
'pdfStamper.Close()

Dim saveTo As String = 
HttpContext.Current.Server.MapPath(String.Format("/Portals/0/{0}.pdf", 
Guid.NewGuid.ToString().Replace("-", "").Replace(" ", "")))
Dim pdfStream As MemoryStream = New MemoryStream()
Dim saveStream As FileStream = New FileStream(saveTo, 
FileMode.Create, FileAccess.Write)
pdfFlat.WriteTo(saveStream)

pdfFlat.Flush()
'ReadWriteStream(pdfStream, saveStream)
'saveStream.Flush()
saveStream.Close()
pdfFlat.Close()

Send(saveTo)
Me.lblContent.Visible = True
End Sub

Private Function LoadStream(ByVal s As Stream) As Stream
Dim target As Stream = New MemoryStream()
Dim length As Integer = 256
Dim buffer(length) As Byte
Dim bytesRead As Integer = s.Read(buffer, 0, length)
While bytesRead > 0
target.Write(buffer, 0, length)
bytesRead = s.Read(buffer, 0, length)
End While
s.Close()
Return target
End Function


Private Sub ReadWriteStream(ByRef s1 As Stream, ByRef s2 As Stream)
Dim length As Integer = 256
Dim buffer(length) As Byte
Dim bytesRead As Integer = s1.Read(buffer, 0, length)
Dim totalbytes As Integer =  0
While bytesRead > 0
s2.Write(buffer, 0, length)
totalbytes = bytesRead + totalbytes
bytesRead = s1.Read(buffer, 0, length)
End While
s1.Close()
End Sub

Private Sub Send(ByVal attachement As String)
Dim fromaddress As String = 
"br...@spencehackney.com"
Dim toaddress As String = 
"br...@spencehackney.com"
Dim bcc As String = ""
Dim subject As String = "New employment ap

Re: [iText-questions] more complex Clipping Path

2011-02-18 Thread Mark Storer
Use moveTo and lineTo to draw the star.  Clip.  Draw your picture.

Unless you use the "even-odd winding rule" clipping, you should be able
to just pick out the 5 corners of the star, close the path, and clip:

PdfContentByte cb = ...

cb.saveState();
cb.moveTo(100, 100); // top
cb.lineTo(125, 50); // bottom right
cb.lineTo(50, 75);  // left
cb.lineTo(150, 75); // right
cb.lineTo(75, 50);  // bottom left
cb.closePath(); // back to the top
cb.clip();
cb.addImage(...);
cb.restoreState();



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

> -Original Message-
> From: amonk [mailto:krzysztof.wy...@gmail.com] 
> Sent: Thursday, February 17, 2011 6:42 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] more complex Clipping Path
> 
> 
> Hi, 
> 
> I would get such an effect.
> 
> Star is a single path. 
> 
> I can export path to WMF ( I've seen, that iText has 
> interpreter Meta data for wmf),
> 
> Do you have any idea how can I achieve this?
> 
> http://itext-general.2136553.n4.nabble.com/file/n3310866/clip.jpg 
> 
> Thx.
> 
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/more-complex-Clippi
ng-Path-tp3310866p3310866.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> --
> 
> The ultimate all-in-one performance toolkit: Intel(R) 
> Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] ITextSharp, FDF problem.

2011-02-18 Thread Brian English
Hi,

 

I posted to the itextsharp mailing list and got a response that it had been
closed, and to use the itext mailing list.  Maybe someone can help me with
this?

 

We currently have a site which will have a pdf which will post the FDF to a
url.  The idea is, once the FDF posts to the url, we have some asp.net
(vb.net) code that will grab the data, flatten it and send an email to a
user (basically send them the pdf filled in).  As of yet, I have been unable
to get this to work.  Below is what I am currently doing (this is a
variation of an example that we found online at:
 http://asp-net-whidbey.blogspot.com/

 

Please note the below example is from a dotnetnuke module, however, for the
purpose of this, you can ignore the dnn parts:

 

When the fdf is posted to our page, the page load will fire, and this part
appears to be functioning correctly:

 

Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Me.lblContent.Visible = False

If
String.Compare(HTTPContext.Current.Request.ContentType,
"application/vnd.fdf", true) = 0 Then

ProcessPDF()

End If

End Sub

 

I may have some incorrect assumptions here.  This is my assumptions:
pdfformfilename is the pdf file, that we flatten the data to.  I need to
read the fdf from HTTPContext.Current.Request.InputStream.  Basically, we
load the pdf into pdfreader.  We create pdfstamper passing in pdfreader and
pdfflat.  We set the data by using setFields.  After this, we save the file
to the server, create an email and set the attachment.  A corrupt pdf is
being sent, so it is working, almost, however, I think I may have some
misunderstandings on how some of this works.

 

Private Sub ProcessPDF()

Dim pdfFormFileName As String =
HttpContext.Current.Server.MapPath("NHCS_Employment_Application_20110126_Fil
lable.pdf")

Dim pdfFlat As MemoryStream = New MemoryStream()

Dim pdfreader As PdfReader = New PdfReader(pdfFormFileName)

Dim pdfStamper As PdfStamper = New PdfStamper(pdfreader,
pdfFlat)

Dim fdfReader As FdfReader = New
FdfReader(HttpContext.Current.Request.InputStream)

Dim pdfForm As AcroFields = pdfStamper.AcroFields

 

pdfForm.SetFields(fdfReader)

pdfStamper.FormFlattening = True

pdfStamper.Writer.CloseStream = False

'pdfStamper.Close()



Dim saveTo As String =
HttpContext.Current.Server.MapPath(String.Format("/Portals/0/{0}.pdf",
Guid.NewGuid.ToString().Replace("-", "").Replace(" ", "")))

Dim pdfStream As MemoryStream = New MemoryStream()

Dim saveStream As FileStream = New FileStream(saveTo,
FileMode.Create, FileAccess.Write)

pdfFlat.WriteTo(saveStream)

 

pdfFlat.Flush()

'ReadWriteStream(pdfStream, saveStream)

'saveStream.Flush()

saveStream.Close()

pdfFlat.Close()

 

Send(saveTo)

Me.lblContent.Visible = True

End Sub

 

Private Function LoadStream(ByVal s As Stream) As Stream

Dim target As Stream = New MemoryStream()

Dim length As Integer = 256

Dim buffer(length) As Byte

Dim bytesRead As Integer = s.Read(buffer, 0, length)

While bytesRead > 0

target.Write(buffer, 0, length)

bytesRead = s.Read(buffer, 0, length)

End While

s.Close()

Return target

End Function

 

 

Private Sub ReadWriteStream(ByRef s1 As Stream, ByRef s2 As Stream)

Dim length As Integer = 256

Dim buffer(length) As Byte

Dim bytesRead As Integer = s1.Read(buffer, 0, length)

Dim totalbytes As Integer =  0

While bytesRead > 0

s2.Write(buffer, 0, length)

totalbytes = bytesRead + totalbytes

bytesRead = s1.Read(buffer, 0, length)

End While

s1.Close()

End Sub

 

Private Sub Send(ByVal attachement As String)

Dim fromaddress As String = "br...@spencehackney.com"

Dim toaddress As String = "br...@spencehackney.com"

Dim bcc As String = ""

Dim subject As String = "New employment application"

Dim body As String = "Please see the attached application"

Dim bodytype As String = "HTML"

 

Dim smtpUser As String =
Entities.Host.HostSettings.GetHostSetting("SMTPUser")

Dim smtpPassword As String =
Entities.Host.HostSettings.GetHostSetting("SMTPPassword")

Dim smtpServer As String =
Entities.Host.HostSettings.GetHostSetting("SMTPServer")

Dim smtpAuthentication As String =
Entities.Host.Ho

Re: [iText-questions] How do I change the kerning of PDFContentByte before the showText.

2011-02-18 Thread 1T3XT BVBA
Op 18/02/2011 17:00, Wyatt Biker schreef:
> Maybe I can rephrase the question.

This was already answered a couple of days ago, wasn't it?
You can create a PdfTextArray:
http://api.itextpdf.com/com/itextpdf/text/pdf/PdfTextArray.html
and then add it with showText():
http://api.itextpdf.com/com/itextpdf/text/pdf/PdfContentByte.html#showText%28com.itextpdf.text.pdf.PdfTextArray%29

This is what happens internally when kerning is applied.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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 I change the kerning of PDFContentByte before the showText.

2011-02-18 Thread Wyatt Biker
Maybe I can rephrase the question. What I would like to be able to do is
give the ability to the user to change the displayed spacing between
individual characters in the way that canvas.setCharacterSpacing(-10); does.

I figured if this method can do it, there must be some way to make another
method to add/subtract spacing between characters in position x1 and
position x2 in a text.

I don't care about modifying the font's built in kerning.




On Fri, Feb 18, 2011 at 9:47 AM, Wyatt Biker  wrote:

> The font is Times Roman.
>
> PdfContentByte canvas = stamper.getOverContent(1);
> canvas.beginText();
> ...
>
>   * *How do I do this something like * setKerning('B',
> 'C',defaultKernValue+10)* before I show the text below. Do I need to do
> something to this instead? *getKernArray(text, bf);*
>
> canvas.showTextAlignedKerned(0 "My info", 10, 20, rot);
> canvas.endText();
>
> Thanks
>
>
>
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] document.close() throwing EOFException error

2011-02-18 Thread Wesley Baker
I think my main problem is I just realized I am using iText 2.1.  Let me 
upgrade to the latest and try again with the PdfCopy and PdfStamper code.


On Feb 18, 2011, at 2:42 AM, 1T3XT BVBA wrote:

> Op 18/02/2011 3:17, Wesley Baker schreef:
>> I could not use PdfStamper to place anchors (was that correct?).
> 
> You can add all kinds of annotations using PdfStamper, including Link 
> annotations ( = anchors).
> If you want to add an Anchor object, you can do so using the ColumnText 
> object.
> For more examples, read chapters 6 and 7 of "iText in Action - Second 
> Edition".
> 
>> Now however, the following code is throwing the following error.  If I 
>> comment out the loop and only add the coverpage, I don't get the error:
> What is this line for:
>> reportPage.close();
> The EOFException tells you that you're trying to read something in one 
> of the existing pages added in the loop that is beyond the end of the 
> file. Maybe the reader no longer has access to an object that is needed.
> 
> Please provide a small standalone application with some sample PDFs so 
> that we can reproduce the problem.
> 
> --
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] How do I change the kerning of PDFContentByte before the showText.

2011-02-18 Thread Wyatt Biker
The font is Times Roman.

PdfContentByte canvas = stamper.getOverContent(1);
canvas.beginText();
...

  * *How do I do this something like * setKerning('B',
'C',defaultKernValue+10)* before I show the text below. Do I need to do
something to this instead? *getKernArray(text, bf);*

canvas.showTextAlignedKerned(0 "My info", 10, 20, rot);
canvas.endText();

Thanks
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Calculate the height of font used.

2011-02-18 Thread Wyatt Biker
Ok, so the convention they use is 2 units from the left of the bounding box.
That's good enough for me.


On Fri, Feb 18, 2011 at 2:30 AM, 1T3XT BVBA  wrote:

> Op 18/02/2011 3:27, Wyatt Biker schreef:
> > For now I noticed that Acrobat always uses 2 units as the margin
> > (aligned left of course). Would be nice if I didn't have to hardcode
> > this. I assume there is no way to get this information by some other
> > calculation?
> I'm not sure if I understand the question.
> Are you asking for a method that returns "2" when you ask for the margin?
> As far as I know these 2 units are a convention, not a value stored in
> the PDF.
>
>
> --
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> 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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

[iText-questions] Maintaining Reading order with PdfTextExtractor , iText5.0.5

2011-02-18 Thread DivyaKambhatla

Hi,

 When i extract content from a PDF using the getTextFromPage method of
the PdfTextExtractor , the content that is extracted does not have the same
order as the content in the PDF. Is there any way, (such as setting some
methods to true,perhaps?) that the reading order can be maintained when
content is extracted from a PDF?

Thanks,
Divya.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Maintaining-Reading-order-with-PdfTextExtractor-iText5-0-5-tp3312527p3312527.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] PdfTextExtractor doesn't return any text

2011-02-18 Thread Paulo Soares
It's a bug in the toUnicode parsing. I will be fixed next week.

Paulo


From: Pakhu [mailto:fp...@hotelmanagement.es]
Sent: Friday, February 18, 2011 3:58 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] PdfTextExtractor doesn't return any text

Some pdf files, specially those built by means of wkhtmltopdf, cannot be readed 
by PdfTextExtractor. If using LocationTextExtractionStrategy I can get most fo 
the LocationalVector except the text strings. Renderinfo.gettext() only gets 
empty strings. I 've uploaded a sample file. Is there any workaround? Thanks 
989-2011-02-17-REF6132738954_KAEMP-0.pdf

View this message in context: PdfTextExtractor doesn't return any 
text
Sent from the iText - General mailing list 
archive at Nabble.com.


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.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Populating Drop Down-List items in Dynamic XFA file

2011-02-18 Thread AhmadQarshi

Thanks 1T3XT for your kind response.

Please find the attached file containing the function. Hope the code would
be readable now.

http://itext-general.2136553.n4.nabble.com/file/n3312475/csharpCode.cs
csharpCode.cs 


I am extracting the XFA of a dynamic PDF form created in LiveCycle.
Adding 3 more items in the extracted XFA for the Drop-Down List or List Box.
Injecting back the XFA XML to the form.

When I save the changes and open the file in Adobe Reader it displays a
message "Please wait If this message is not eventually replaced by the
proper contents of the document,"

Thanks,

Ahmad Qarshi
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Populating-Drop-Down-List-items-in-Dynamic-XFA-file-tp3312303p3312475.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] PDFStamper consuming more memory

2011-02-18 Thread 1T3XT BVBA
Op 18/02/2011 11:11, sv_srinivaas schreef:
> Hi, I'm using iText 5.0.3 to encrypt an existing PDF (of size 10mb) using the
> PDFStamper.setEncryption() method but it takes more than 100mb of of memory.
> Basically I want the document permission to be set to PRINT only.
>
> Normally I use the RandomAccessFileOrArray for the PdfReader and PDFStamper
> with append = true to modify PDF contents so that it takes less memory. But
> in the case of encryption I can't use append=true and hence I'm forced to
> not use RandomAccessFileOrArray for my PdfReader.

That was explained on the forum a while ago: 
http://support.itextpdf.com/node/22

> Because if I use append=false and RandomAccessFileOrArray for PdfReader then
> it takes more than 5 minutes to do the encryption, whereas if I don't use
> RandomAccessFileOrArray then it consumes 100mb of memory for encrypting a
> 10mb file and 250mb for a 45mb file.
That's the trade-off you have to make, yes.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Populating Drop Down-List items in Dynamic XFA file

2011-02-18 Thread 1T3XT BVBA
Op 18/02/2011 10:39, AhmadQarshi schreef:
> Hi, I am populating Drop Down and List Box controls (where they have 
> an item with value 'CODE') in a Dynamic XFA form.
The layout of your code doesn't allow us to easily read and understand it.
Seems like you want to:
1. extract the XFA XML,
2. update the appropriate nodes,
3. put back the XFA XML.
It's not clear what goes wrong: are you saying the change you made isn't 
visible?
If so, are you sure the XFA syntax is correct.
With iText you can do 1 and 3, but whatever you do in 2 is your 
responsibility.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Split a PDF Page into header , footer and body.

2011-02-18 Thread DivyaKambhatla

Hi Mark,

 The problem with the above approach is that there is a possibility of
loss of data. For a PDF, not all pages would necessarily contain a footer.
So if a bBox is defined for one page it would necessarily not hold good for
all the pages, since the header , footer specifications for different pages
in a PDF could be different.

Thank You,
Divya.


-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Split-a-PDF-Page-into-header-footer-and-body-tp3308836p3312376.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] PDFStamper consuming more memory

2011-02-18 Thread sv_srinivaas

Hi, I'm using iText 5.0.3 to encrypt an existing PDF (of size 10mb) using the
PDFStamper.setEncryption() method but it takes more than 100mb of of memory.
Basically I want the document permission to be set to PRINT only. 

Normally I use the RandomAccessFileOrArray for the PdfReader and PDFStamper
with append = true to modify PDF contents so that it takes less memory. But
in the case of encryption I can't use append=true and hence I'm forced to
not use RandomAccessFileOrArray for my PdfReader. 

Because if I use append=false and RandomAccessFileOrArray for PdfReader then
it takes more than 5 minutes to do the encryption, whereas if I don't use
RandomAccessFileOrArray then it consumes 100mb of memory for encrypting a
10mb file and 250mb for a 45mb file. Can something be done better to reduce
the memory consumption with append=false?  Pls find my code below. 

private void encrypt(String src, String dest) {

BufferedOutputStream bos = new BufferedOutputStream(new
FileOutputStream(dest));
PdfReader reader = new PdfReader(src, null);

PdfStamper stamper = new PdfStamper(reader, bos, '\0', false);  

stamper.setEncryption(null, null, PdfWriter.ALLOW_PRINTING, 
true);

stamper.close();
reader.close();
bos.close();
}

Thanks
Srinivaas
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/PDFStamper-consuming-more-memory-tp3312356p3312356.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] merge pdf's with bookmarks

2011-02-18 Thread xi...@gmx.com


  
  
Thank you !!! I was looking with the words "merge" and "join" and I
did not found it ! I'm a iText beginner and that's my first try.

Thank you both for your answers ;)

Al 18/02/2011 09:44, En/na 1T3XT BVBA ha escrit:

  
  Op 17/02/2011 19:33, xi...@gmx.com
  schreef:
  

Hello, 

I merged 3 PDFs using iTextSharp lib, one  with bookmarks and
two without bookmarks. The result is a pdf without any bookmark.
Is that normal? 

Can I merge PDF's without lossing bookmarks?
  
  Yes, that's explained in the book, more specifically in section
  7.2.4 titled "Concatenating documents with bookmarks".
  

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
  

___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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 ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Validating the Certificate

2011-02-18 Thread 1T3XT BVBA
Op 17/02/2011 20:39, zia7770 schreef:
> I have got the above output as in Fig.1 following the steps bellow. The
> output says that "The validity of the document certification is UNKNOWN. The
> author could not be verified."
You need to add the root certificate of the CA to the Trusted Identities:
http://lowagie.com/importCAcertRoot
http://support.itextpdf.com/node/57#comment-40

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Input string was not in a correct format

2011-02-18 Thread Thangapandiyan Manoharan
Hi Yannis,

 

I have changed but it's not working.  I think, Itext is not good enough to
convert html to PDF.I need to convert client uploaded HTML file into PDF, So
in that situation I can't parse the HTML file.  If you know any other HTML
to PDF Conversion free dll. Please suggest.

 

Thanks,

Thangapandiyan.M

 

From: Iliadis Yannis [mailto:ilyan...@gmail.com] 
Sent: 17 February 2011 08:30 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Input string was not in a correct format

 

I looked at the html source of b.html and you're using
"http://www.tandlcontracting.com\images\payillustrationheaderTLC.jpg";
as the image resource path.

The use of "\" instead of "/" may having something to do with not being able
to locate the image resource (error 404).
By parsing this URL as a string in java will also result in an error since
the backslash "\" is used for string special characters.

So try the following URL
"http://www.tandlcontracting.com/images/payillustrationheaderTLC.jpg"; it
might work.

Yannis

2011/2/17 Thangapandiyan Manoharan 

Hi,

 

Thanks for your response. I have explained my doubt below. Please suggest.

 

 

I can't create a pdf file with the attached a.html file. The pdf file will
be empty.

 

Also , Input string was not in a correct format. Error happened for the
attached b.html file. 

 

Also,

 

The following error message happened if I have using the following image
tag. but  Src of image tag is correct. Its work If I have changed to src as
a physical path.

 

http://www.excelliumbusinesssystem.com/portal/images/ExcelliumDocLogo.J
PG" />

 

 


Error Message

The remote server returned an error: (404) Not Found.


Error Source

System


Error Stack Trace

at System.Net.HttpWebRequest.GetResponse() at
iTextSharp.text.Image.GetInstance(Uri url) at
iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
Hashtable h) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
StyleSheet style, Hashtable interfaceProps) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
StyleSheet style) 


Error Base

System.Net.WebException: The remote server returned an error: (404) Not
Found. at System.Net.HttpWebRequest.GetResponse() at
iTextSharp.text.Image.GetInstance(Uri url) at
iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
Hashtable h) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
StyleSheet style, Hashtable interfaceProps) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
StyleSheet style)


Error Exception

System.Net.WebException: The remote server returned an error: (404) Not
Found. at System.Net.HttpWebRequest.GetResponse() at
iTextSharp.text.Image.GetInstance(Uri url) at
iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
Hashtable h) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) at
iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
StyleSheet style, Hashtable interfaceProps) at
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
StyleSheet style) 

 

Thanks,

Thangapandiyan.M

 

From: Glen Hamel [mailto:glen.ha...@auricnet.ca] 
Sent: 17 February 2011 06:48 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] Input string was not in a correct format

 

That's not an iText problem..  

 

Check to ensure that the string version of you date time value is correct
and can be correctly converted which it obviously isn't correct or you would
be getting that error.

 

Glen Hamel
Auric Networks Canada, Inc.
570 Orwell Street, Unit 1
Mississauga, Ontario
L5A 3V7

Phone : 905.361.7621 x 2000
Fax : 905.274.3912
Email : glen.ha...@auricnet.ca  

  http://www.auricnet.ca

 

From: Thangapandiyan Manoharan [mailto:t.manoha...@accentra.co.in] 
Sent: Thursday, February 17, 2011 7:06 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Input string was not in a correct format

 

Hi ,

 

I am getting the following error. Can you please help me.

 

System.FormatException was unhandled by user code

  Message="Input string was not in a correct format."

  Source="mscorlib"

  StackTrace:

   at System.Number.StringToNumber(String str, NumberStyl

Re: [iText-questions] merge pdf's with bookmarks

2011-02-18 Thread 1T3XT BVBA

Op 17/02/2011 19:33, xi...@gmx.com schreef:

Hello,

I merged 3 PDFs using iTextSharp lib, one  with bookmarks and two 
without bookmarks. The result is a pdf without any bookmark. Is that 
normal?


Can I merge PDF's without lossing bookmarks?
Yes, that's explained in the book, more specifically in section 7.2.4 
titled "Concatenating documents with bookmarks".
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] document.close() throwing EOFException error

2011-02-18 Thread 1T3XT BVBA
Op 18/02/2011 3:17, Wesley Baker schreef:
> I could not use PdfStamper to place anchors (was that correct?).

You can add all kinds of annotations using PdfStamper, including Link 
annotations ( = anchors).
If you want to add an Anchor object, you can do so using the ColumnText 
object.
For more examples, read chapters 6 and 7 of "iText in Action - Second 
Edition".

> Now however, the following code is throwing the following error.  If I 
> comment out the loop and only add the coverpage, I don't get the error:
What is this line for:
>  reportPage.close();
The EOFException tells you that you're trying to read something in one 
of the existing pages added in the loop that is beyond the end of the 
file. Maybe the reader no longer has access to an object that is needed.

Please provide a small standalone application with some sample PDFs so 
that we can reproduce the problem.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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] Split a PDF Page into header , footer and body.

2011-02-18 Thread DivyaKambhatla

Hmm..I had thought about this too and this would definetly work if i were
working with a single PDF for which i could probably define the bounding
box..but the point is that i would be dealing with a slew of PDFs , which
would be downloaded and read by my application at runtime. So i am not sure
if the bounding box strategy would work for this scenario since different
PDFs may require different co-ordinates to be specified. 
However, i will definetly give this a try and check.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Split-a-PDF-Page-into-header-footer-and-body-tp3308836p3312211.html
Sent from the iText - General mailing list archive at Nabble.com.

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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