itextsharp

itextsharp postscript to PDF

不想你离开。 提交于 2019-12-02 06:24:20
Is it possible to use itextsharp to convert postscript to a PDF ? If not is there another way to do it in .net ? Converting PostScript to PDF is called "distilling". iText and iTextSharp do not support distilling. Ghostscript will be your only FOSS solution. You could use Ghostscript as it's explained here: http://hi.baidu.com/lqyidxa_igfv/blog/item/df2037b394539fa0d9335a94.html 来源: https://stackoverflow.com/questions/4970511/itextsharp-postscript-to-pdf

Add alternative text for an image in tagged pdf (PDF/UA) using iText

雨燕双飞 提交于 2019-12-02 06:18:53
I've looked up some documentations and examples under the http://developers.itextpdf.com/examples . I know iText is able to generate tagged pdf from scratch, but is it possible to insert alternative text to images in an existing tagged pdf (without changing anything else)? I need to implement this feature in a program without using GUI applications (such as Adobe Acrobat Pro). Thanks. Please take a look at the AddAltTags example. In this example, we take a PDF with images of a fox and a dog where the Alt keys are missing: no_alt_attribute.pdf Code can't recognize a fox or a dog, so we create a

Download multiple pdf documents using itextsharp

狂风中的少年 提交于 2019-12-02 06:11:42
i have a tree view in which there are certain set of document list and another grid having patient details. what i need to do is when we select docs from treeview (select multiple..checkbox enabled) and patients from grid and click on a button should create all the documents using ITEXTSHARP.that is multiple documents are created. I tried it like this, on button click foreach( TreeNode node in TreeView1.Nodes) { if (node.ChildNodes.Count>0) { for(int i=0 ;i<(node.ChildNodes.Count);i++) { if (node.ChildNodes[i].Checked==true) { string nodevalue = node.ChildNodes[i].Value.ToString(); if

How can I lock a PDF document after signing it?

偶尔善良 提交于 2019-12-02 06:06:44
Adobe Acrobat has the option to lock the PDF document after signing it. This changes the document permissions so that Acrobat does not offer signing the document again or modifying annotations or forms. This seems like a reasonable action to do after a document has been signed for review by multiple entities and finally for release by someone responsible. iTextSharp can also sign documents, and it can also add further signatures to an already signed document. iTextSharp basically also can set the document's permissions, but somehow I can't get it to set the same permissions as Acrobat X Pro

Cannot get CSS to work in iTextSharp (5.4.3) when making pdf

跟風遠走 提交于 2019-12-02 06:00:43
I have a problem trying to apply a css file to my pdf using the iTextSharp (5.4.3) generation library. basically the css is not being applied at all. I have the following method in my vb.net file Protected Sub btnPreview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPreview.Click Dim bytes As Byte() bytes = System.Text.Encoding.UTF8.GetBytes(letterRadEdit.Content) Dim tagProcessor As tool.xml.html.DefaultTagProcessorFactory() Using input As New MemoryStream(bytes, False) Dim ms As New MemoryStream() Dim document As New iTextSharp.text.Document(iTextSharp.text.PageSize

How to keep original rotate page in itextSharp (dll)

坚强是说给别人听的谎言 提交于 2019-12-02 05:57:52
i would like create the project, reading from Excel and write on pdf and print this pdf. From Excel file (from cell) read directory where is original pdf on computer or server, and next cell have info what write on the top in second pdf. And problem is here, original pdf is horizontal, landscape, rotate and my program create copy from original pdf and write info from excel on the top on copy pdf file. But pdf which is landscape is rotate for 270 deegres. This is no OK. For portrait rotation working program OK, copy OK and write on the top of the copy is OK. Where is my problem in my code. Code

Set all PDF Fields to ReadOnly

你离开我真会死。 提交于 2019-12-02 05:52:25
问题 In iTextSharp is there a way to set ALL fields on a form to read only? Currently I'm setting each one individually which is a pain like... formFields.SetFieldProperty( "Applicant.Phone", "setfflags", PdfFormField.FF_READ_ONLY, null ); formFields.SetFieldProperty( "Applicant.SSN", "setfflags", PdfFormField.FF_READ_ONLY, null ); etc. 回答1: Can't you do something like this: foreach (DictionaryEntry de in pdfReader.AcroFields.Fields) { formFields.SetFieldProperty(de.Key.ToString(), "setfflags",

Align AcroFields in java

怎甘沉沦 提交于 2019-12-02 05:16:44
问题 I'm using iTextSharp to populate the data to PDF Templates, which is created in OpenOffice. it populating fine, I'm getting proper PDF. In that PDF some where summary will come, that place i want align that text against the Template. I'm doing below code but it does not work. fields.setFieldProperty(fieldName, "fflags", PdfFormField.Q_LEFT, null); Please Help. Thanks. 回答1: Assuming that you have a pure AcroForm and not a hybrid form as I indicated in my comment, this is how you change the

Change Background Image in Itext to watermark or alter opacity c# ASP.net

﹥>﹥吖頭↗ 提交于 2019-12-02 05:14:40
I want to make my background image in iText transparent here is my code for the image: string root = Server.MapPath("~"); string parent = Path.GetDirectoryName(root); string grandParent = Path.GetDirectoryName(parent); string imageFilePath = parent + "/Images/logo.png"; iTextSharp.text.Image jpg = iTextSharp.text.Image.GetInstance(imageFilePath); jpg.ScaleToFit(1700, 800); jpg.Alignment = iTextSharp.text.Image.UNDERLYING; jpg.SetAbsolutePosition(100, 250); jpg.ScaleAbsoluteHeight(500); jpg.ScaleAbsoluteWidth(500); Any idea? Please take a look at the BackgroundTransparant example. It is a

PDF Merging by ItextSharp

倾然丶 夕夏残阳落幕 提交于 2019-12-02 04:41:24
How would I merge several pdf pages into one with iTextSharp which also supports merging pages having form elements like textboxes , checkboxes , etc. I have tried so many by googling, but nothing has worked well. Jonathan See my answer here Merging Memory Streams . I give an example of how to merge PDFs with itextsharp. For updating form field names add this code that uses the stamper to change the form field names. /// <summary> /// Merges pdf files from a byte list /// </summary> /// <param name="files">list of files to merge</param> /// <returns>memory stream containing combined pdf<