Re: [iText-questions] Some Hidden Text in PDF file

2011-12-21 Thread iText Info
Op 21/12/2011 1:09, Ali Vajahat schreef:
 I have attached a pdf . If you notice on the page than you come to 
 know that there are some hidden texts above the image that we can 
 select using text selection.

What makes you think the text is above the image. The text could as well 
be covered by the image.

 I want to know what type of text is this? I want to make it visible ? How?

Use iText PDF parser. This is explained in chapter 15 (section 3).
Or: if you only want a quick look (without programming) use iText RUPS.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] iTextSharp XMLWorker custom pipeline isn't rendering HTML tags

2011-12-21 Thread Andrew E
Hi,

I'm using iTextSharp to build a PDF from XHTML data, and I'm having trouble
getting some of the default HTML tags to render properly.  I originally used
the ParseXHtml method to build the PDF, and that works fine.  I needed to
set a relative URL location for my images, so I created a custom pipeline to
do it.  While the images render correctly, some tags, such as b and i, do
not.  Am I doing something wrong setting the tag factory?  Here's the code
I'm currently using.

MemoryStream memStream = new MemoryStream();

StringReader xmlString = new StringReader(outXml);

using (Document document = new Document())
{
   PdfWriter writer = PdfWriter.GetInstance(document, memStream);
   document.SetPageSize(iTextSharp.text.PageSize.A4.Rotate());
   document.Open();

   CssFilesImpl cssFiles = new CssFilesImpl();
   cssFiles.Add(XMLWorkerHelper.GetInstance().GetDefaultCSS());
   StyleAttrCSSResolver cssRevolver = new StyleAttrCSSResolver();

   HtmlPipelineContext htmlContext = new HtmlPipelineContext();
   htmlContext.SetTagFactory(Tags.GetHtmlTagProcessorFactory());

   htmlContext.SetImageProvider(new MyImageProvider(imagePath));

   IPipeline pipeline = new CssResolverPipeline(cssRevolver, new
HtmlPipeline(htmlContext, new PdfWriterPipeline(document, writer)));
   XMLWorker worker = new XMLWorker(pipeline, true);
   XMLParser p = new XMLParser(worker);
   p.Parse(xmlString);

   document.Close();
}

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/iTextSharp-XMLWorker-custom-pipeline-isn-t-rendering-HTML-tags-tp4218390p4218390.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] page numbers in footer

2011-12-21 Thread iText Info
Op 20/12/2011 22:47, Aarthi schreef:
 Hi,
 I have an issue with displaying the page number in the PDF. My requirement
 is to display page number like
 Page 1 of 20 and so on...
 I have used the inner class explained in chapter05, but removed the code
 that i dont want.

Er... did you read the chapter?
I guess not, because otherwise you wouldn't have removed code that is 
absolutely necessary.
Please don't use code without reading the documentation!

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] page numbers in footer

2011-12-21 Thread aszomor
The iTextInAction2Ed\Chapter05\MovieCountries1.cs just 134 line, but  
known the answer!




--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread Mathias Tausig
Hello!

I want to parse a signed PDF document and in read the embedded OCSP
responses (among others).
Is there some documentation or code example for that flying around the
web? I could only find samples for the other direction (signing a
document and embedding an OCSP response).

regards
Mathias



smime.p7s
Description: S/MIME Cryptographic Signature
--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread Leonard Rosenthol
You wouldn't necessary embed an OCSP response into a signed PDF.   What
makes you think they would be?

On 12/21/11 9:29 AM, Mathias Tausig mathias.tau...@a-cert.at wrote:

Hello!

I want to parse a signed PDF document and in read the embedded OCSP
responses (among others).
Is there some documentation or code example for that flying around the
web? I could only find samples for the other direction (signing a
document and embedding an OCSP response).

regards
Mathias



--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] Holiday Greetings..

