pdf

File size increases when converting an html file to adobe pdf using google apps script

。_饼干妹妹 提交于 2021-02-08 06:45:48
问题 For some reason, when converting an HTML file to a PDF in Google Apps Script, the file size of the PDF ends up being way bigger than the original HTML file. The code I used to run the test is below: function convertHTMLtoPDF() { // convert a specific message with an attached HTML file to PDF, // and save it to the root directory of Google Drive var threads = GmailApp.search('subject:(Sample HTML)'); var message = threads[0].getMessages()[0]; var attachmentName = message.getAttachments()[0]

iTextSharp Read Text From Single Layer of PDF

孤者浪人 提交于 2021-02-08 06:32:06
问题 Currently I am using a custom LocationTextExtractionStrategy to extract text from a PDF that returns a TextRenderInfo[]. I would like to be able to determine if a TextRenderInfo object (or PDFString, child of TextRenderInfo) appears in a specific layer. I am not sure if this is possible. To get the layers in a PDF, I am using: Dictionary<string,PdfLayer> layers; using (var pdfReader = new PdfReader(src)) { var newSrc = Path.Combine(["new file location"]); using (var stream = new FileStream

Open PDF at specific page with Qt WebEngineView

隐身守侯 提交于 2021-02-08 05:57:35
问题 I want to create a simple PDF Viewer inside my Qt Application. Everything works fine, accept opening the PDF at a specific page over the URL. For example: url = "file:///D://Repo//PdfViewer//PdfViewer//test.pdf"; Works, but url = "file:///D://Repo//PdfViewer//PdfViewer//test.pdf#page=9"; dosent. I read somewhere, that chrome dosent offically support #page=x anymore, but I cant find futher information how to solve this. I face the same problem with this url in the Nano-Browser Example from Qt.

How can I inject a dynamically generated image (barcode, as it happens) into a PDF document (I'm in rails if that matters)?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 04:57:05
问题 I'm aware of pdf-stamper, but I'm trying to avoid switching everything to jruby right now. I just need to "stamp" an image that I generate within the rails app (a PDF417 barcode) into a form field in the PDF document (there's an FDF; it's a document template kinda thing). I'm filling out the text-based fields by just shelling out to pdftk, so if there's a way to do it using pdftk, I'd be fine with that, but I've looked high and low for one without any luck. 回答1: How about using a barcode font

Attach digital signature to pdf using mssp

回眸只為那壹抹淺笑 提交于 2021-02-08 04:42:03
问题 I am trying to sign pdf document digitally and need to attach signature to signature panel using MSSP(mobile signature service provider). I researched some stackoverflow questions and i did things as below. First i create checksum of pdf. Before generate the checksum add empty signature to pdf. After i generated the checksum i send that as data to sign document to the server. The server gives to me base64 signature and i found certificate chain from base64 signature. Now i need to attach

Attach digital signature to pdf using mssp

家住魔仙堡 提交于 2021-02-08 04:41:12
问题 I am trying to sign pdf document digitally and need to attach signature to signature panel using MSSP(mobile signature service provider). I researched some stackoverflow questions and i did things as below. First i create checksum of pdf. Before generate the checksum add empty signature to pdf. After i generated the checksum i send that as data to sign document to the server. The server gives to me base64 signature and i found certificate chain from base64 signature. Now i need to attach

Search and replace for text within a pdf, in Python

这一生的挚爱 提交于 2021-02-07 20:30:45
问题 I am writing mailmerge software as part of a Python web app. I have a template called letter.pdf which was generated from a MS Word file and includes the text {name} where the resident's name will go. I also have a list of c. 100 residents' names. What I want to do is to read in letter.pdf do a search for "{name}" and replace it with the resident's name (for each resident) then write the result to another pdf. I then want to gather all these pdfs togetherinot a big pdf (one page per letter)

iOS PDFkit cannot add custom attribute to pdf document

寵の児 提交于 2021-02-07 20:25:34
问题 I am trying to add custom attribute to a pdf document metadata, but after savedocument(document) the custom attribute is not added to the document. @IBOutlet weak var pdfContainerView: PDFView! private func setDocumentAttributes(){ if let document = pdfContainerView.document{ var attributes = document.documentAttributes attributes!["NewAttribute"] = "Test" document.documentAttributes = attributes savedocument(document) } } 来源: https://stackoverflow.com/questions/54986089/ios-pdfkit-cannot-add

Accessing “alternate text” for an image via PDFBox

巧了我就是萌 提交于 2021-02-07 20:02:15
问题 Is there some way to extract "alternate text" for a specific image using PDFBox? I have a PDF file which, as described at http://www.w3.org/WAI/GL/2011/WD-WCAG20-TECHS-20110621/pdf.html#PDF1, has had alternate text added to an image. Using PDFBox I can find my way through the object model to the image itself (a PDXObjectImage) through PDFDocument.getDocumentCatalog().getAllPages() [iterator] .getResources.getImages() but I can not see any way to get from the image itself to the alternate text

Accessing “alternate text” for an image via PDFBox

匆匆过客 提交于 2021-02-07 20:00:57
问题 Is there some way to extract "alternate text" for a specific image using PDFBox? I have a PDF file which, as described at http://www.w3.org/WAI/GL/2011/WD-WCAG20-TECHS-20110621/pdf.html#PDF1, has had alternate text added to an image. Using PDFBox I can find my way through the object model to the image itself (a PDXObjectImage) through PDFDocument.getDocumentCatalog().getAllPages() [iterator] .getResources.getImages() but I can not see any way to get from the image itself to the alternate text