itextsharp

Removing Text based watermarks using itextsharp

£可爱£侵袭症+ 提交于 2021-02-05 11:10:56
问题 According to this post (Removing Watermark from PDF iTextSharp) , @mkl code works fine for ExGstate graphical watermarks but I have tested this code to remove watermark from some files which have Text based watermarks behind PDF contents (like this file : http://s000.tinyupload.com/index.php?file_id=05961025831018336372) I have tried multiple solutions that found in this site but get no success. Can anyone help to remove this watermark types by changing above @mkl solution? thanks 回答1: Just

Could not load file or assembly 'itextsharp' or one of its dependencies

只愿长相守 提交于 2021-02-05 07:01:07
问题 Trying to follow this tutorial for RazorPDF, and I don't know why am I getting the following error message: Very frustrated and tired. Error Message: Could not load file or assembly 'itextsharp' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) itextsharp: RunTimeVersion: v1.1.4322 Version: 4.1.2.0 RazorPDF: Run Time version: 4.0.30319 Inside the controller: public ActionResult Index() { var

Could not load file or assembly 'itextsharp' or one of its dependencies

断了今生、忘了曾经 提交于 2021-02-05 07:01:02
问题 Trying to follow this tutorial for RazorPDF, and I don't know why am I getting the following error message: Very frustrated and tired. Error Message: Could not load file or assembly 'itextsharp' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) itextsharp: RunTimeVersion: v1.1.4322 Version: 4.1.2.0 RazorPDF: Run Time version: 4.0.30319 Inside the controller: public ActionResult Index() { var

Assign Dynamic PdfPCell width to dynamically generated PdfPCell

狂风中的少年 提交于 2021-01-29 14:09:50
问题 I am using iTextSharp version 5.4.5.0. I am trying to print PdfPTable with Multiple PdfPCell. The Number of PdfPCell will be dynamic. So How can I assign width to the dynamically generated PdfPCell ? I know how to assign width to Static and Fixed number of Cell. But for Dynamic cell, how can I assign width to each of the dynamically generated Cells ? The Number of PdfPCell is not fixed. Please help me ? Thanks. 回答1: Even after some back and forth in comments to the original question, I am not

How to increase the accuracy of measurements in iTextSharp?

天大地大妈咪最大 提交于 2021-01-28 16:42:14
问题 I want to resize a pdf to a specific size, but when I use scaling it loses accuracy because a float rounds the value. Is there a way that I can resize a pdf with a given width and height? This is what I've tried so far: public void PDFScalingTest11(string FileIn, string FileOut) { // The following code opens a pdf and place it 20 times on a new pdf page // I want to resize the pdf before adding it int iQuantity = 20; int iCol = 3; int iRow = 0; float fTileSpacing = 0; float fPrintWidth =

.Net 对于PDF生成以及各种转换的操作

那年仲夏 提交于 2020-09-30 15:59:28
前段时间公司的产品,要做一个新功能,签章(就是把需要的数据整理成PDF很标准的文件,然后在盖上我们在服务器上面的章) 然后我就在百度上找了找,发现搞PDF的类库很少,要么就要钱,要么就有水印,破解版的没找到。 先讲一讲我是怎么生成PDF的 1、生成PDF   这里用到了 Spire.Pdf 这个类库可以在NuGet里面搜索到 ,上面带个小红标的就是免费版本。     当然也可以去他们的官网,上面还有文档( https://www.e-iceblue.cn/Introduce/Spire-PDF-NET.html )。   代码(这是我自己写的一个测试的表格)    public static void abc() { // 创建PDF文档 Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument(); // 添加一页 PdfPageBase page = doc.Pages.Add();      // 设置字体 PdfTrueTypeFont font = new PdfTrueTypeFont( new System.Drawing.Font( " Microsoft Yahei " , 20f), true ); PdfTrueTypeFont font1 = new PdfTrueTypeFont( new System