2011-12-21 Thread Glen Hamel
I wish to express to all a Season's Greetings and a Happy New Year!!

 

 

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 :  mailto:pe...@auricnet.ca glen.ha...@auricnet.ca

 http://www.auricnet.ca/ http://www.auricnet.ca

 

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread Chris MacKenzie
The PDF spec supports embedding a signed OCSP Response as part of a PKCS7 
signature. Embedding a signed OCSP Response allows a signature to be 
self-describing with respect to validation (i.e., Acrobat can validate the 
signature without performing its own OCSP check...therefore you don't even need 
to be connected to assert the signature).

regards.

chris

Message: 6
Date: Wed, 21 Dec 2011 07:20:23 -0800
From: Leonard Rosenthol lrose...@adobe.com
Subject: Re: [iText-questions] Readin OCSP Responses from a signed PDF
To: Post here itext-questions@lists.sourceforge.net
Message-ID: cb17634e.13462%lrose...@adobe.com
Content-Type: text/plain; charset=us-ascii

You wouldn't necessary embed an OCSP response into a signed PDF.   What
makes you think they would be?

On 12/21/11 9:29 AM, Mathias Tausig mathias.tau...@a-cert.at wrote:

 Hello!
 
 I want to parse a signed PDF document and in read the embedded OCSP
 responses (among others).
 Is there some documentation or code example for that flying around the
 web? I could only find samples for the other direction (signing a
 document and embedding an OCSP response).
 
 regards
 Mathias





--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

[iText-questions] New Book about PDF

2011-12-21 Thread iText Info
I didn't read it yet, nor do I know the author, but at first sight, it 
looks interesting: http://lowagie.com/pdfexplained

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread Leonard Rosenthol
Not as part of the signature ā€“ but as part of the LTV block.

Leonard

From: Chris MacKenzie c...@mackenz.commailto:c...@mackenz.com
Reply-To: Post here 
itext-questions@lists.sourceforge.netmailto:itext-questions@lists.sourceforge.net
Date: Wed, 21 Dec 2011 07:36:51 -0800
To: Post here 
itext-questions@lists.sourceforge.netmailto:itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Readin OCSP Responses from a signed PDF

The PDF spec supports embedding a signed OCSP Response as part of a PKCS7 
signature. Embedding a signed OCSP Response allows a signature to be 
self-describing with respect to validation (i.e., Acrobat can validate the 
signature without performing its own OCSP check...therefore you don't even need 
to be connected to assert the signature).

regards.

chris

Message: 6
Date: Wed, 21 Dec 2011 07:20:23 -0800
From: Leonard Rosenthol lrose...@adobe.commailto:lrose...@adobe.com
Subject: Re: [iText-questions] Readin OCSP Responses from a signed PDF
To: Post here 
itext-questions@lists.sourceforge.netmailto:itext-questions@lists.sourceforge.net
Message-ID: 
cb17634e.13462%lrose...@adobe.commailto:cb17634e.13462%lrose...@adobe.com
Content-Type: text/plain; charset=us-ascii

You wouldn't necessary embed an OCSP response into a signed PDF.   What
makes you think they would be?

On 12/21/11 9:29 AM, Mathias Tausig 
mathias.tau...@a-cert.atmailto:mathias.tau...@a-cert.at wrote:

Hello!

I want to parse a signed PDF document and in read the embedded OCSP
responses (among others).
Is there some documentation or code example for that flying around the
web? I could only find samples for the other direction (signing a
document and embedding an OCSP response).

regards
Mathias





--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread mkl
Chris, Leonard,

Leonard Rosenthol-3 wrote
 
 Not as part of the signature ā€“ but as part of the LTV block.
 
 From: Chris MacKenzie lt;ccm@lt;mailto:ccm@gt;
 
 The PDF spec supports embedding a signed OCSP Response as part of a PKCS7
 signature. Embedding a signed OCSP Response allows a signature to be
 self-describing with respect to validation (i.e., Acrobat can validate the
 signature without performing its own OCSP check...therefore you don't even
 need to be connected to assert the signature).

