pdf-generation

Print to PDF in a for loop

一个人想着一个人 提交于 2019-11-27 00:30:21
问题 I want to loop over a plot and put the result of the plot in a PDF . The following code is used to do this: What this does is loop 3 times and plot 3 different plots from the iris dataset. Then it should save it to the C:/ drive. The PDF files are created, but are corrupted. for(i in 1:3){ pdf(paste("c:/", i, ".pdf", sep="")) plot(cbind(iris[1], iris[i])) dev.off() } 回答1: To drawn lattice plots on the device, one needs to print the object produced by a call to one of the lattice graphics

Open Source HTML to PDF Renderer with Full CSS Support [closed]

和自甴很熟 提交于 2019-11-27 00:05:40
问题 I asked about getting iTextSharp to render a PDF from HTML and a CSS sheet before here but it seems like that may not be possible... So I guess I will have to try something else. Is there an open source .NET/C# library out there that can take HTML and CSS as input and render it correctly? I must reiterate... the library MUST be free and preferably something with a fairly liberal license. I'm working with basically no budget here. 回答1: I've always used it on the command line and not as a

Generate and design PDF with iTextSharp or similar [closed]

醉酒当歌 提交于 2019-11-26 23:24:46
问题 tl;dr : Basically I'm just wondering what is the best/easiest way to design a PDF document? Is it remotely legit to actually design a whole PDF document with iTextSharp with code(i.e not loading external files)? I want the final result to look similar to a webpage with various colours, borders, images and everything. Or do you have to rely on other documents like .doc, .html files to achieve a good design? Originally I thought that I would use HTML markup to generate a PDF, however seeing how

Why are PDF files different even if the content is the same?

左心房为你撑大大i 提交于 2019-11-26 23:24:10
问题 "There’s usually more than one way to create PDF documents that look like identical twins when opened in a PDF viewer. And even if you create two identical PDF documents using the exact same code, there will be small differences between the two resulting files. That’s inherent to the PDF format." i read this paragraph in "Itext in action-second edition".(p 17).Can anyone please explain me what kind of differences the author's talking about.and reason why pdf format has this defect if i may

HTML2PDF in PHP - convert utilities & scripts - examples & demos

喜你入骨 提交于 2019-11-26 23:17:25
问题 I have a quite complicated HTML/CSS layout which I would like to convert to PDF on my server. I already have tryed DOMPDF, unfortunately it did not convert the HTML with correct layout. I have considered HTMLDOC but I have heard that it ignores CSS to a large extent, so I suppose the layout would break apart with that tool too. My question therefor is - are there any online demos for other tools (like wkhtmltopdf i.e.) that I could use to verify how my HTML is converted? Before spending the

Html to pdf some characters are missing (itextsharp)

主宰稳场 提交于 2019-11-26 23:16:46
问题 I want to export gridview to pdf by using the itextsharp library. The problem is that some turkish characters such as İ,ı,Ş,ş etc... are missing in the pdf document. The code used to export the pdf is: protected void LinkButtonPdf_Click(object sender, EventArgs e) { Response.ContentType = "application/pdf"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.AddHeader("content-disposition", "attachment;filename=FileName.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache

Cannot create PDF document with 400+ pages on iOS

和自甴很熟 提交于 2019-11-26 23:13:50
问题 I am using the following pseudocode to generate a PDF document: CGContextRef context = CGPDFContextCreateWithURL(url, &rect, NULL); for (int i = 1; i <= N; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; CGContextBeginPage(context, &mediaBox); // drawing code CGContextEndPage(context); [pool release]; } CGContextRelease(context); It works very well with small documents ( N < 100 pages), but it uses too much memory and crashes if the document has more than about 400 pages

Save Open XML as PDF

只愿长相守 提交于 2019-11-26 23:07:22
问题 As part of an investigation into enterprise level server side document generation I have come across Open XML. For those that have used this, how successful were you? Would you recommend it? Can you save the OpenXML to PDF directly or would I need to make use of a 3rd party component? If a 3rd Party component is required, which one did you use and which one would you recommend? Thanks Gineer 回答1: The nice thing about the Office OpenXML is that it's the language of Microsoft Office -- if you

Example PDF language code which helps to study the official PDF specification? [closed]

房东的猫 提交于 2019-11-26 23:06:43
问题 I am trying to learn the PDF file format. To this end I downloaded Adobe's PDF specification file, which is huge. So to help me study the details of PDF, I want to follow its abstract explanations by looking in parallel at some real-world PDF files. For example, one idea was to create a PDF file (using LaTeX) which has only one page and as content even only one character, a . But when I open this PDF file in a hex editor (or in other tools that can show the internal PDF structure), there is a

problem implementing wicked pdf on heroku

十年热恋 提交于 2019-11-26 22:37:35
问题 I am using this guide for integrating wicked_pdf on heroku. But somehow it doesn't seem to work. I got the logs from heroku and its says this: Processing PdfController#get_pdf to pdf (for 115.248.175.50 at 2011-02-15 23:54:44) [GET] Parameters: {"format"=>"pdf", "action"=>"get_pdf", "id"=>"1", "controller"=>"pdf"} ***************WICKED*************** Rendering pdf/get_pdf RuntimeError (PDF could not be generated! /usr/ruby1.8.7/lib/ruby/1.8/open3.rb:73:in `exec': No such file or directory -