itextsharp

How to insert files into folders of an existing PDF portfolio with folders using iTextsharp

余生颓废 提交于 2020-01-22 16:09:13
问题 Using the answers in How to merge PDFs into a PDF Portfolio?, I've been able to create an PDF portfolio using iTextSharp. However, using Adobe Acrobat I'm able to create folders, and I'm able to put files in those folders. How do I create folders and how do I put files in those folders in a PDF portfolio using iTextSharp? I've tried using a pdf inspector program to see the differences between a portfolio with and without folders, but I haven't been able to see any. I guess I'm looking in the

iTextSharp-generated PDFs cause save dialog when closing

扶醉桌前 提交于 2020-01-22 02:11:08
问题 I am using iTextSharp to generate PDF documents, and save them to disk like this: Document document = new Document(PageSize.LETTER, 50, 50, 80, 50); FileStream fs = new FileStream(Ruta, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite); PdfWriter PDFWriter = PdfWriter.GetInstance(document, fs); EsquemaFormato PageEventHandler = new EsquemaFormato(); PageEventHandler.Title = TitleMiddle; PageEventHandler.TitleHeaderFont = FontFactory.GetFont(BaseFont.HELVETICA, 12, Font.NORMAL)

iTextSharp generate PDF and show it on the browser directly

99封情书 提交于 2020-01-21 08:40:07
问题 How to open the PDF file after created using iTextSharp on ASP.Net? I don't want to save it on the server, but directly when the new PDF is generated, it shows on the browser . Is it possible to do that? Here is the example for what I mean: Click here . But on this example, the file directly downloaded. How can I do that? Dim doc1 = New Document() 'use a variable to let my code fit across the page... Dim path As String = Server.MapPath("PDFs") PdfWriter.GetInstance(doc1, New FileStream(path &

How can I prefill a PDF form with iTextSharp while still having it be editable and saveable in Adobe Reader by other users?

别等时光非礼了梦想. 提交于 2020-01-17 04:36:06
问题 Right now I have a form template that has some fields that are prefilled from a database using the iTextSharp library. Users will then fill in the rest of the fields and save the filled out forms. I'll then extract the data and put it in the database. Currently I am able to create the PDFs and they are pre-filling just fine. I'm even able to edit and save them in Adobe Reader on my computer. However I'm finding when anyone else opens those same files, they're not allowed to save the forms.

How to add/project iTextSharp vectors

你说的曾经没有我的故事 提交于 2020-01-17 01:32:07
问题 The Question The PDF toolkit iText(Sharp) has its own vector type, implementing Substract , Dot product Cross product and Multiply , but I do not see an addition of vectors nor a projection of one vector onto antother. Is there a simple way to do that? The context I am implementing an ITextExtractionStrategy that collects text into chunks ( class MyTextChunk ) if they are on the same line renderInfo.GetBaseline() follow closely to avoid concatenating texts from different columns in a table

Write a GridView to a .pdf file

ぐ巨炮叔叔 提交于 2020-01-16 23:16:31
问题 I am trying to write a GridView, gv to a .pdf file. Having problems with pdfDoc. Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment;filename=Export.pdf") Response.Cache.SetCacheability(HttpCacheability.NoCache) Dim sw As New StringWriter() Dim hw As New HtmlTextWriter(sw) Dim frm As New HtmlForm() gv.Parent.Controls.Add(frm) frm.Attributes("runat") = "server" frm.Controls.Add(gv) frm.RenderControl(hw) Dim sr As New StringReader(sw.ToString()) Dim

Write a GridView to a .pdf file

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-16 23:13:11
问题 I am trying to write a GridView, gv to a .pdf file. Having problems with pdfDoc. Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment;filename=Export.pdf") Response.Cache.SetCacheability(HttpCacheability.NoCache) Dim sw As New StringWriter() Dim hw As New HtmlTextWriter(sw) Dim frm As New HtmlForm() gv.Parent.Controls.Add(frm) frm.Attributes("runat") = "server" frm.Controls.Add(gv) frm.RenderControl(hw) Dim sr As New StringReader(sw.ToString()) Dim

itextsharp ARIALUNI.TTF copy on hosting server

那年仲夏 提交于 2020-01-16 19:17:29
问题 My application is MVC4 c#, I am using itextsharp to generate PDF files. To print special characters ≥, I use: string ARIALUNI_TFF = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "ARIALUNI.TTF"); var bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); var f = new Font(bf, 10, Font.NORMAL); When I published the application on a shared hosting server, got this error: C:\Windows\Fonts\ARIALUNI.TTF not found as file or resource. Copied the

itext or itextsharp - move text in an existing PDF

旧城冷巷雨未停 提交于 2020-01-16 05:25:23
问题 my goal is to move text in a PDF around, which is within a certain rectangular area. There is an existing Item on stackoverflow, which already got me close to achiving this: iText or iTextSharp rudimentary text edit However, I would be back at manipulating the PDF on a very basic level. Is there a chance to use higher level facilities of itext to alter the position of the text? I'm afraid there is no simple solution, but I'd be happy to get some suggestions. PS: Also keep in mind that I want

iTextSharp extracts wrapped cell contents into new lines - how do you identify to which column a given wrapped piece of data belongs now?

无人久伴 提交于 2020-01-16 05:07:21
问题 I am using iTextSharp to extract data from pdfs. I stumbled across the following problem, depicted by the scenario below: I created a sample excel file to illustrate. Here is what it looks like: I convert it to a pdf, using one of the many free online converters available out there, which generates a pdf looking like (when I generated the pdf I did not apply the styling to the excel): Now, using iTextSharp to extract the data from the pdf, returns me the following string as the data extracted