As far as ISO 32000-1 is concerned, Chris is right. The signature container
even SHOULD contain revocation information as a signed attribute. Actually
the PAdES profile for CMS signatures also recommends this (clause 5.1 e).

On the other hand hardly any signing software does this.

Therefore, a more useful approach indeed would be to look for PAdES LTV
style revocation information as this kind of information can later be added
using software independent from the original signing software; it can also
be updated again and again for long term validation use.

Currently verification taking PAdES style information into account is being
developed. Thus, with the code available right now you can access the
information only using the low level iText API.

Regards,   Michael

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Readin-OCSP-Responses-from-a-signed-PDF-tp4221976p4222187.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread Paulo Soares
See http://itextpdf.sourceforge.net/howtosign.html#howtoverify.

Paulo
  - Original Message - 
  From: Mathias Tausig 
  To: itext-questions@lists.sourceforge.net 
  Sent: Wednesday, December 21, 2011 2:29 PM
  Subject: [iText-questions] Readin OCSP Responses from a signed PDF


  Hello!

  I want to parse a signed PDF document and in read the embedded OCSP
  responses (among others).
  Is there some documentation or code example for that flying around the
  web? I could only find samples for the other direction (signing a
  document and embedding an OCSP response).

  regards
  Mathias

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] New Book about PDF

2011-12-21 Thread Leonard Rosenthol
Purchased the Kindle edition.  Read the first 10 pages and found SO MANY
ERRORS (technical, historical, etc.) that I can't finish as it just makes
me sick :(.

Please DO NOT purchase this book!!

I am trying to have it removed from publication - it is just THAT BAD!!

Leonard


On 12/21/11 10:39 AM, iText Info i...@1t3xt.info wrote:

I didn't read it yet, nor do I know the author, but at first sight, it
looks interesting: http://lowagie.com/pdfexplained

--

Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] Readin OCSP Responses from a signed PDF

2011-12-21 Thread mkl

Paulo Soares-3 wrote
 See http://itextpdf.sourceforge.net/howtosign.html#howtoverify.

Oops, I'm really not up-to-date concerning the PdfPKCS7 code development...
;)

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Readin-OCSP-Responses-from-a-signed-PDF-tp4221976p461.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] New Book about PDF

2011-12-21 Thread Bruno Lowagie
On 21/12/2011 17:12, Leonard Rosenthol wrote:
 Please DO NOT purchase this book!!
OK, I'm removing the links from the iText site.
We could use a good book that introduces the PDF specs though.
best regards,
Bruno

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] New Book about PDF

2011-12-21 Thread Leonard Rosenthol
Agreed.

I am talking to O'Reilly about how we could make that happen.

Leonard


On 12/21/11 12:09 PM, Bruno Lowagie br...@lowagie.com wrote:

On 21/12/2011 17:12, Leonard Rosenthol wrote:
 Please DO NOT purchase this book!!
OK, I'm removing the links from the iText site.
We could use a good book that introduces the PDF specs though.
best regards,
Bruno

--

Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


[iText-questions] Error Converting fax TIF to PDF

2011-12-21 Thread Hugh McLaughlin
Hello Everyone and thanks for your help in advance.  I am working on an
application that watches for incoming faxes on Microsoft fax (Windows
2003 server).  The inbound fax is written to a folder and I am using the
FileSystemWatcher to watch for newly written TIF files to convert to
PDF.  From there, I am using iTextSharp to convert the files.  The
process has been working well for the past few days, but I have now run
into the following messages on a couple of conversions:

 

J:\Faxes\Fax0174.TIF~RF29ca9f3a.TMP caused the error: 

 

