<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-4189</id>
	<title>Nabble - itextsharp-questions</title>
	<updated>2009-12-15T03:11:41Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/itextsharp-questions-f4189.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/itextsharp-questions-f4189.html" />
	<subtitle type="html">Mailing list archive for itextsharp-questions</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26793106</id>
	<title>Unicode - Tamil Font pblm</title>
	<published>2009-12-15T03:11:41Z</published>
	<updated>2009-12-15T03:11:41Z</updated>
	<author>
		<name>msaranya</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;This is how I have declared my tamil unicode font
&lt;br&gt;Dim bflatha As BaseFont = BaseFont.CreateFont(&amp;quot;C:\WINDOWS\Fonts\latha.ttf&amp;quot;, BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
&lt;br&gt;&lt;br&gt;Dim Font As Font = New Font(bflatha, 6.7)
&lt;br&gt;&lt;br&gt;dim ph as phrase = New Phrase(&amp;quot;வாக்காளர் பெயர் : &amp;quot;, font)
&lt;br&gt;&lt;br&gt;If I add this phrase to my document, the letters in &amp;quot; பெ &amp;quot; gets interchanged. Further &amp;quot;Thu&amp;quot; letter gets displayed wrongly.
&lt;br&gt;&lt;br&gt;If I copy the same text from PDF and put it into some word file, it gets displayed correctly.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Can anyone help me with this?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unicode---Tamil-Font-pblm-tp26793106p26793106.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26770236</id>
	<title>Fill PDF form fields and add table</title>
	<published>2009-12-13T14:09:59Z</published>
	<updated>2009-12-13T14:09:59Z</updated>
	<author>
		<name>poldek</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I would like to:
&lt;br&gt;&lt;br&gt;1. Take a PDF template and fill form fields
&lt;br&gt;&lt;br&gt;2. Add a table (with producst from DB) to the same document
&lt;br&gt;&lt;br&gt;Which is the right approach?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Fill-PDF-form-fields-and-add-table-tp26770236p26770236.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26529855</id>
	<title>submit form data when the form  close(Very Urgent)</title>
	<published>2009-11-26T06:01:59Z</published>
	<updated>2009-11-26T06:01:59Z</updated>
	<author>
		<name>Anjana</name>
	</author>
	<content type="html">Hello
&lt;br&gt;&lt;br&gt;&lt;br&gt;I am showing PDF form in window browser, and to submit form data on form close I added a javascript on Document close event of pdfwriter as below.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stamp.Writer.SetAdditionalAction(PdfWriter.DOCUMENT_CLOSE, PdfAction.JavaScript(&amp;quot;this.submitForm({cURL:'&amp;quot; + GetAbsolutePath() + &amp;quot;TestSubmitedData.aspx'});\r&amp;quot;, stamp.Writer));
&lt;br&gt;&lt;br&gt;it's working fine with IE8 and adobe reader 8.0, but not working in Adobe reader 9.0 and above version
&lt;br&gt;Does anyone have any advice to submit form data when the form is close. &amp;nbsp;Is this possible? &amp;nbsp;How?
&lt;br&gt;&lt;br&gt;Thanks in advance
&lt;br&gt;&lt;br&gt;&lt;br&gt;Anjana
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/submit-form-data-when-the-form--close%28Very-Urgent%29-tp26529855p26529855.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26476348</id>
	<title>How can I write Flash graph in PDF file using iTextSharp?</title>
	<published>2009-11-23T03:30:55Z</published>
	<updated>2009-11-23T03:30:55Z</updated>
	<author>
		<name>Ambarish</name>
	</author>
	<content type="html">Hi Guys,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I have a aspx page, where i generated a graph using flash. I want to generate the graph in PDF file (Using iTextSharp) that exactly shown in my page. Means, i want to write the Flash graph of web page in my PDF document.
&lt;br&gt;&lt;br&gt;How can i do this? Have any function of iTextSharp, that will generate PDF from flash object?
&lt;br&gt;&lt;br&gt;Please suggest me the probable solution....
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Ambarish Jana</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-can-I-write-Flash-graph-in-PDF-file-using-iTextSharp--tp26476348p26476348.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26404095</id>
	<title>Converting Html page To PDf using Itextsharp</title>
	<published>2009-11-18T00:21:31Z</published>
	<updated>2009-11-18T00:21:31Z</updated>
	<author>
		<name>sharmilajv</name>
	</author>
	<content type="html">I'm using iTextSharp to generate PDFs for an ASP.NET application, the PDF generation seems to work fine..
&lt;br&gt;But the PDF is Not properly Aligned ...How to make my PDF Aligned?
&lt;br&gt;While Generating PDF I want to give StyleSheet to my HTML Page in C# Coding ...How To Do? </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Converting-Html-page-To-PDf-using-Itextsharp-tp26404095p26404095.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26392392</id>
	<title>Re: itextsharp c# savedialog</title>
	<published>2009-11-17T07:57:32Z</published>
	<updated>2009-11-17T07:57:32Z</updated>
	<author>
		<name>trobalo</name>
	</author>
	<content type="html">I find the solution!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string desktopath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SaveFileDialog saveFileDialog1 = new SaveFileDialog();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveFileDialog1.InitialDirectory = desktopath;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveFileDialog1.Filter = &amp;quot;PDF files (*.pdf)|*.pdf&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveFileDialog1.FilterIndex = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveFileDialog1.RestoreDirectory = true;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saveFileDialog1.FileName = System.DateTime.Today.Month + &amp;quot;-&amp;quot; + System.DateTime.Today.Day + &amp;quot;-&amp;quot; + System.DateTime.Today.Year + &amp;quot;.pdf&amp;quot;;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //use a if here to see if the user actually click save button.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if DialogResult.OK means the user actually click save button.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (saveFileDialog1.ShowDialog() == DialogResult.OK)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //do something here using the filename
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string filename = saveFileDialog1.FileName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfWriter.GetInstance(document, new FileStream(saveFileDialog1.FileName, FileMode.Create));
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;trobalo wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello!
&lt;br&gt;&lt;br&gt;I have already itextsharp running but I need implement xtra features:
&lt;br&gt;&lt;br&gt;PdfWriter.GetInstance(document, new FileStream(&amp;quot;testname.pdf&amp;quot;, FileMode.Create));
&lt;br&gt;&lt;br&gt;In C# how can I create a savedialogbox (event button click) to choose the name and the location of the new file? And after create the document how can I open it? (using adobe acrobat or similar).
&lt;br&gt;&lt;br&gt;Thanks in advance!
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/itextsharp-c--savedialog-tp26388664p26392392.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26388664</id>
	<title>itextsharp c# savedialog</title>
	<published>2009-11-17T03:51:20Z</published>
	<updated>2009-11-17T03:51:20Z</updated>
	<author>
		<name>trobalo</name>
	</author>
	<content type="html">Hello!
&lt;br&gt;&lt;br&gt;I have already itextsharp running but I need implement xtra features:
&lt;br&gt;&lt;br&gt;PdfWriter.GetInstance(document, new FileStream(&amp;quot;testname.pdf&amp;quot;, FileMode.Create));
&lt;br&gt;&lt;br&gt;In C# how can I create a savedialogbox (event button click) to choose the name and the location of the new file? And after create the document how can I open it? (using adobe acrobat or similar).
&lt;br&gt;&lt;br&gt;Thanks in advance!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/itextsharp-c--savedialog-tp26388664p26388664.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26315278</id>
	<title>iTextSharp HTML to pf</title>
	<published>2009-11-12T01:39:37Z</published>
	<updated>2009-11-12T01:39:37Z</updated>
	<author>
		<name>Arnyma</name>
	</author>
	<content type="html">Hi there;

How could we add international characters when exporting Html content to PDF by using iTextSharp Library?

Thanks in advance   
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/iTextSharp-HTML-to-pf-tp26315278p26315278.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283888</id>
	<title>Re: Using itextshart with Portuguese Citizen Card</title>
	<published>2009-11-10T06:01:23Z</published>
	<updated>2009-11-10T06:01:23Z</updated>
	<author>
		<name>migueldias</name>
	</author>
	<content type="html">Can someone please tell how to get information about the private key ? I can't get it well and i have the same problem...
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;Mário Santos&quot;&gt;&lt;br&gt;I've solved my problem! I was getting the signing certificate without any information about the private key so I couldn't get the example provided by Paulo working. 
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Mário Santos wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I've trying to sign a Pdf with the Portuguese Citizen Card, using iTextSharp (trabalho fantástico Paulo!) but after signing, Acrobat Reader cannot validate the hash. The hash algorithm appears as unknown and the Certificate button is disabled.
&lt;br&gt;&lt;br&gt;I'm using PdfName.ADOBE_PPKLITE, PdfName.ADBE_X509_RSA_SHA1 for filter and subfilter and I'm setting the Cert property of the PdfSignature to the certificate of the signer.
&lt;br&gt;&lt;br&gt;The signing itself is performed by the Citizen Card smart card through the Crypto API using SHA1 for the hash algorithm and RSA for encrypting the hash.
&lt;br&gt;&lt;br&gt;Has anyone done something like this successfully?
&lt;br&gt;&lt;br&gt;thanks a lot!
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Using-itextshart-with-Portuguese-Citizen-Card-tp21602776p26283888.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26262193</id>
	<title>Pdfwriter</title>
	<published>2009-11-08T23:25:29Z</published>
	<updated>2009-11-08T23:25:29Z</updated>
	<author>
		<name>HuaMin</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I've got the following issue with the line in bold below. 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Font times = new Font(bfTimes, 22, Font.BOLD, Color.BLACK);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string newFile = @&amp;quot;c:\file1.pdf&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Document doc = new Document();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(newFile, FileMode.Create));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Metadata
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.AddTitle(&amp;quot;File of &amp;quot; + Session[&amp;quot;sv_nm&amp;quot;]);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Add content
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.Open();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.Close();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfEncryptor.Encrypt(new PdfReader(newFile),new FileStream
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (newFile, FileMode.Open), PdfWriter.STRENGTH128BITS, pswd, null, PdfWriter.AllowScreenReaders);
&lt;br&gt;&lt;br&gt;&lt;br&gt;IOException was unhandled by user code
&lt;br&gt;The process cannot access the file 'c:\file1.pdf' because it is being used by another process.
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;Many Thanks &amp; Best Regards, HuaMin Chen</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Pdfwriter-tp26262193p26262193.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26214389</id>
	<title>Table issue</title>
	<published>2009-11-05T05:27:22Z</published>
	<updated>2009-11-05T05:27:22Z</updated>
	<author>
		<name>swati jain</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;Hi Paulo,
&lt;br&gt;&lt;br&gt;I have to display some 50 tables on pdf (with itextsharp)
&lt;br&gt;for that i am using for loop.
&lt;br&gt;&lt;br&gt;but sometimes while displaying table . header comes on first page and remaining part comes on next &amp;nbsp;page
&lt;br&gt;&lt;br&gt;How i can avoid it </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/iTextSharp-mailing-list-is-closing-tp25541314p26214389.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26134028</id>
	<title>Re: About compact Edition</title>
	<published>2009-10-30T10:29:38Z</published>
	<updated>2009-10-30T10:29:38Z</updated>
	<author>
		<name>vovka</name>
	</author>
	<content type="html">Julian,
&lt;br&gt;&lt;br&gt;Please provide me with information on how to get source code with the patch.
&lt;br&gt;Any information on how to start working to port to compact framework.
&lt;br&gt;&lt;br&gt;Thank you very much!
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Julián Ocampo wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello!
&lt;br&gt;Paulo. I'm working succesfully in the compact framerwork.
&lt;br&gt;&lt;br&gt;thank you very much!
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;itextsharp-questions mailing list
&lt;br&gt;itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/About-compact-Edition-tp20190843p26134028.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26078216</id>
	<title>Can't save PDF after filling in form fields with iTextSharp</title>
	<published>2009-10-27T06:59:03Z</published>
	<updated>2009-10-27T06:59:03Z</updated>
	<author>
		<name>Hogler</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;Working on a project using itextsharp and vb.net where I want to produce a partially filled out PDF with editable forms and the option to sign with a digital signature. 
&lt;br&gt;&lt;br&gt;I had it working just fine until last week when I started getting an error when trying to save the final document in Adobe Reader. The message says:
&lt;br&gt;&amp;quot;The document could not be saved. There was a problem reading this document (26). &amp;quot;
&lt;br&gt;&lt;br&gt;I have a template PDF with forms and extended features enabled which I want to make an editable copy of with some of the forms filled out with data from database. The idea is to be able to take the pre-filled document out on a laptop to be filled out completely and signed offline. 
&lt;br&gt;&lt;br&gt;The problem seems to occur as soon as I open the document with PdfStamper, set the value of a field and then close the document, using the code below. I even tried it with a blank PDF with just one field called &amp;quot;test&amp;quot; and still get the same error. &amp;nbsp;
&lt;br&gt;' --
&lt;br&gt;Dim reader As PdfReader = New PdfReader(sDocTemplate)
&lt;br&gt;Dim stamper As New PdfStamper(reader, New FileStream(sOutputFile, FileMode.Append))
&lt;br&gt;stamper.AcroFields.SetField(&amp;quot;test&amp;quot;, &amp;quot;hello&amp;quot;)
&lt;br&gt;stamper.Close()
&lt;br&gt;' --
&lt;br&gt;&lt;br&gt;When I open the produced PDF there is a small window saying something about the document being damaged and repaired, then it opens and everything seems fine. The forms contain the proper data and everything, but when trying to save it the mentioned error message is displayed. 
&lt;br&gt;&lt;br&gt;As I said, it was working fine right up until this error appeared out of the blue. I haven't updated any relevant software that I know of and I think I've eliminated all sources of error right down to itextsharp when testing with a blank pdf.
&lt;br&gt;&lt;br&gt;Any ideas of what could be wrong would be highly appreciated! 
&lt;br&gt;&lt;br&gt;/ Fredrik</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Can%27t-save-PDF-after-filling-in-form-fields-with-iTextSharp-tp26078216p26078216.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26032620</id>
	<title>Re: convert RTF into PDF in iTextSharp using .NET Windows</title>
	<published>2009-10-23T13:14:12Z</published>
	<updated>2009-10-23T13:14:12Z</updated>
	<author>
		<name>rickm81</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;Using iTextSharp for C# in Visual Studio 2008 .NET is it possible to read in formatted rich text data from an external source and export the formatted data on a page within a PDF Document?
&lt;br&gt;&lt;br&gt;If this is not possible are there any alternative methods to reading in rich text and exporting the data with the same formatting in a PDF Document (RTF=&amp;gt;XML=&amp;gt;PDF) ? Any additional information would be appreciated. Thanks!
&lt;br&gt;&lt;br&gt;Rick
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Howard Shank wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;It is not possible to do at this time with iText. The functionality is incomplete.
&lt;br&gt;&lt;br&gt;Howard Shank
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;________________________________
&lt;br&gt;From: B BABU &amp;lt;rajbabu_73@yahoo.co.in&amp;gt;
&lt;br&gt;To: itextsharp-questions@lists.sourceforge.net
&lt;br&gt;Sent: Thursday, July 30, 2009 3:44:47 AM
&lt;br&gt;Subject: [itextsharp-questions] convert RTF into PDF in iTextSharp using .NET Windows
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hello, 
&lt;br&gt;&lt;br&gt;How to convert RTF into PDF in iTextSharp using .NET Windows Application with Open Source Code in VB.NET ? 
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Rajbabu
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;________________________________
&lt;br&gt;&amp;nbsp;Looking for local information? Find it on Yahoo! Local
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with 
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;itextsharp-questions mailing list
&lt;br&gt;itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-RTF-into-PDF-in-iTextSharp-using-.NET-Windows-tp24733711p26032620.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25947300</id>
	<title>Re: iTextSharp on 64-bit Windows Server 2003</title>
	<published>2009-10-18T07:54:01Z</published>
	<updated>2009-10-18T07:54:01Z</updated>
	<author>
		<name>Xarx</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;the library works on 64-bit, the problem was elsewhere. The information shown by CheckAsm or Dependency Walker was misleading.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Martin.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/iTextSharp-on-64-bit-Windows-Server-2003-tp25824443p25947300.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25932354</id>
	<title>Conditional Stamp</title>
	<published>2009-10-16T14:06:39Z</published>
	<updated>2009-10-19T07:37:53Z</updated>
	<author>
		<name>ndpace</name>
	</author>
	<content type="html">I am a newbie and currently have the code at the bottom that adds a watermark to teh PDF the user is viewing.
&lt;br&gt;I need to know who to make the code not show the watermark. &amp;nbsp;I dont know how to set newdoc without WATERMARKDOCUMENT.
&lt;br&gt;&lt;br&gt;Thanks in advance for any help.
&lt;br&gt;&amp;nbsp;--------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim pdfDoc As PdfDocument = New PdfDocument(filePath)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim newDoc As Byte() = pdfDoc.WatermarkDocument()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim pdfFileName As String = filePath.Substring(filePath.LastIndexOf(&amp;quot;\&amp;quot;) + 1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SendPdfToUser(pdfFileName, newDoc)
&lt;br&gt;------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; Private Sub SendPdfToUser(ByVal filename As String, ByVal fileBytes As Byte())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.Response.Clear()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.Response.ContentType = &amp;quot;application/pdf&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.Response.AppendHeader(&amp;quot;content-disposition&amp;quot;, &amp;quot;attachment; filename=&amp;quot; + filename)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.Response.BinaryWrite(fileBytes)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.Response.Flush()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.Response.End()</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Conditional-Stamp-tp25932354p25932354.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25907262</id>
	<title>PDFA creation problems (Transfer Cuvre used)</title>
	<published>2009-10-15T04:57:30Z</published>
	<updated>2009-10-15T04:57:30Z</updated>
	<author>
		<name>rENEGADEsvn</name>
	</author>
	<content type="html">Hi all, 
&lt;br&gt;&lt;br&gt;I'm having problems creating PDFA-s (but only some of them).
&lt;br&gt;&lt;br&gt;I used the code from this link for creation.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://blog.rubypdf.com/2007/08/10/itext-and-itextsharp-support-pdfa-1-now/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.rubypdf.com/2007/08/10/itext-and-itextsharp-support-pdfa-1-now/&lt;/a&gt;&lt;br&gt;&lt;br&gt;And it works great for most of the time. But I am experiencing some difficulties for a slightly diffrent original PDF.
&lt;br&gt;&lt;br&gt;Adobe's (Professional 8 &amp; 9) preflight gives out the same message:
&lt;br&gt;&lt;br&gt;Transfer curve used:
&lt;br&gt;&lt;br&gt;Transfer curves are prohibited in PDF/X files. Use Acrobat Distiller 5's &amp;quot;Apply transfer curves&amp;quot; to avoid transfer curves in PDF files without compromising page contents.
&lt;br&gt;&lt;br&gt;Creating the pdfa using Adobe works ok since it automatically applies the transfer curves.
&lt;br&gt;&lt;br&gt;So here is my main question: Can iTextSharp be used to apply the transfer curves.
&lt;br&gt;&lt;br&gt;I would like to thank you for any reply
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PDFA-creation-problems-%28Transfer-Cuvre-used%29-tp25907262p25907262.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25824443</id>
	<title>iTextSharp on 64-bit Windows Server 2003</title>
	<published>2009-10-09T09:50:02Z</published>
	<updated>2009-10-09T09:50:02Z</updated>
	<author>
		<name>Xarx</name>
	</author>
	<content type="html">Hello.
&lt;br&gt;&lt;br&gt;I'm unable to get itextsharp.dll working on an x64 Windows Server 2003. The same binary works fine on any of our 32-bit systems.
&lt;br&gt;&lt;br&gt;Details:
&lt;br&gt;Though the itextsharp.dll library seems to be a good assembly on 32-bit systems, on a 64-bit system it seems corrupted. I've tried to check its consistency with at least two tools,
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://checkasm.booring.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://checkasm.booring.net/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.assemblyinspector.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.assemblyinspector.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;and both report the assembly has an incorrect format. I've tried building itextsharp.dll with VS2008 with all 3 possible target platforms (Any, x64, x86; all for .NET 2.0), but the result is still the same. I also downloaded the itextsharp.dll binary from sourceforge.net with the same result.
&lt;br&gt;&lt;br&gt;.NET 2.0 (and now even .NET 3.5) framework is installed on the machine. All dependencies of itextsharp.dll seem to be satisfied, none is missing. It seems to me that the library is wrongly built, but I've been unable to fix it.
&lt;br&gt;&lt;br&gt;Can anyone help me?
&lt;br&gt;&lt;br&gt;Thank you,
&lt;br&gt;Martin.
&lt;br&gt;&lt;br&gt;P.S. My original problem was that we have a C++/CLR COM library dependent on the itextsharp.dll. But regasm.exe refuses to register it on the 64-bit platform. The error message is:
&lt;br&gt;&lt;br&gt;RegAsm : error RA0000 : Could not load file or assembly 'PdfServiceLib, Version=1.0.3568.31893, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
&lt;br&gt;&lt;br&gt;I suspect itextsharp.dll to be the main reason.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/iTextSharp-on-64-bit-Windows-Server-2003-tp25824443p25824443.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25822166</id>
	<title>smartcard and ocsp</title>
	<published>2009-10-09T07:30:17Z</published>
	<updated>2009-10-13T13:22:17Z</updated>
	<author>
		<name>dziedrius</name>
	</author>
	<content type="html">Hi, 
&lt;br&gt;i need to sign pdf with timestamp and ocsp, but as long as i add second digest in this line:
&lt;br&gt;&lt;br&gt;pdfPkcs7.GetEncodedPKCS7(sha.Hash, cal, tsc, ocsp);
&lt;br&gt;&lt;br&gt;, acrobat reader says &amp;quot;document altered&amp;quot;. If the line is like this:
&lt;br&gt;&lt;br&gt;pdfPkcs7.GetEncodedPKCS7(null, cal, tsc, ocsp);
&lt;br&gt;&lt;br&gt;acrobat reader is happy, but naturaly ocsp isn't added.
&lt;br&gt;may be someone notices something wrong in my code?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public X509Certificate2 GetCertificate()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var st = new X509Store(parameters.CertificateStore, parameters.CertificateLocation);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; st.Open(OpenFlags.ReadOnly);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var col = st.Certificates;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509Certificate2 card = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var sel = X509Certificate2UI.SelectFromCollection(col, parameters.ChooseCertificateTitle, parameters.ChooseCertificateMessage, X509SelectionFlag.SingleSelection);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sel.Count &amp;gt; 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var en = sel.GetEnumerator();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; en.MoveNext();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; card = en.Current;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; st.Close();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return card;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static public byte[] SignMessage(Byte[] msg, X509Certificate2 signerCert, bool detached)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var contentInfo = new ContentInfo(msg);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var signedCms = new SignedCms(contentInfo, detached);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var cmsSigner = new CmsSigner(signerCert)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IncludeOption = X509IncludeOption.EndCertOnly
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signedCms.ComputeSignature(cmsSigner, false);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return signedCms.Encode();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void SignDetached(string inputFileName, string outputFileName)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var certificate = GetCertificate();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var chain = GetChain(certificate);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var pdfReader = new PdfReader(inputFileName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var pdfStamper = PdfStamper.CreateSignature(pdfReader, new FileStream(outputFileName, FileMode.Create), '\0');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var signatureAppearance = pdfStamper.SignatureAppearance;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var pageSize = pdfReader.GetPageSizeWithRotation(1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.SetVisibleSignature(new Rectangle(pageSize.Width - 200, pageSize.Height - 20, pageSize.Width, pageSize.Height), 1, null);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.SignDate = DateTime.Now;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.SetCrypto(null, chain, null, null);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.Reason = parameters.SignReason;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.Location = parameters.SignLocation;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.Acro6Layers = true;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.Render = PdfSignatureAppearance.SignatureRender.NameAndDescription;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dic = new PdfSignature(PdfName.ADOBE_PPKLITE, PdfName.ADBE_PKCS7_DETACHED)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Date = new PdfDate(signatureAppearance.SignDate),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Name = PdfPKCS7.GetSubjectFields(chain[0]).GetField(&amp;quot;CN&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (signatureAppearance.Reason != null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic.Reason = signatureAppearance.Reason;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (signatureAppearance.Location != null)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic.Location = signatureAppearance.Location;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.CryptoDictionary = dic;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const int csize = 15000;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var exc = new Hashtable();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exc[PdfName.CONTENTS] = csize * 2 + 2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.PreClose(exc);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var sha = new SHA1CryptoServiceProvider();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var s = signatureAppearance.RangeStream;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var memoryStream = new MemoryStream();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int read;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var buffer = new byte[8192];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while ((read = s.Read(buffer, 0, 8192)) &amp;gt; 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memoryStream.Write(buffer, 0, read);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sha.ComputeHash(memoryStream.ToArray());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var pk2 = SignMessage(memoryStream.ToArray(), certificate, true);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var pdfPkcs7forDigests = new PdfPKCS7(pk2);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var digest = pdfPkcs7forDigests.Digest;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var rsaData = pdfPkcs7forDigests.RsaData;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var pdfPkcs7 = new PdfPKCS7(null, chain, null, &amp;quot;SHA1&amp;quot;, true);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pdfPkcs7.SetExternalDigest(digest, rsaData, &amp;quot;RSA&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var tsc = new TSAClientBouncyCastle(parameters.TimeStampServerUrl, null, null);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var cal = DateTime.Now;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] ocsp = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (chain.Length &amp;gt;= 2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var url = PdfPKCS7.GetOCSPURL(chain[0]);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!string.IsNullOrEmpty(url))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ocsp = new OcspClientBouncyCastle(chain[0], chain[1], url).GetEncoded();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var sh = pdfPkcs7.GetAuthenticatedAttributeBytes(sha.Hash, cal, null);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pdfPkcs7.Update(sh, 0, sh.Length);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var encodedSig = pdfPkcs7.GetEncodedPKCS7(sha.Hash, cal, tsc, ocsp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (csize + 2 &amp;lt; encodedSig.Length)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new Exception(&amp;quot;Not enough space&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var outc = new byte[csize];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dic2 = new PdfDictionary();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Array.Copy(encodedSig, 0, outc, 0, encodedSig.Length);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic2.Put(PdfName.CONTENTS, new PdfString(outc).SetHexWriting(true));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signatureAppearance.Close(dic2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static X509Certificate[] GetChain(X509Certificate2 certificate2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var chain = new X509Chain();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chain.Build(certificate2);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var orgChain = new List&amp;lt;X509Certificate&amp;gt;();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var cert in chain.ChainElements)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orgChain.Add(GetBouncyCastleCertificate(cert.Certificate));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return orgChain.ToArray();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static X509Certificate GetBouncyCastleCertificate(X509Certificate2 certificate)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var certificateMemoryStream = new MemoryStream(certificate.RawData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new X509Certificate(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509CertificateStructure.GetInstance(new Asn1InputStream(certificateMemoryStream).ReadObject()));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/smartcard-and-ocsp-tp25822166p25822166.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25818318</id>
	<title>paragraph in columntext showing extra space before first line</title>
	<published>2009-10-09T02:42:43Z</published>
	<updated>2009-10-09T02:42:43Z</updated>
	<author>
		<name>rajeshkatkam</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I am converting HTML of label into PDF with HTMLWorker. When i added a paragraph to columntext the space before first line is more than the space exist in label. ColumnText height and width is same as Label dimensions.
&lt;br&gt;&lt;br&gt;Which is causing the extra space, is it paragraph or ColumnText ?
&lt;br&gt;How to remove the space from it?
&lt;br&gt;&lt;br&gt;Thanks in advance.
&lt;br&gt;Rajesh Katkam
&lt;br&gt;&amp;nbsp;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/paragraph-in-columntext-showing-extra-space-before-first-line-tp25818318p25818318.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25799033</id>
	<title>Cell width for table</title>
	<published>2009-10-07T23:25:22Z</published>
	<updated>2009-10-07T23:25:22Z</updated>
	<author>
		<name>HB Shah</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have changed iTextSharp Source to use some style tag. Now I have table with two rows.
&lt;br&gt;1st row contains two cols with colspan=2 in second col(1st-30,2nd-70).
&lt;br&gt;2nd row contains three cols with 1st having same width as in 1st row,(cols-1st-30, 2nd-20, 3rd-50)
&lt;br&gt;&lt;br&gt;Is there way to get result like this in pdf? 
&lt;br&gt;&lt;br&gt;I have seen forum &lt;a href=&quot;http://www.nabble.com/HTMLWorker---Table-formatting-td6994137.html#a7016815&quot; target=&quot;_top&quot;&gt;HTMLWorker---Table-formatting&lt;/a&gt;&amp;nbsp;that has same issue, but not able to get answer.
&lt;br&gt;&lt;br&gt;Please help me out
&lt;br&gt;&lt;br&gt;Thanks &amp; Regards,
&lt;br&gt;HB SHah</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cell-width-for-table-tp25799033p25799033.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25798753</id>
	<title>Re: Font problem</title>
	<published>2009-10-07T22:54:05Z</published>
	<updated>2009-10-07T22:54:05Z</updated>
	<author>
		<name>raj231362</name>
	</author>
	<content type="html">&lt;br&gt;use BaseFont.NOT_EMBEDDED
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Suheb Ahmad wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Dear all,
&lt;br&gt;&lt;br&gt;I am trying to create a pdf file from an image and setting a hidden text behind the image at defined location.
&lt;br&gt;All things are working well but the font does not appears good. 
&lt;br&gt;&lt;br&gt;i am using following code:-
&lt;br&gt;&lt;br&gt;FontFactory.RegisterDirectory(@&amp;quot;C:\WINDOWS\fonts&amp;quot;);
&lt;br&gt;FontFactory.RegisterDirectory(@&amp;quot;C:\WINDOWS\fonts\Arial.ttf&amp;quot;);
&lt;br&gt;FontFactory.RegisterDirectory(@&amp;quot;C:\WINDOWS\fonts\Times New Roman.ttf&amp;quot;);
&lt;br&gt;&lt;br&gt;chunk = new Chunk(&amp;quot;New Zealand Trained Nurses' Association&amp;quot;, FontFactory.GetFont(&amp;quot;Times New Roman&amp;quot;, &amp;quot;Cp1252&amp;quot;, BaseFont.EMBEDDED, 20, 0, iTextSharp.text.Color.RED));
&lt;br&gt;chunk.SetTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_FILL, 0, iTextSharp.text.Color.MAGENTA);
&lt;br&gt;rect = new iTextSharp.text.Rectangle(184, 1063, 376, 1063);
&lt;br&gt;ct.SetSimpleColumn(rect.Left, rect.Bottom, rect.Right, rect.Top, 0, 0);
&lt;br&gt;ct.AddText(chunk);
&lt;br&gt;ct.Go();
&lt;br&gt;&lt;br&gt;&lt;br&gt;The font i passed in chunk '&lt;b&gt;Times New Roman&lt;/b&gt;' &amp;nbsp;but when i copy the text from the pdf file and paste it in Microsoft Word it shows the font '&lt;b&gt;TimesNewRomanPSMT&lt;/b&gt;' while the font size and color are same as i passed in chunk.
&lt;br&gt;&lt;br&gt;Can some one tell me where i made mistake. &amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks in Advance
&lt;br&gt;&lt;br&gt;Suheb Ahmad
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Font-problem-tp25781136p25798753.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25797207</id>
	<title>Duplicate a PDF Page</title>
	<published>2009-10-07T18:37:56Z</published>
	<updated>2009-10-07T18:37:56Z</updated>
	<author>
		<name>jsun</name>
	</author>
	<content type="html">I have a one-page PDF form with space for three dependents. &amp;nbsp;My client wants to be able to duplicate a page for each additional three dependent. &amp;nbsp;So I need to append the the first page to the end of the PDF file as many times as needed.
&lt;br&gt;&lt;br&gt;Please help with some code.
&lt;br&gt;&lt;br&gt;Thank you very much </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Duplicate-a-PDF-Page-tp25797207p25797207.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25781136</id>
	<title>Font problem</title>
	<published>2009-10-06T23:22:49Z</published>
	<updated>2009-10-06T23:22:49Z</updated>
	<author>
		<name>Suheb Ahmad</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;I am trying to create a pdf file from an image and setting a hidden text behind the image at defined location.
&lt;br&gt;All things are working well but the font does not appears good. 
&lt;br&gt;&lt;br&gt;i am using following code:-
&lt;br&gt;&lt;br&gt;FontFactory.RegisterDirectory(@&amp;quot;C:\WINDOWS\fonts&amp;quot;);
&lt;br&gt;FontFactory.RegisterDirectory(@&amp;quot;C:\WINDOWS\fonts\Arial.ttf&amp;quot;);
&lt;br&gt;FontFactory.RegisterDirectory(@&amp;quot;C:\WINDOWS\fonts\Times New Roman.ttf&amp;quot;);
&lt;br&gt;&lt;br&gt;chunk = new Chunk(&amp;quot;New Zealand Trained Nurses' Association&amp;quot;, FontFactory.GetFont(&amp;quot;Times New Roman&amp;quot;, &amp;quot;Cp1252&amp;quot;, BaseFont.EMBEDDED, 20, 0, iTextSharp.text.Color.RED));
&lt;br&gt;chunk.SetTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_FILL, 0, iTextSharp.text.Color.MAGENTA);
&lt;br&gt;rect = new iTextSharp.text.Rectangle(184, 1063, 376, 1063);
&lt;br&gt;ct.SetSimpleColumn(rect.Left, rect.Bottom, rect.Right, rect.Top, 0, 0);
&lt;br&gt;ct.AddText(chunk);
&lt;br&gt;ct.Go();
&lt;br&gt;&lt;br&gt;&lt;br&gt;The font i passed in chunk '&lt;b&gt;Times New Roman&lt;/b&gt;' &amp;nbsp;but when i copy the text from the pdf file and paste it in Microsoft Word it shows the font '&lt;b&gt;TimesNewRomanPSMT&lt;/b&gt;' while the font size and color are same as i passed in chunk.
&lt;br&gt;&lt;br&gt;Can some one tell me where i made mistake. &amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks in Advance
&lt;br&gt;&lt;br&gt;Suheb Ahmad&lt;div class=&quot;signature&quot;&gt;Suheb Ahmad
&lt;br&gt;-------------
&lt;br&gt;New Delhi&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Font-problem-tp25781136p25781136.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25780807</id>
	<title>Adding timestamp with smartcard/etoken certificate</title>
	<published>2009-10-06T22:35:14Z</published>
	<updated>2009-10-06T22:35:14Z</updated>
	<author>
		<name>dziedrius</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;there's sample how to add timestamp using certificate in file:
&lt;br&gt;&lt;a href=&quot;http://itextpdf.sourceforge.net/howtosign.html#signtsocspcs&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://itextpdf.sourceforge.net/howtosign.html#signtsocspcs&lt;/a&gt;&lt;br&gt;&lt;br&gt;but i can't find sample, how to add timestamp using etoken (smartcard should be pretty much the same).
&lt;br&gt;&lt;br&gt;the part, that i don't know how to change is:
&lt;br&gt;&lt;br&gt;Pkcs12Store ks = new Pkcs12Store(fs, CERT_PASSW.ToCharArray());
&lt;br&gt;ICipherParameters pk = ks.GetKey(alias).Key;
&lt;br&gt;&lt;br&gt;because in Pkcs12Store constructor they are using parameter to certificate file stream, i have my certificate as X509Certificate2 object.
&lt;br&gt;&lt;br&gt;If anyone done this and could help, i would be very thankfull.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Adding-timestamp-with-smartcard-etoken-certificate-tp25780807p25780807.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25767046</id>
	<title>Replacing '≥' with space.</title>
	<published>2009-10-06T04:31:03Z</published>
	<updated>2009-10-06T04:31:03Z</updated>
	<author>
		<name>sutch</name>
	</author>
	<content type="html">Whenever I try to write &amp;quot;event ≥ 1 12&amp;quot; string to the pdf it is actually writting &amp;nbsp;&amp;quot;event 1 12&amp;quot;.
&lt;br&gt;I have debugged the library but couldn't find any thing. I am using Arial.ttf to write my pdf file.
&lt;br&gt;&lt;br&gt;Please help me for this as i have wasted too much time on this.
&lt;br&gt;&lt;br&gt;Thanks in advance.
&lt;br&gt;sutch</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Replacing-%27%E2%89%A5%27-with-space.-tp25767046p25767046.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25752347</id>
	<title>Creating PDF Digital signature without Bouncy Castle</title>
	<published>2009-10-05T07:56:24Z</published>
	<updated>2009-10-05T07:56:24Z</updated>
	<author>
		<name>Tamas</name>
	</author>
	<content type="html">Dear IText Experts, 
&lt;br&gt;&lt;br&gt;I would like to put a digital signature to an existing PDF document. In all of the IText documentation I found a desctiprion about how to sign a PDF and all of the ways use Bouncy Castle classes to encrypt the document hash. 
&lt;br&gt;&lt;br&gt;eg: 
&lt;br&gt;&lt;br&gt;PdfStamper st = PdfStamper.CreateSignature(reader, new FileStream(this.outputPDF, FileMode.Create, FileAccess.Write), '\0', null, true); 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; st.MoreInfo = this.metadata.getMetaData(); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; st.XmpMetadata = this.metadata.getStreamedMetaData(); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfSignatureAppearance sap = st.SignatureAppearance; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sap.SetCrypto(this.myCert.Akp, this.myCert.Chain, null, PdfSignatureAppearance.WINCER_SIGNED); 
&lt;br&gt;... 
&lt;br&gt;st.Close(); 
&lt;br&gt;&lt;br&gt;&amp;nbsp;I have already had an encrypted signed hash (created from the pdf document content and a MyCert.pfx) and I'd like to insert, append (I dont know where to) this existing signature to the existing PDF. 
&lt;br&gt;&lt;br&gt;Does anybody know what should I use? 
&lt;br&gt;&lt;br&gt;Any help would be appreciated. 
&lt;br&gt;&lt;br&gt;Tamas
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-PDF-Digital-signature-without-Bouncy-Castle-tp25752347p25752347.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25746644</id>
	<title>get ICipherParameters from X509Certificate2</title>
	<published>2009-10-05T01:05:01Z</published>
	<updated>2009-10-05T01:05:01Z</updated>
	<author>
		<name>pmalis</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;I would like to sign pdf with timestamp using windows certificate from certificate store (x509certificate2). 
&lt;br&gt;When I sign with pfx certificate I use this code and it works fine:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static void SignWithTimeStamp()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string IN_FILE = &amp;quot;doc.pdf&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string OUT_FILE = &amp;quot;hello_signed_cs.pdf&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string CERT_PATH = &amp;quot;cert.pfx&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string CERT_PASSW= &amp;quot;password&amp;quot;;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileStream fs = new FileStream(CERT_PATH, FileMode.Open);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Pkcs12Store ks = new Pkcs12Store(fs, CERT_PASSW.ToCharArray());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string alias = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (string al in ks.Aliases)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ks.IsKeyEntry(al) &amp;&amp; ks.GetKey(al).Key.IsPrivate)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alias = al;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fs.Close();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ICipherParameters pk = ks.GetKey(alias).Key;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509CertificateEntry[] x = ks.GetCertificateChain(alias);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509Certificate[] chain = new X509Certificate[x.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int k = 0; k &amp;lt; x.Length; ++k)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chain[k] = x[k].Certificate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ITSAClient tsc = new TSAClientBouncyCastle(TSA_URL, TSA_ACCNT, TSA_PASSW);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfReader reader = new PdfReader(IN_FILE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileStream fout = new FileStream(OUT_FILE, FileMode.Create);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfStamper stp = PdfStamper.CreateSignature(reader, fout, '\0');
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfSignatureAppearance sap = stp.SignatureAppearance;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sap.SetCrypto(null, chain, null, PdfSignatureAppearance.SELF_SIGNED);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sap.SetVisibleSignature(new Rectangle(100, 100, 300, 200), 1, &amp;quot;Signature&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfSignature dic = new PdfSignature(PdfName.ADOBE_PPKLITE,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new PdfName(&amp;quot;adbe.pkcs7.detached&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic.Reason = sap.Reason;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic.Location = sap.Location;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic.Contact = sap.Contact;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic.Date = new PdfDate(sap.SignDate);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sap.CryptoDictionary = dic;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int contentEstimated = 15000;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Preallocate excluded byte-range for the signature content (hex encoded)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Hashtable exc = new Hashtable();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exc[PdfName.CONTENTS] = contentEstimated * 2 + 2;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sap.PreClose(exc);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfPKCS7 sgn = new PdfPKCS7(pk, chain, null, &amp;quot;SHA1&amp;quot;, false);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IDigest messageDigest = DigestUtilities.GetDigest(&amp;quot;SHA1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Stream data = sap.RangeStream;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] buf = new byte[8192];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int n;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while ((n = data.Read(buf, 0, buf.Length)) &amp;gt; 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; messageDigest.BlockUpdate(buf, 0, n);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] hash = new byte[messageDigest.GetDigestSize()];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; messageDigest.DoFinal(hash, 0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateTime cal = DateTime.Now;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] ocsp = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (chain.Length &amp;gt;= 2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String url = PdfPKCS7.GetOCSPURL(chain[0]);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (url != null &amp;&amp; url.Length &amp;gt; 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ocsp = new OcspClientBouncyCastle(chain[0], chain[1], url).GetEncoded();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] sh = sgn.GetAuthenticatedAttributeBytes(hash, cal, ocsp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sgn.Update(sh, 0, sh.Length);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //HERE get timestamp
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] encodedSig = sgn.GetEncodedPKCS7(hash, cal, tsc, ocsp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (contentEstimated + 2 &amp;lt; encodedSig.Length)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new Exception(&amp;quot;Not enough space&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] paddedSig = new byte[contentEstimated];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Array.Copy(encodedSig, 0, paddedSig, 0, encodedSig.Length);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PdfDictionary dic2 = new PdfDictionary();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dic2.Put(PdfName.CONTENTS, new PdfString(paddedSig).SetHexWriting(true));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sap.Close(dic2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;This code work fine. But when I use X509Certificate2 from certificate store I can't convert its private key to ICipherParameters. 
&lt;br&gt;&lt;br&gt;Is it possible? Can I use X509Certificate2 for signing with timestamp?
&lt;br&gt;&lt;br&gt;I get certificate and certificate chain with:
&lt;br&gt;&lt;br&gt;//get certificate from certificate store, this certificate has exportable private key
&lt;br&gt;X509Certificate2 certificate = GetCertificate(); 
&lt;br&gt;X509CertificateParser cp = new X509CertificateParser();
&lt;br&gt;X509Certificate[] chain = new[] { cp.ReadCertificate(certificate.RawData) };
&lt;br&gt;&lt;br&gt;Thank you for info.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/get-ICipherParameters-from-X509Certificate2-tp25746644p25746644.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25745321</id>
	<title>iTextShartop - How to align text and 2 images in the header</title>
	<published>2009-10-04T22:25:54Z</published>
	<updated>2009-10-05T21:43:42Z</updated>
	<author>
		<name>VermaniB</name>
	</author>
	<content type="html">Hi, 
&lt;br&gt;&amp;nbsp; &amp;nbsp;I have a question: 
&lt;br&gt;I have 2 put 2 images and a text in the header. The images are supposed to be in extreme heft and extreme right, text in the centre of the header. 
&lt;br&gt;&lt;br&gt;When i write the below code, though the images come on extreme corners , but thetext does not come in the centre. 
&lt;br&gt;Please let me know as to how can I get the required. 
&lt;br&gt;&lt;br&gt;private void AddHeader1() 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string path = &amp;quot;C:Abc.png&amp;quot;; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Image image = Image.GetInstance(path); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image.SetAbsolutePosition(Document.Left, Document.Top); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image.ScaleAbsolute(50, 40); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image.Alignment = Image.ALIGN_LEFT; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Image image1 = Image.GetInstance(path); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image1.SetAbsolutePosition(Document.Left, Document.Top); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image1.ScaleAbsolute(50, 40); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image1.Alignment = Image.ALIGN_RIGHT; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Phrase headerPhrase = new Phrase(); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Phrase p2 = new Phrase(); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Phrase p1; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p1 = new Phrase(&amp;quot; abc&amp;quot;) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Environment.NewLine, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot; pqr&amp;quot; , 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment.NewLine, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot; mno&amp;quot;, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment.NewLine, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Paragraph paragraph = new Paragraph(p1); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; paragraph.Alignment = Element.ALIGN_CENTER; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p2.Add(paragraph); 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Chunk ck1 = new Chunk(image1, 8, -27); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; headerPhrase.Add(ck1); 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Chunk ck = new Chunk(image, 482, 5); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p2.Add(ck); 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HeaderFooter header = new HeaderFooter(headerPhrase, p2); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; header.BorderColor = new iTextSharp.text.Color(209, 191, 145); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Document.Header = header; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } 
&lt;br&gt;&lt;br&gt;&lt;br&gt;I have tried using tables also, but then the look and fefel gets very distorted. Also the table that gets added is not in th eheader area but just below the header.
&lt;br&gt;&lt;br&gt;Can somebody help?
&lt;br&gt;&lt;br&gt;Thanks in advance 
&lt;br&gt;BV </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/iTextShartop---How-to-align-text-and-2-images-in-the-header-tp25745321p25745321.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25727333</id>
	<title>Font problem....</title>
	<published>2009-10-03T03:06:38Z</published>
	<updated>2009-10-03T03:06:38Z</updated>
	<author>
		<name>raj231362</name>
	</author>
	<content type="html">hi all,
&lt;br&gt;&lt;br&gt;&lt;br&gt;i &amp;nbsp;have created a pdf from an image . i placed some text at particular position with font &amp;quot;times new roman&amp;quot; it appears &amp;nbsp;look like &amp;quot;times new roman&amp;quot; but when i copy the text to ms - word , the appearance change and &amp;nbsp;its shows font &amp;quot;TimesNewRomanPSMT&amp;quot;.
&lt;br&gt;&lt;br&gt;i am using following code:-
&lt;br&gt;&lt;br&gt;&amp;nbsp;chunk = new Chunk(&amp;quot;New Zealand Trained Nurses' Association&amp;quot;, FontFactory.GetFont(&amp;quot;times new roman&amp;quot;, &amp;quot;Cp1252&amp;quot;, true, 20, 0, iTextSharp.text.Color.RED));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chunk.SetTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_FILL, 0, iTextSharp.text.Color.MAGENTA);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rect = new iTextSharp.text.Rectangle(x, dH - (y + h), x + w, dH - y - h);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ct.SetSimpleColumn(rect.Left, rect.Bottom, rect.Right, rect.Top, 0, GetAllignment(align));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ct.AddText(chunk);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ct.Go();
&lt;br&gt;&lt;br&gt;i am allready registered font..
&lt;br&gt;so whats the actual problem...please help me???
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/file/p25727333/untitled1.GIF&quot; target=&quot;_top&quot;&gt;untitled1.GIF&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;Raj
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Font-problem....-tp25727333p25727333.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25640742</id>
	<title>Export ASP.net Chart to PDF</title>
	<published>2009-09-27T22:17:51Z</published>
	<updated>2009-09-27T22:17:51Z</updated>
	<author>
		<name>Arnyma</name>
	</author>
	<content type="html">Hi There,
&lt;br&gt;&lt;br&gt;I am using ASP.net, C#, SQL Server 2005 for a web project. I have couple of buttons to export the gridview to different formats like .doc, .xls, .pdf (using iTextSharp).
&lt;br&gt;&lt;br&gt;In some pages I have asp.net Chart Controls, getting the data directly from sql server, I need to export some of these charts to Word,Excel and PDF. any suggestions?
&lt;br&gt;&lt;br&gt;By the way I can print these Charts by using javascript.
&lt;br&gt;&lt;br&gt;Thanks in advance
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Export-ASP.net-Chart-to-PDF-tp25640742p25640742.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25615236</id>
	<title>Re: Problems with Digital Signature and Adobe	Update</title>
	<published>2009-09-25T09:39:40Z</published>
	<updated>2009-09-25T09:39:40Z</updated>
	<author>
		<name>jimLo</name>
	</author>
	<content type="html">In the latest version of iTextSharp (4.1.6) the PdfPKCS7 class is substantially rewritten and things work without having to make any changes.
&lt;br&gt;&lt;br&gt;Jim
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;webpointz&quot;&gt;&lt;br&gt;I am getting the same problem although slightly different...
&lt;br&gt;&lt;br&gt;2.16.840.1.101.3.4.2.1 MessageDigest not available &amp;nbsp;
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;The error occurred in C:\ColdFusionCentaur\wwwroot\readpdf.cfm: line 70
&lt;br&gt;&amp;nbsp;
&lt;br&gt;68 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // End revision extraction &amp;nbsp;
&lt;br&gt;69 : &amp;nbsp; 
&lt;br&gt;70 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pk = acroFields.verifySignature(name); &amp;nbsp;
&lt;br&gt;71 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; calendar = pk.getSignDate(); &amp;nbsp;
&lt;br&gt;72 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; certificateArray = pk.getCertificates(); &amp;nbsp;
&lt;br&gt;&lt;br&gt;I should add that i am using ColdFusion and iText 2.1.7
&lt;br&gt;&lt;br&gt;Where in the source of iText do you add the modification?
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;jimLo&quot;&gt;&lt;br&gt;To get things working properly the added code should be:-
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (algorithm == &amp;quot;2.16.840.1.101.3.4.2.1withRSA&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm = &amp;quot;SHA256withRSA&amp;quot;; //&amp;quot;2.16.840.1.101.3.4.2.1&amp;quot;; 
&lt;br&gt;&lt;br&gt;Since OID 2.16.840.1.101.3.4.2.1 corresponds to SHA-256 this seems appropriate.
&lt;br&gt;With this change PdfPKCS7.Verify() seems to return a sensible value. 
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;jimLo wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;To get the change to work I had to use:-
&lt;br&gt;&lt;br&gt;if (algorithm == &amp;quot;2.16.840.1.101.3.4.2.1withRSA&amp;quot;) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm = &amp;quot;SHA1WITHRSA&amp;quot;; //&amp;quot;2.16.840.1.101.3.4.2.1&amp;quot;; 
&lt;br&gt;&lt;br&gt;That makes AcroFields.VerifySignature return a PdfPKCS7 object without error. &amp;nbsp;However when I then do a PdfPKCS7.Verify() I get a False return even when the PDF has not been modified. &amp;nbsp; Note this does not happen with other certificate types (which work without the fix above). &amp;nbsp; So it looks to me that there are even more things wrong.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Tony Carreon wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;actually i downloaded the newest available version and it still did &amp;nbsp;
&lt;br&gt;not work. i downloaded the source and compiled from that and it did &amp;nbsp;
&lt;br&gt;not work. the only way i could get it to work was modify the source to &amp;nbsp;
&lt;br&gt;include the line:
&lt;br&gt;&lt;br&gt;if (algorithm == &amp;quot;2.16.840.1.101.3.4.2.1WITHRSA&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm = &amp;quot;SHA1WITHRSA&amp;quot;; //&amp;quot;2.16.840.1.101.3.4.2.1&amp;quot;;
&lt;br&gt;&lt;br&gt;&lt;br&gt;to the GetSigner method in SignerUtilities.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;tony
&lt;br&gt;&lt;br&gt;On Mar 24, 2009, at 6:54 AM, Paulo Soares wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Looks like you are using an old iTextSharp version that doesn't &amp;nbsp;
&lt;br&gt;&amp;gt; recognize that particular hash.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Paulo
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt; From: Tony Carreon [mailto:tcarreon@nmsimaging.com]
&lt;br&gt;&amp;gt;&amp;gt; Sent: Tuesday, March 17, 2009 8:06 PM
&lt;br&gt;&amp;gt;&amp;gt; To: itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&amp;gt;&amp;gt; Subject: [itextsharp-questions] Problems with Digital
&lt;br&gt;&amp;gt;&amp;gt; Signature and Adobe Update
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; today users have started noticing an error when opening digital
&lt;br&gt;&amp;gt;&amp;gt; signatures with itextsharp / bouncycastle.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; apparently adobe is pushing out an update for a critical bug fix.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; has anyone else noticed this problem?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; the error message is : Signer 2.16.840.1.101.3.4.2.1WITHRSA not
&lt;br&gt;&amp;gt;&amp;gt; recognised.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Aviso Legal:
&lt;br&gt;&amp;gt; Esta mensagem é destinada exclusivamente ao destinatário. Pode &amp;nbsp;
&lt;br&gt;&amp;gt; conter informação confidencial ou legalmente protegida. A incorrecta &amp;nbsp;
&lt;br&gt;&amp;gt; transmissão desta mensagem não significa a perca de &amp;nbsp;
&lt;br&gt;&amp;gt; confidencialidade. Se esta mensagem for recebida por engano, por &amp;nbsp;
&lt;br&gt;&amp;gt; favor envie-a de volta para o remetente e apague-a do seu sistema de &amp;nbsp;
&lt;br&gt;&amp;gt; imediato. É proibido a qualquer pessoa que não o destinatário de &amp;nbsp;
&lt;br&gt;&amp;gt; usar, revelar ou distribuir qualquer parte desta mensagem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Disclaimer:
&lt;br&gt;&amp;gt; This message is destined exclusively to the intended receiver. It &amp;nbsp;
&lt;br&gt;&amp;gt; may contain confidential or legally protected information. The &amp;nbsp;
&lt;br&gt;&amp;gt; incorrect transmission of this message does not mean the loss of its &amp;nbsp;
&lt;br&gt;&amp;gt; confidentiality. If this message is received by mistake, please send &amp;nbsp;
&lt;br&gt;&amp;gt; it back to the sender and delete it from your system immediately. It &amp;nbsp;
&lt;br&gt;&amp;gt; is forbidden to any person who is not the intended receiver to use, &amp;nbsp;
&lt;br&gt;&amp;gt; distribute or copy any part of this message.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) &amp;nbsp;
&lt;br&gt;&amp;gt; are
&lt;br&gt;&amp;gt; powering Web 2.0 with engaging, cross-platform capabilities. Quickly &amp;nbsp;
&lt;br&gt;&amp;gt; and
&lt;br&gt;&amp;gt; easily build your RIAs with Flex Builder, the Eclipse(TM)based &amp;nbsp;
&lt;br&gt;&amp;gt; development
&lt;br&gt;&amp;gt; software that enables intelligent coding and step-through debugging.
&lt;br&gt;&amp;gt; Download the free 60 day trial. &lt;a href=&quot;http://p.sf.net/sfu/www-adobe-com_______________________________________________&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/www-adobe-com_______________________________________________&lt;/a&gt;&lt;br&gt;&amp;gt; itextsharp-questions mailing list
&lt;br&gt;&amp;gt; itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
&lt;br&gt;powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
&lt;br&gt;easily build your RIAs with Flex Builder, the Eclipse(TM)based development
&lt;br&gt;software that enables intelligent coding and step-through debugging.
&lt;br&gt;Download the free 60 day trial. &lt;a href=&quot;http://p.sf.net/sfu/www-adobe-com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/www-adobe-com&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;itextsharp-questions mailing list
&lt;br&gt;itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-Digital-Signature-and-Adobe-Update-tp22569056p25615236.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25612191</id>
	<title>Re: Problems with Digital Signature and Adobe	Update</title>
	<published>2009-09-25T06:29:58Z</published>
	<updated>2009-09-25T06:29:58Z</updated>
	<author>
		<name>webpointz</name>
	</author>
	<content type="html">I am getting the same problem although slightly different...
&lt;br&gt;&lt;br&gt;2.16.840.1.101.3.4.2.1 MessageDigest not available &amp;nbsp;
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;The error occurred in C:\ColdFusionCentaur\wwwroot\readpdf.cfm: line 70
&lt;br&gt;&amp;nbsp;
&lt;br&gt;68 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // End revision extraction &amp;nbsp;
&lt;br&gt;69 : &amp;nbsp; 
&lt;br&gt;70 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pk = acroFields.verifySignature(name); &amp;nbsp;
&lt;br&gt;71 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; calendar = pk.getSignDate(); &amp;nbsp;
&lt;br&gt;72 : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; certificateArray = pk.getCertificates(); &amp;nbsp;
&lt;br&gt;&lt;br&gt;I should add that i am using ColdFusion and iText 2.1.7
&lt;br&gt;&lt;br&gt;Where in the source of iText do you add the modification?
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;jimLo&quot;&gt;&lt;br&gt;To get things working properly the added code should be:-
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (algorithm == &amp;quot;2.16.840.1.101.3.4.2.1withRSA&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm = &amp;quot;SHA256withRSA&amp;quot;; //&amp;quot;2.16.840.1.101.3.4.2.1&amp;quot;; 
&lt;br&gt;&lt;br&gt;Since OID 2.16.840.1.101.3.4.2.1 corresponds to SHA-256 this seems appropriate.
&lt;br&gt;With this change PdfPKCS7.Verify() seems to return a sensible value. 
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;jimLo wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;To get the change to work I had to use:-
&lt;br&gt;&lt;br&gt;if (algorithm == &amp;quot;2.16.840.1.101.3.4.2.1withRSA&amp;quot;) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm = &amp;quot;SHA1WITHRSA&amp;quot;; //&amp;quot;2.16.840.1.101.3.4.2.1&amp;quot;; 
&lt;br&gt;&lt;br&gt;That makes AcroFields.VerifySignature return a PdfPKCS7 object without error. &amp;nbsp;However when I then do a PdfPKCS7.Verify() I get a False return even when the PDF has not been modified. &amp;nbsp; Note this does not happen with other certificate types (which work without the fix above). &amp;nbsp; So it looks to me that there are even more things wrong.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Tony Carreon wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;actually i downloaded the newest available version and it still did &amp;nbsp;
&lt;br&gt;not work. i downloaded the source and compiled from that and it did &amp;nbsp;
&lt;br&gt;not work. the only way i could get it to work was modify the source to &amp;nbsp;
&lt;br&gt;include the line:
&lt;br&gt;&lt;br&gt;if (algorithm == &amp;quot;2.16.840.1.101.3.4.2.1WITHRSA&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm = &amp;quot;SHA1WITHRSA&amp;quot;; //&amp;quot;2.16.840.1.101.3.4.2.1&amp;quot;;
&lt;br&gt;&lt;br&gt;&lt;br&gt;to the GetSigner method in SignerUtilities.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;tony
&lt;br&gt;&lt;br&gt;On Mar 24, 2009, at 6:54 AM, Paulo Soares wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Looks like you are using an old iTextSharp version that doesn't &amp;nbsp;
&lt;br&gt;&amp;gt; recognize that particular hash.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Paulo
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt; From: Tony Carreon [mailto:tcarreon@nmsimaging.com]
&lt;br&gt;&amp;gt;&amp;gt; Sent: Tuesday, March 17, 2009 8:06 PM
&lt;br&gt;&amp;gt;&amp;gt; To: itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&amp;gt;&amp;gt; Subject: [itextsharp-questions] Problems with Digital
&lt;br&gt;&amp;gt;&amp;gt; Signature and Adobe Update
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; today users have started noticing an error when opening digital
&lt;br&gt;&amp;gt;&amp;gt; signatures with itextsharp / bouncycastle.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; apparently adobe is pushing out an update for a critical bug fix.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; has anyone else noticed this problem?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; the error message is : Signer 2.16.840.1.101.3.4.2.1WITHRSA not
&lt;br&gt;&amp;gt;&amp;gt; recognised.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Aviso Legal:
&lt;br&gt;&amp;gt; Esta mensagem é destinada exclusivamente ao destinatário. Pode &amp;nbsp;
&lt;br&gt;&amp;gt; conter informação confidencial ou legalmente protegida. A incorrecta &amp;nbsp;
&lt;br&gt;&amp;gt; transmissão desta mensagem não significa a perca de &amp;nbsp;
&lt;br&gt;&amp;gt; confidencialidade. Se esta mensagem for recebida por engano, por &amp;nbsp;
&lt;br&gt;&amp;gt; favor envie-a de volta para o remetente e apague-a do seu sistema de &amp;nbsp;
&lt;br&gt;&amp;gt; imediato. É proibido a qualquer pessoa que não o destinatário de &amp;nbsp;
&lt;br&gt;&amp;gt; usar, revelar ou distribuir qualquer parte desta mensagem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Disclaimer:
&lt;br&gt;&amp;gt; This message is destined exclusively to the intended receiver. It &amp;nbsp;
&lt;br&gt;&amp;gt; may contain confidential or legally protected information. The &amp;nbsp;
&lt;br&gt;&amp;gt; incorrect transmission of this message does not mean the loss of its &amp;nbsp;
&lt;br&gt;&amp;gt; confidentiality. If this message is received by mistake, please send &amp;nbsp;
&lt;br&gt;&amp;gt; it back to the sender and delete it from your system immediately. It &amp;nbsp;
&lt;br&gt;&amp;gt; is forbidden to any person who is not the intended receiver to use, &amp;nbsp;
&lt;br&gt;&amp;gt; distribute or copy any part of this message.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) &amp;nbsp;
&lt;br&gt;&amp;gt; are
&lt;br&gt;&amp;gt; powering Web 2.0 with engaging, cross-platform capabilities. Quickly &amp;nbsp;
&lt;br&gt;&amp;gt; and
&lt;br&gt;&amp;gt; easily build your RIAs with Flex Builder, the Eclipse(TM)based &amp;nbsp;
&lt;br&gt;&amp;gt; development
&lt;br&gt;&amp;gt; software that enables intelligent coding and step-through debugging.
&lt;br&gt;&amp;gt; Download the free 60 day trial. &lt;a href=&quot;http://p.sf.net/sfu/www-adobe-com_______________________________________________&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/www-adobe-com_______________________________________________&lt;/a&gt;&lt;br&gt;&amp;gt; itextsharp-questions mailing list
&lt;br&gt;&amp;gt; itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
&lt;br&gt;powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
&lt;br&gt;easily build your RIAs with Flex Builder, the Eclipse(TM)based development
&lt;br&gt;software that enables intelligent coding and step-through debugging.
&lt;br&gt;Download the free 60 day trial. &lt;a href=&quot;http://p.sf.net/sfu/www-adobe-com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/www-adobe-com&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;itextsharp-questions mailing list
&lt;br&gt;itextsharp-questions@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/itextsharp-questions&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-Digital-Signature-and-Adobe-Update-tp22569056p25612191.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25546436</id>
	<title>How to crop overflowing text inside a PdfPCell (&quot;Fixed Height&quot; already tried)</title>
	<published>2009-09-24T02:09:52Z</published>
	<updated>2009-09-24T02:09:52Z</updated>
	<author>
		<name>notoriousxl</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I've succesfully represented a text label as a PdfPcell (see &lt;a href=&quot;http://www.nabble.com/How-to-insert-Text-in-a-given-position-with-the-given-font-td25434266.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/How-to-insert-Text-in-a-given-position-with-the-given-font-td25434266.html&lt;/a&gt;&amp;nbsp;). PdfPCell.FixedHeight and PdfPTable.TotalWidth are set. :)
&lt;br&gt;&lt;br&gt;Now, I've got a 24x250 cell (with Rotation = 90). If I insert a big text (for example, a text with Font.Size = 40), the text overflows the cell's borders.
&lt;br&gt;&lt;br&gt;How can I truncate it?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-crop-overflowing-text-inside-a-PdfPCell-%28%22Fixed-Height%22-already-tried%29-tp25546436p25546436.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25530575</id>
	<title>Re: Problem adding annotation for a rotated PDF</title>
	<published>2009-09-21T22:43:09Z</published>
	<updated>2009-09-21T22:43:09Z</updated>
	<author>
		<name>manojbamola</name>
	</author>
	<content type="html">&amp;nbsp;hi 
&lt;br&gt;&amp;nbsp;i have used the iTextSharp dll for adding pdf document but now i am not able to change the 
&lt;br&gt;font size of my document because may be its taking default fonsize from iTextSharp so kindly help me out 
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-adding-annotation-for-a-rotated-PDF-tp22286877p25530575.html" />
</entry>

</feed>
