pdf

Split PDF into chunks by page range in Php

自闭症网瘾萝莉.ら 提交于 2021-02-05 09:40:02
问题 so after browsing through many packages like TCPDF, FPDP, DOM2PDF and many other excellent php pdf packages, I couldn't find this feature in any packages where it allows to split the pdf file by page range. for example I want to split the pdf from page 20-100 or 30-50. or create a pdf from a pdf ranging from page 20-100. so is there any library that has this feature ? 回答1: PDFMerger has this functionality, and I personally enjoy its simplicity. $pdf = new PDFMerger; $pdf->addPDF('pdf1.pdf',

Using iText 7, what's the proper way to export a Flate encoded image?

北慕城南 提交于 2021-02-05 08:19:47
问题 I am trying to create code to export out the images within a PDF using iText Version 7.19. I'm having some issues with Flate encoded images. All the Flate encoded images from the Microsoft free book I'm using as an example (see Moving to Microsoft Visual Studio 2010) always coming out pink and depending upon how I try to copy the bytes they can come out distorted. If I attempt to copy all the image bytes at once (see the SaveFlateEncodedImage2 method in the code below), they come out

Ghostscript On windows leads to Invalid option for -dPDFSETTINGS

ぃ、小莉子 提交于 2021-02-05 07:45:08
问题 To solve my problem here with compressing/down-sizing a PDF file generated by MikTeX on Windows, I am trying this bash script on Cmder as: shrinkpdf.sh in.pdf > out.pdf However I get the error: Invalid value for option -dPDFSETTINGS=C:/Program Files/Git/screen, use -sNAME= to define string constants which I suppose has to do with the line -dPDFSETTINGS=/screen I would appreciate it if you could help me know what is the problem and how I can solve it. My environment is: Windows OS: 1809 Cmder:

Ghostscript On windows leads to Invalid option for -dPDFSETTINGS

断了今生、忘了曾经 提交于 2021-02-05 07:45:06
问题 To solve my problem here with compressing/down-sizing a PDF file generated by MikTeX on Windows, I am trying this bash script on Cmder as: shrinkpdf.sh in.pdf > out.pdf However I get the error: Invalid value for option -dPDFSETTINGS=C:/Program Files/Git/screen, use -sNAME= to define string constants which I suppose has to do with the line -dPDFSETTINGS=/screen I would appreciate it if you could help me know what is the problem and how I can solve it. My environment is: Windows OS: 1809 Cmder:

Prevent user from printing/saving PDF file in C#

别来无恙 提交于 2021-02-05 07:24:26
问题 I am writing an application that views PDF files, this application uses AxAcroPDFLib AxAcroPDF My problem here is that I want to prevent user from saving and/or printing PDF files that are being viewed in my application Or in other words I want to hide toolbar of the PDF viewer any ideas ?! Thanx in advance 回答1: I solved the problem by using another plugin to view PDF files PDF Viewer 回答2: You can able to hide the toolbar by axAcroPDF1.setShowToolbar(false); 来源: https://stackoverflow.com

Reducing file sizes of PDFs created using matplotlib by changing font embedding

不羁的心 提交于 2021-02-04 19:42:26
问题 I'm using matplotlib to produce PDF figures. However, even the simplest figures produce relatively large files, the MWE below produces a file of almost 1 MB. I've become aware that the large file size is due to matplotlib fully embedding all the used fonts. Since I'm going to produce quite a few plots and would like to reduce the file sizes, I'm wondering: Main question: Is there a way to get matplotlib to embed font subsets instead of the complete fonts? I would also be fine with not

Chrome 77 Not Auto-Printing PDFs

泄露秘密 提交于 2021-02-04 17:46:22
问题 Chrome 77 has stopped respecting the print() embedded JS in PDFs to initiate/open the print dialog after a PDF has been loaded. For example, open the below file in Firefox, Chrome 76, or in Acrobat and you'll see the print dialog appear. In Chrome 77 it is no longer appearing. Specifically, in my case and on three other computers I tested this on, version 77.0.3865.75. https://cdn.dealrcloud.com/assets/test/Invoice-1003.pdf Is this a new setting we can adjust/modify or is this a permanent

Footer in pdf with iTextSharp

点点圈 提交于 2021-02-04 16:46:18
问题 I'm trying to add a footer in every page of a PDF document. I want to have a name and the current date. I'm using this code, but it's only printing in the last page. I need it in every page. What am I missing here? DateTime horario = DateTime.MinValue; document.Add(new iText.Paragraph(document.BottomMargin, "TEST FOOTER" + horario)); 回答1: I manage to fix doing this. In my class that create the pdf i add this line. pdfWriter.PageEvent = new PDFFooter(); and i created another class called

PDF to Github Flavored Markdown

社会主义新天地 提交于 2021-02-04 12:29:05
问题 I have a project description in PDF and I will be quite happy if I can somehow manage to preview it in github website rather than clicking "View Raw" and downloading it. I thought there could be a converter from pdf to github flavored markdown yet found none. To state again, my input is a pdf file and my desired output is the preview the contents of the pdf in github website without downloading it. 回答1: Update March 2015: "PDF Viewing"! Simply browse to a PDF document and we'll render it in

PDF to Github Flavored Markdown

天大地大妈咪最大 提交于 2021-02-04 12:27:02
问题 I have a project description in PDF and I will be quite happy if I can somehow manage to preview it in github website rather than clicking "View Raw" and downloading it. I thought there could be a converter from pdf to github flavored markdown yet found none. To state again, my input is a pdf file and my desired output is the preview the contents of the pdf in github website without downloading it. 回答1: Update March 2015: "PDF Viewing"! Simply browse to a PDF document and we'll render it in