System.IO.EndOfStreamException: Attempted to read past the end of the
stream. at
iTextSharp.text.pdf.RandomAccessFileOrArray.ReadUnsignedShort() at
iTextSharp.text.pdf.codec.TIFFDirectory.GetNumDirectories(RandomAccessFi
leOrArray stream) at
iTextSharp.text.pdf.codec.TiffImage.GetNumberOfPages(RandomAccessFileOrA
rray s) at Fax_Factory.Form1.ConvertFaxtoPDF(String SourceFile)

 

I'm not exactly sure what this is trying to tell me.  I have logic in
the conversion to check for end of file.  Any help would be greatly
appreciated.

 

Thanks

 

 

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] Error Converting fax TIF to PDF

2011-12-21 Thread Paulo Soares
Looks like a broken tiff. It may be an yet unknown bug but I would have to see 
the tiff.

Paulo
  - Original Message - 
  From: Hugh McLaughlin 
  To: itext-questions@lists.sourceforge.net 
  Sent: Wednesday, December 21, 2011 5:56 PM
  Subject: [iText-questions] Error Converting fax TIF to PDF


  Hello Everyone and thanks for your help in advance.  I am working on an 
application that watches for incoming faxes on Microsoft fax (Windows 2003 
server).  The inbound fax is written to a folder and I am using the 
FileSystemWatcher to watch for newly written TIF files to convert to PDF.  From 
there, I am using iTextSharp to convert the files.  The process has been 
working well for the past few days, but I have now run into the following 
messages on a couple of conversions:

   

  J:\Faxes\Fax0174.TIF~RF29ca9f3a.TMP caused the error: 

   

  System.IO.EndOfStreamException: Attempted to read past the end of the stream. 
at iTextSharp.text.pdf.RandomAccessFileOrArray.ReadUnsignedShort() at 
iTextSharp.text.pdf.codec.TIFFDirectory.GetNumDirectories(RandomAccessFileOrArray
 stream) at 
iTextSharp.text.pdf.codec.TiffImage.GetNumberOfPages(RandomAccessFileOrArray s) 
at Fax_Factory.Form1.ConvertFaxtoPDF(String SourceFile)

   

  Iā€™m not exactly sure what this is trying to tell me.  I have logic in the 
conversion to check for end of file.  Any help would be greatly appreciated.

   

  Thanks

   

   
--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] page numbers in footer

2011-12-21 Thread Aarthi
Now im able to get the page 1 of 10 I want to get this displayed in the
bottom of the page. I get it displayed in the header. I want them it the
bottom right corner. below is my onEndPage(). any help is appreciated.

public void onEndPage(PdfWriter writer, Document document) {
PdfPTable table = new PdfPTable(2);
try {

table.setWidths(new int[]{48, 2});
table.setTotalWidth(527);
table.setLockedWidth(true);
   
table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
table.getDefaultCell().setBorder(Rectangle.NO_BORDER);
PdfPCell c1 = new PdfPCell(new Phrase(String.format(Page %d
of, writer.getPageNumber()), subFontValue));
c1.setHorizontalAlignment(Element.ALIGN_RIGHT);
c1.setBorder(0);
table.addCell(c1);
c1 = new PdfPCell(Image.getInstance(total));
c1.setBorder(0);
table.addCell(c1);
table.writeSelectedRows(0, -1, 34, 803,
writer.getDirectContent());
}
catch(DocumentException de) {
throw new ExceptionConverter(de);
}
}

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/page-numbers-in-footer-tp4219499p4222862.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] page numbers in footer

2011-12-21 Thread 1T3XT BVBA
On 21/12/2011 20:04, Aarthi wrote:
 Now im able to get the page 1 of 10 I want to get this displayed in the
 bottom of the page. I get it displayed in the header. I want them it the
 bottom right corner. below is my onEndPage(). any help is appreciated.
That is explained in the book from which you took the example.
You can find an example on p 117-118 where a table is added at an 18pt 
distance of the bottom of the page.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] page numbers in footer

