pdf

Generate a pdf with images on header and footer with iText

烂漫一生 提交于 2021-01-29 09:57:52
问题 I am looking forward to create a pdf using iText. The pdf will have a header and a footer. Both the header and footer will have a image (company logo) in it. I am looking forward to an example similar to that. I will be using the iText library for the first time so I am not sure where to start off from. 回答1: To add headers and footers to a PDF you generate using iText 7.x, you will generally create event listeners for page starts and/or page ends and add the header and footer contents there

Why my levenshtein distance calculator fails with PDF file?

时光怂恿深爱的人放手 提交于 2021-01-29 09:44:14
问题 I'm trying to create a program that calculate edit distance between two files. I read with the funcution fread and I use the code to read binary ("rb"). I put in input two PDF files and during the debug I found out that when I try to fill the matrix of the Levenshtein distance algorithm I get a "SIGSEGV (Segmentation fault)" at char n° 1354 of the first file and the program exit with: Process finished with exit code -1073741819 (0xC0000005) I controlled and char n° 1354 is \n . The code that

Does Laravel Dompdf support subsetting otc fonts?

纵然是瞬间 提交于 2021-01-29 09:39:23
问题 I've been using vsmoraes dompdf for generating pdf and I use Arial unicode MS (.ttf) which work perfectly with font subsetting enabled. Since it's not free, I tried to move to Noto Sans. But I get a error when I enable font subsetting. .ttf works fine. But not .otc #message: "Undefined index: glyf" vsmoraes version - 1.0. Is there any laravel library that I can use which support font subsettings with .otc font type ? or is there any suggestions 来源: https://stackoverflow.com/questions/54461754

How do i compress a PDF in Flutter?

喜你入骨 提交于 2021-01-29 09:38:23
问题 I built an app for my university where students can access documents such as notes, question papers etc. in PDF format. I am using Firebase Storage for the back-end. I want to compress the PDF files client side. I thought of using ilovepdf.com's API but i'm not able to do that. Is there anyway to do that in dart? any package in flutter? Would be great if someone could help. Thanks. 回答1: You can use any file compression method, not just those specific to PDF. You could use the archive package,

Itext java digital signature text and border color and

为君一笑 提交于 2021-01-29 09:25:07
问题 Please let me know,how do we modify below text which appears above digital signature using java itext. Text is shown in black color in image. "Document certified by xyz" How do we change above text , color and font size ? Thanks 回答1: In comments you clarified that you use a deprecated option to make the PDF viewer display the validation result in the signature visualization. (Use of this option is strongly recommended against; in current PDF specifications - ISO 32000-2:2017 - it is forbidden

How to preview pdf using active storage and poppler?

柔情痞子 提交于 2021-01-29 09:24:08
问题 I'm trying to display a preview of the uploaded pdf in my application but all I get so far is a broken image. I have installed the poppler gem as suggested in the active storage presentation for preview. Then i tried different ways but all are returning a broken image. <%= link_to bank.rib, rails_blob_path(bank.rib, disposition: "preview") %> or <%= image_tag bank.rib %> or where ' rib ' being the attached file ( has_one ) of the model BankAccount (here bank = BankAccount.find(id) ) bank.rib

Filling PDF Fields with values in ASP.NET MVC 5

孤人 提交于 2021-01-29 09:00:26
问题 I want to fill an existing PDF file in my web application (developed in ASP.NET MVC 5). The PDF file has a field named "Text1". In this field I want to write the value "abc". I am currently trying to use PdfSharp for this purpose. This is how I am currently trying to set a value in a field in the PDF: var doc = PdfReader.Open(ControllerContext.HttpContext.Server.MapPath("~/Documents/test.pdf"), PdfDocumentOpenMode.Modify); doc.AcroForm.Fields["Text1"].ReadOnly = false; That was the

allow arabic text in pdf table using itext7 (xamarin android)

我只是一个虾纸丫 提交于 2021-01-29 07:11:07
问题 I have to put my list data in a table in a pdf file. My data has some Arabic words. When my pdf is generated, the Arabic words don't appear. I searched and found that I need itext7.pdfcalligraph so I installed it in my app. I found this code too https://itextpdf.com/en/blog/technical-notes/displaying-text-different-languages-single-pdf-document and tried to do something similar to allow Arabic words in my table but I couldn't figure it out. This is a trial code before I apply it to my real

How to apply round corner border to table (single page / multipage)?

夙愿已清 提交于 2021-01-29 06:16:37
问题 I want to apply round corner border to a table. This table is dynamic. That means it can grow up to multiple pages or can accommodate in single page. If table comes in single page, then outermost corner of all four corner cells should be drawn as rounded. If table grows up to multiple pages (say 3 pages), then outermost corner of all four corner cells should be drawn as rounded for all 3 pages. Here is the approach which I am using to implement the above scenario. public void createPdf(String

Print pdf in duplex mode From C#

ⅰ亾dé卋堺 提交于 2021-01-29 05:52:03
问题 I have a pdf file that I would like to print from my C# app. I was able to figure out in code if the printer is duplex capable but get the pdf to print in duplex from my code. Here is my code for regular simplex printing. I was able to check the metadata of the pdf's print dialog preset to duplex. but it does not work. string verbToUse = "PrintTo"; startInfo.Verb = verbToUse; startInfo.Arguments = workCenterPrinterName.Value.ToString(); Process p = Process.Start(startInfo); p.WaitForExit(5000