pdf-generation

HTML to PDF conversion using Chrome pdfium

北战南征 提交于 2019-11-28 21:19:51
Can anyone suggest how to convert HTML to PDF using chrome pdfium. Since, I tried pdf.js and few other, but It is not giving me a proper result. I think chrome pdfium handle them properly. So, I would like to give a try to pdfium for generating PDF file from HTML source. Thanks. PDFium (and PDF.js ) are merely PDF Viewers, you cannot convert HTML to PDF with them. The actual PDF generation in Chrome is done by the printing component using Blink (the rendering engine) and Skia (the graphic stack). There is an effort going on to decouple the printing functionality from the printing UI so that

Combine PDFs c#

旧巷老猫 提交于 2019-11-28 21:18:59
How can I combine multiple PDFs into one PDF without a 3rd party component? I don't think you can. Opensource component PDFSharp has that functionality, and a nice source code sample on file combining The .NET Framework does not contain the ability to modify/create PDFs. You need a 3rd party component to accomplish what you are looking for. As others have said, there is nothing built in to do that task. Use iTextSharp with this example code . AFAIK C# has no built-in support for handling PDF so what you are asking can not be done without using a 3rd party component or a COTS library. Regarding

Squared characters issue on wkhtmltopdf

▼魔方 西西 提交于 2019-11-28 21:05:50
I've installed wkhtmltopdf on Centos 5.5. (Since there was library issues, it's been 4 days). It's partly working now. I said partly because, all pdfs which was created by wkhtmltopdf include squares instead of text? What can I do? I've searched google, but I couldn't find anything. Appreciate your help. When I had the black squares issue I was able to solve it without installing X11 by installing the urw-fonts package. I was able to solve this problem using the following resource: http://code.google.com/p/wkhtmltopdf/wiki/static In short, you probably don't need to install the entire x11

Print PDF in Firefox

喜欢而已 提交于 2019-11-28 21:02:40
How to print a PDF in Firefox? This function works in Chrome but not in Firefox function print_pdf(url){ var id = 'iframe', html = '<iframe id="'+id+'" src="'+url+'" style="display:none"></iframe>'; $('#main').append(html); $('#'+id).load(function(){ document.getElementById(id).contentWindow.print(); } } error Error: Permission denied to access property "print" Firefox: Permission denied to access property "print" This is a bug in firefox . Locally it can be disabled by going to about:config and set the property of pdfjs.disabled to true. Only possible workaround is to use a server-side script

WPF to PDF

跟風遠走 提交于 2019-11-28 20:46:41
I have a WPF application and I want to be able to save the output of the application to a PDF document, the item I want to save can be a Visual a Drawing or a FixedDocument (I can create it as any of those options, and it's easy to convert between them). Is there any library that can convert directly from WPF to PDF (without writing code to walk the visual tree and recreate it using PDF primitives). If you got your WPF visual tree rendered in to XPS then try this XPS to PDF converter NIXPS . To get WPF content into XPS follow the directions found on Feng Yuan's blog: http://blogs.msdn.com

PHP create PDF invoice

与世无争的帅哥 提交于 2019-11-28 19:58:56
问题 Hi does anyone know how I can create a nicely formatted PDF invoice through PHP? Ideally I'm looking for something with a header and then an itemised listing of the products with some sort of table around. After a quick Google I would be comfortable with generating a PDF but to try and style it nicely would be another thing altogether. Thanks 回答1: I use TCPDF (see http://www.tcpdf.org/) for this: its pretty capable and not too painful to get setup. I will say that depending on your data

How to set a background color of a Table Cell using iText?

╄→гoц情女王★ 提交于 2019-11-28 19:58:16
问题 While it is of course possible to use BaseColor , by default, it offers very limited choices. I wonder how can i add my own custom color to the document? ... PdfPTable table = new PdfPTable(3); PdfPCell cell = new PdfPCell(new Phrase("some clever text")); cell.setBackgroundColor(BaseColor.GREEN); table.addCell(cell); ... 回答1: Lots of options. BaseColor color = new BaseColor(red, green, blue); // or red, green, blue, alpha CYMKColor cmyk = new CMYKColor(cyan, yellow, magenta, black); // no

pdfkit does not style pdfs

帅比萌擦擦* 提交于 2019-11-28 19:28:42
I have a rails 3.1 app that creates pdf documents using pdfkit, and everything works as specified, except for the fact that the generated pdfs don't have any styling. I am assuming that wkhtmltopdf doesn't have access to my stylesheets and that it is not a larger issue than that. Would anyone have a clue as to how you would allow access to these stylesheets? I have basically followed railscast #220 on the subject, however I have had to create a new initializer to get pdfkit to work with rails 3.1. This is the initializer that I had to use to get pdfkit to work with rails 3.1 ActionController:

How to get a snapshot of UITableView in a PDF format

家住魔仙堡 提交于 2019-11-28 19:24:02
问题 I have a UITableView which is populated with some data but since it contains data that is more cells than the viewable area of the screen, I only managed to get only the snapshot of it, I want to know if there is any other way I can get the whole tableview snapshot in pdf..this is what I have tried thanks - (IBAction)clickMe:(id)sender { UIView *viewToRender = self.myTableView; CGPoint contentOffset = self.myTableView.contentOffset; UIGraphicsBeginImageContext(viewToRender.bounds.size);

Google Docs viewer returning 204 responses, no longer working, alternatives?

女生的网名这么多〃 提交于 2019-11-28 18:57:02
UPDATE 2016-11-16 9:53am EST It appears many people are still seeing 204 responses even though Google has claimed to have "fixed" the problem. When I myself tested the loading of a document 50 times, 3 of those times Google returned a 204 response. Please visit this URL and post a comment of your unhappiness so that we can finally get Google to address and fix the issue once and for all: https://productforums.google.com/forum/?utm_medium=email&utm_source=footer#!msg/docs/hmj39HMDP1M/SR2UdRUdAQAJ UPDATE 2016-11-04 6:01pm EST It looks like the service is up and working again! Thanks to Google