2011-12-21 Thread Aarthi
It would be great if you could post the pseudo code here.
I dont see the pages that you are talking about.

On Wed, Dec 21, 2011 at 2:19 PM, 1T3XT BVBA [via iText - General] 
ml-node+s2136553n4222902...@n4.nabble.com wrote:

 On 21/12/2011 20:04, Aarthi wrote:
  Now im able to get the page 1 of 10 I want to get this displayed
 in the
  bottom of the page. I get it displayed in the header. I want them it the
  bottom right corner. below is my onEndPage(). any help is appreciated.
 That is explained in the book from which you took the example.
 You can find an example on p 117-118 where a table is added at an 18pt
 distance of the bottom of the page.

 --

 Write once. Port to many.
 Get the SDK and tools to simplify cross-platform app development. Create
 new or port existing apps to sell to consumers worldwide. Explore the
 Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
 http://p.sf.net/sfu/intel-appdev
 ___
 iText-questions mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4222902i=0
 https://lists.sourceforge.net/lists/listinfo/itext-questions

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


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://itext-general.2136553.n4.nabble.com/page-numbers-in-footer-tp4219499p4222902.html
  To unsubscribe from page numbers in footer, click 
 herehttp://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4219499code=YWFydGhpLmFhckBnbWFpbC5jb218NDIxOTQ5OXwtMTc4OTcyNTM3Mg==
 .
 NAMLhttp://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespacebreadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml




-- 
Thanks  Regards,
Aarthi M


--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/page-numbers-in-footer-tp4219499p4222911.html
Sent from the iText - General mailing list archive at Nabble.com.--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] page numbers in footer

2011-12-21 Thread 1T3XT BVBA
On 21/12/2011 20:23, Aarthi wrote:
 I dont see the pages that you are talking about.
Huh? Which book are you using?

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] Error Converting fax TIF to PDF

2011-12-21 Thread Hugh McLaughlin
The TIF opens fine in a viewer.  How can you tell if a TIF is broken?

 

From: Paulo Soares [mailto:psoa...@glintt.com] 
Sent: Wednesday, December 21, 2011 1:13 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Error Converting fax TIF to PDF

 

Looks like a broken tiff. It may be an yet unknown bug but I would have
to see the tiff.

 

Paulo

- Original Message - 

From: Hugh McLaughlin mailto:h...@kmcnetwork.com  

To: itext-questions@lists.sourceforge.net 

Sent: Wednesday, December 21, 2011 5:56 PM

Subject: [iText-questions] Error Converting fax TIF to PDF

 

Hello Everyone and thanks for your help in advance.  I am
working on an application that watches for incoming faxes on Microsoft
fax (Windows 2003 server).  The inbound fax is written to a folder and I
am using the FileSystemWatcher to watch for newly written TIF files to
convert to PDF.  From there, I am using iTextSharp to convert the files.
The process has been working well for the past few days, but I have now
run into the following messages on a couple of conversions:

 

J:\Faxes\Fax0174.TIF~RF29ca9f3a.TMP caused the error: 

 

System.IO.EndOfStreamException: Attempted to read past the end
of the stream. at
iTextSharp.text.pdf.RandomAccessFileOrArray.ReadUnsignedShort() at
iTextSharp.text.pdf.codec.TIFFDirectory.GetNumDirectories(RandomAccessFi
leOrArray stream) at
iTextSharp.text.pdf.codec.TiffImage.GetNumberOfPages(RandomAccessFileOrA
rray s) at Fax_Factory.Form1.ConvertFaxtoPDF(String SourceFile)

 

I'm not exactly sure what this is trying to tell me.  I have
logic in the conversion to check for end of file.  Any help would be
greatly appreciated.

 

Thanks

 

 

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] page numbers in footer

2011-12-21 Thread Aarthi
I am just getting online help. google and found an example.

