pdf

How to convert a PDF into JPG with commandline in linux?

非 Y 不嫁゛ 提交于 2020-06-10 11:05:30
问题 What are fast and reliable ways converting a PDF into a (single) JPEG using linux commandline? 回答1: You can try imagemagick repository and then convert utility: $ sudo apt-get install imagemagick $ convert input.pdf output.jpg And alternatively other syntax depends on linux distribution. 回答2: Convert from imagemagick seems do a good job: convert file.pdf test.jpg and in case multiple files were generated: convert test-0.jpg --append test-1.jpg ... --append one.jpg to generate a single file,

Converting HTML to PDF using iText

橙三吉。 提交于 2020-06-09 05:37:38
问题 I am posting this question because many developers ask more or less the same question in different forms. I will answer this question myself (I am the Founder/CTO of iText Group), so that it can be a "Wiki-answer." If the Stack Overflow "documentation" feature still existed, this would have been a good candidate for a documentation topic. The source file: I am trying to convert the following HTML file to PDF: <html> <head> <title>Colossal (movie)</title> <style> .poster { width: 120px;float:

Export a .NET WinForms Form to PDF?

佐手、 提交于 2020-06-08 15:15:12
问题 I have a .NET WinForms containing a few user controls. these controls usually contain either a RichTextBox or similar text controls (also 3rd party grid, XtraGrid suite, but those have the feature i want). I want to export the form the same way it looks to a PDF document. I've seen several libraries and general PDF creation features but im completely confused as to what i need exactly. If anyone has any suggestions how to do the scenario I'm talking about, I'd appreciate the help and personal

Download PDF file and save in document directory

不问归期 提交于 2020-06-08 07:53:32
问题 I have the following code that allows me to download a PDF file from a URL, it works correctly: class ViewController: UIViewController { @IBOutlet weak var progressView: UIProgressView! override func viewDidLoad() { let _ = DownloadManager.shared.activate() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) DownloadManager.shared.onProgress = { (progress) in OperationQueue.main.addOperation { self.progressView.progress = progress } } } override func

Pandoc md to pdf: keep order when inserting image before pagebreak

倾然丶 夕夏残阳落幕 提交于 2020-05-31 06:11:54
问题 as the title states, my question is about pandocs md to pdf. When I convert a markdown like # Title ...... text that is about a 3/4 page ![image that is too large to fit page](image.png) Some more text then the text after the image "some more text" is displayed on the first page and the image gets pushed to the second page, which changes the order of my content. What i can do is something like # Title ...... text that is about a 3/4 page \newpage ![image that is too large to fit page](image

Pandoc md to pdf: keep order when inserting image before pagebreak

别来无恙 提交于 2020-05-31 06:11:22
问题 as the title states, my question is about pandocs md to pdf. When I convert a markdown like # Title ...... text that is about a 3/4 page ![image that is too large to fit page](image.png) Some more text then the text after the image "some more text" is displayed on the first page and the image gets pushed to the second page, which changes the order of my content. What i can do is something like # Title ...... text that is about a 3/4 page \newpage ![image that is too large to fit page](image

Merging PDFs while retaining custom page numbers (aka pagelabels) and bookmarks

偶尔善良 提交于 2020-05-30 08:12:26
问题 I'm trying to automate merging several PDF files and have two requirements: a) existing bookmarks AND b) pagelabels (custom page numbering) need to be retained. Retaining bookmarks when merging happens by default with PyPDF2 and pdftk, but not with pdfrw. Pagelabels are consistently not retained in PyPDF2, pdftk or pdfrw. I am guessing, after having searched a lot, that there is no straightforward approach to doing what I want. If I'm wrong then I hope someone can point to this easy solution.

Merging PDFs while retaining custom page numbers (aka pagelabels) and bookmarks

妖精的绣舞 提交于 2020-05-30 08:12:07
问题 I'm trying to automate merging several PDF files and have two requirements: a) existing bookmarks AND b) pagelabels (custom page numbering) need to be retained. Retaining bookmarks when merging happens by default with PyPDF2 and pdftk, but not with pdfrw. Pagelabels are consistently not retained in PyPDF2, pdftk or pdfrw. I am guessing, after having searched a lot, that there is no straightforward approach to doing what I want. If I'm wrong then I hope someone can point to this easy solution.

TCPDF convert inline SVG with html into PDF

二次信任 提交于 2020-05-29 17:18:27
问题 I am using TCPDF to convert html into PDF. $pdf = new TCPDF(); $pdf->SetPrintHeader(false); $pdf->SetPrintFooter(false); $pdf->AddPage(); $html = '<div>Some random html </div>'; $pdf->writeHTML($html, true, false, true, false, ''); $pdf->Output('/pdf/output.pdf','F'); It works like a charm. But I have a case when (Dynamic) html has SVG inline code also. So I need to convert this html which has SVG into PDF. But it does not work. Below is my code. $pdf = new TCPDF(); $pdf->SetPrintHeader(false

Writing full csv table to PDF in Python

蹲街弑〆低调 提交于 2020-05-29 07:18:33
问题 I have a python script that writes text message data from a .csv file to a table in a PDF using reportlab platypus. It only writes the last line of the table into the cell. It ignores all other rows before this point. The only line it writes into the PDF is the last line shown in the excel snip highlighted in yellow. A snippet is also included of what it looks like when it writes it to the PDF as shown. It also creates the PDF in three or four pages inferring that it is trying to make space