pdfkit

PDFKit framework available on the iPhone OS?

旧街凉风 提交于 2019-11-29 15:32:02
I'm curious to know whether the PDFKit framework is available for use within the iPhone OS, in order to build a PDF reader a bit more sophisticated than the one available by simply opening PDF documents with UIWebView. Just wondering if this is an option or not. The PDFKit is not available on iPhone at this time. Certainly the functionality is there, but Apple has not opened it up in an available framework. You should file a bug on this if you'd like to see it in the future. If you want more control over PDF, there are many ways to manipulate PDF content using Quartz graphics. Grab the

Printing Off-screen PDFViews

隐身守侯 提交于 2019-11-29 11:35:08
I have a situation where I want to print a multi-page PDF. While I could use the PDFKit utility classes and/or quartz functions to get the information to manually write drawing/pagination code for a NSView subclass, I had thought that quicker alternative would be to create an off-screen PDFView and tell it to print itself. When I tried this solution, the print dialog didn't go away, all of the print settings controls on the right half of the print dialog disappeared, and the application froze. I then wrote a tiny test application with the following method that illustrates the problem. When the

How to: output Euro symbol in pdfkit for nodejs

≡放荡痞女 提交于 2019-11-29 04:49:45
Is it possible to display the Euro symbol in pdfkit for nodejs without having to embed an external font? I am using pdfKit to generate invoices and would like to prefix my currency amounts with the Euro Symbol (€). I've tried a number of approaches and none worked: doc.font('Helvetica-Bold') .fontSize(12) .text('€', 10, 10); // Alt+0128 on keypad doc.font('Helvetica-Bold') .fontSize(12) .text('\u20AC', 10, 10); Turns out it is a font issue: unicode works, but you have to make sure that the font you are using includes the characters you want to use. Unlike your operating system, PDFKit does not

Wrong highlight annotation on apple PDFKit

99封情书 提交于 2019-11-29 02:46:07
I'm using PDFKit on iOS to highlight texts (PDF file). I do it by create a PDFAnnotation and add it to the selected text area. I want to highlight precisely the selected area but it always covers the whole line like the pics below. How can I create the annotation for the selected area only?? My code: let highlight = PDFAnnotation(bounds: selectionText.bounds(for: page), forType: PDFAnnotationSubtype.highlight, withProperties: nil) highlight.color = highlightColor page.addAnnotation(highlight) PDFSelection bounds(forPage:) method returns one rectangle to satisfy whole selection area. Is not the

Merging PDF Files in Cocoa

不问归期 提交于 2019-11-28 20:55:53
I would like to concatenate several PDF files to form one single PDF. Now I've come so far that I know, PDFKit is the proper way to go (I guess). But I am not sure, how to accomplish the merging. Should I have one PDFDocument and several PDFPage and then call insertPage on the PDFDocument ? Or is there a much simpler way? I dont want to alter the PDFs contetwise, I just want to merge them. Thanks a lot! As you indicated, you need one output PDFDocument object which will contain all pages of all input PDF files. To do so, you'll need to loop through all input files, create PDFDocument objects

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:

Wkhtmltopdf Characters in single line partially cut between pages

99封情书 提交于 2019-11-28 15:46:56
问题 I am working in a project using ruby on rails(3.1). My requirement is to produce pdf from the html content. So I use pdfkit gem. In some pages, characters in single line partially cut between pages. When I convert html convert to pdf using pdfkit gem version of wkhtmltopdf: wkhtmltopdf -- 0.11.0 rc1 operating system: Linux CentOS 5.5 In the image below showing character partially cut between pages. Please suggest a solution. Example 1 Example 2 回答1: I just ran across this and found something

PDFKit framework available on the iPhone OS?

和自甴很熟 提交于 2019-11-28 08:47:14
问题 I'm curious to know whether the PDFKit framework is available for use within the iPhone OS, in order to build a PDF reader a bit more sophisticated than the one available by simply opening PDF documents with UIWebView. Just wondering if this is an option or not. 回答1: The PDFKit is not available on iPhone at this time. Certainly the functionality is there, but Apple has not opened it up in an available framework. You should file a bug on this if you'd like to see it in the future. If you want

Printing Off-screen PDFViews

蹲街弑〆低调 提交于 2019-11-28 04:35:16
问题 I have a situation where I want to print a multi-page PDF. While I could use the PDFKit utility classes and/or quartz functions to get the information to manually write drawing/pagination code for a NSView subclass, I had thought that quicker alternative would be to create an off-screen PDFView and tell it to print itself. When I tried this solution, the print dialog didn't go away, all of the print settings controls on the right half of the print dialog disappeared, and the application froze

Can't create pdf using python PDFKIT Error : “ No wkhtmltopdf executable found:”

拈花ヽ惹草 提交于 2019-11-27 20:09:25
I tried installing pdfkit Python API in my windows 8 machine. I'm getting issues related to path. Traceback (most recent call last): File "C:\Python27\pdfcre", line 13, in <module> pdfkit.from_url('http://google.com', 'out.pdf') File "C:\Python27\lib\site-packages\pdfkit\api.py", line 22, in from_url configuration=configuration) File "C:\Python27\lib\site-packages\pdfkit\pdfkit.py", line 38, in __init__ self.configuration = (Configuration() if configuration is None File "C:\Python27\lib\site-packages\pdfkit\configuration.py", line 27, in __init__ 'https://github.com/JazzCore/python-pdfkit/wiki