On Wed, Dec 21, 2011 at 3:33 PM, 1T3XT BVBA [via iText - General] 
ml-node+s2136553n4223084...@n4.nabble.com wrote:

 On 21/12/2011 20:23, Aarthi wrote:
  I dont see the pages that you are talking about.
 Huh? Which book are you using?

 --

 Write once. Port to many.
 Get the SDK and tools to simplify cross-platform app development. Create
 new or port existing apps to sell to consumers worldwide. Explore the
 Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
 http://p.sf.net/sfu/intel-appdev
 ___
 iText-questions mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4223084i=0
 https://lists.sourceforge.net/lists/listinfo/itext-questions

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


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://itext-general.2136553.n4.nabble.com/page-numbers-in-footer-tp4219499p4223084.html
  To unsubscribe from page numbers in footer, click 
 herehttp://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4219499code=YWFydGhpLmFhckBnbWFpbC5jb218NDIxOTQ5OXwtMTc4OTcyNTM3Mg==
 .
 NAMLhttp://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespacebreadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml




-- 
Thanks  Regards,
Aarthi M


--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/page-numbers-in-footer-tp4219499p4223146.html
Sent from the iText - General mailing list archive at Nabble.com.--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Re: [iText-questions] page numbers in footer

2011-12-21 Thread 1T3XT BVBA
On 21/12/2011 21:48, Aarthi wrote:
 I am just getting online help. google and found an example.
Yes, you should really stop taking advantage of other people.
Start reading the book yourself if you care about your employer/customer.
I hope you don't mind getting good advice, but educating yourself is 
also good for your self-respect.

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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


Re: [iText-questions] iTextSharp XMLWorker custom pipeline isn't rendering HTML tags

2011-12-21 Thread Balder VC

Hi Andrew

You are not putting the CssFiles in the cssResolver, without the default 
css file the XMLWorker does not know how to style a lot of tags.

replace

StyleAttrCSSResolver cssRevolver = new StyleAttrCSSResolver();

with

StyleAttrCSSResolver cssRevolver = new StyleAttrCSSResolver(cssFiles);



( Note I compared with Java code, I don't know Sharp code; i don't have 
an environment to run it either, I would most likely understand it though )

Please subscribe to the mailing list for decent follow ups.



On 20/12/2011 17:20, Andrew E wrote:

Hi,

I'm using iTextSharp to build a PDF from XHTML data, and I'm having trouble
getting some of the default HTML tags to render properly.  I originally used
the ParseXHtml method to build the PDF, and that works fine.  I needed to
set a relative URL location for my images, so I created a custom pipeline to
do it.  While the images render correctly, some tags, such as b and i, do
not.  Am I doing something wrong setting the tag factory?  Here's the code
I'm currently using.

MemoryStream memStream = new MemoryStream();

StringReader xmlString = new StringReader(outXml);

using (Document document = new Document())
{
PdfWriter writer = PdfWriter.GetInstance(document, memStream);
document.SetPageSize(iTextSharp.text.PageSize.A4.Rotate());
document.Open();

CssFilesImpl cssFiles = new CssFilesImpl();
cssFiles.Add(XMLWorkerHelper.GetInstance().GetDefaultCSS());
StyleAttrCSSResolver cssRevolver = new StyleAttrCSSResolver();

HtmlPipelineContext htmlContext = new HtmlPipelineContext();
htmlContext.SetTagFactory(Tags.GetHtmlTagProcessorFactory());

htmlContext.SetImageProvider(new MyImageProvider(imagePath));

IPipeline pipeline = new CssResolverPipeline(cssRevolver, new
HtmlPipeline(htmlContext, new PdfWriterPipeline(document, writer)));
XMLWorker worker = new XMLWorker(pipeline, true);
XMLParser p = new XMLParser(worker);
p.Parse(xmlString);

document.Close();
}





Kind regards

Balder
--
twitter http://twitter.com/redlabbe
redlab-log http://www.redlab.be/blog/
--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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