Questions tagged [pdfkit]

PDFKit is a PDF document generation library built on top of wkhtmltopdf to convert HTML+CSS to pdf using Webkit.

Project homepage

PDFKit is for creating PDFs using plain old HTML+CSS. Uses wkhtmltopdf on the back-end which renders HTML using Webkit.

PDFKit comes with a middleware that allows users to get a PDF view of any page on your site by appending .pdf to the URL.

Uses wkhtmltopdf on the back-end which renders HTML using Webkit.

1084 questions
6
votes
1 answer

Ruby On Rails : PdfKit Runtime Error

pdfkit gem successfully installed in my machine. Then I run gem install wkhtmltopdf-binary and output was Successfully installed wkhtmltopdf-binary-0.9.9.1 1 gem installed Installing ri documentation for wkhtmltopdf-binary-0.9.9.1... unable to…
user1563221
  • 371
  • 2
  • 7
  • 17
6
votes
1 answer

Rails development server, PDFKit and multithread

I have a rails app that uses PDFKit to render pdf versions of webpages. I use Thin as a development server. The problem is that when i'm in development mode. When I start my server with "bundle exec rails s" and I try to render any PDF the whole…
Rafa de Castro
  • 2,474
  • 1
  • 24
  • 44
5
votes
4 answers

How to install PDFKit? (Rails 3.2.1 and PDFKit 0.5.2)

I'm trying to use PDFKit. It looks fairly straightforward so I'm trying to follow Ryan's Rails cast. So I added the gem to my GemFile and updated my application.rb with: config.middleware.use "PDFKit::Middleware" After that I installed wkhtmltopdf…
Nicolas Guillaume
  • 8,160
  • 6
  • 35
  • 44
5
votes
1 answer

Store system-generated PDF on S3

Solved, see edit at bottom. In my 3.1 rails app I'm generating a pdf like this: def show @contributor = Contributor.find(params[:id]) respond_to do |format| format.pdf { html = render_to_string(:action => "show.html.erb") kit =…
snowangel
  • 3,452
  • 3
  • 29
  • 72
5
votes
2 answers

How to improve the HTML Table Styling that is to be converted into a PDF File

I have a Python code that is creating HTML Tables and then turning it into a PDF file. This is the output that I am currently getting This image is taken from PDF File that is being generated as result (and it is zoomed out at 55%) I want to make…
Awais Shahid
  • 117
  • 4
  • 15
5
votes
1 answer

Horizontally merge and divide cells in an HTML Table for Timetable based on the Data in Python File

Please note this question is an extension of this previously asked question: How to make Images/PDF of Timetable using Python I am working on a program that generates randomized Timetable based on an algorithm. For the Final Output of that program,…
Awais Shahid
  • 117
  • 4
  • 15
5
votes
1 answer

SwiftUI UIViewRepresentable PDFKit PDFView AttributeGraph: cycle detected through attribute

Edit: Created a sample project illustrating the issue: https://github.com/Harold-D/PDFView_Representable Question: I'm at a lost, I have this very simple UIViewRepresentable wrapper around PDFView in SwiftUI import PDFKit import SwiftUI struct…
DIJ
  • 347
  • 4
  • 19
5
votes
1 answer

Swift 5 - How to create table in PDF with PDFKit

I have information in UIGraphicsPDFRendererFormat with height 400 and I want to attach a table in it, but I need if the table is bigger than the page to create automatically new pages and continues with the table in the other pages. I found answers…
Bogdan Bogdanov
  • 882
  • 11
  • 36
  • 79
5
votes
2 answers

React JS + PDFKit

I am trying to understand how one might get PDF Kit working within React JS. My simple requirement is to render a file in the browser using ReactJS and PDFKit. Looking at the tutorials, there are references to a few options in which PDFKit can work…
Keaton Victor
  • 91
  • 1
  • 5
5
votes
1 answer

How to speed up wkhtmltopdf and pdfkit for long webpage with lots of photos

We are having wkhtmltopdf convert html that results in hundreds of pdf pages with hundreds of large photos, on a ec2 small instance this takes about 10 minutes per conversion. The time taken is definitely due to the large amount of photos, if taken…
Kalendae
  • 2,256
  • 1
  • 21
  • 23
5
votes
0 answers

pdfkit new line from_string or html does not work

I would like to find a way to line-break in pdfkit. I tried both with strings and html files but it does not work as expected. The following two minimal examples instead of providing me with 'a' (newline) 'b' generate 'a b'. I would appreciate your…
5
votes
1 answer

iOS PDFKit Disable vertical scroll bounce

How does one disable scroll bounce in a PDFView using PDFKit? The view where the PDF is shown doesn't have a scroll bounce option. Here's my code: if let path = Bundle.main.path(forResource: pdfObject, ofType: "pdf") { let url =…
Nicholas Farmer
  • 773
  • 7
  • 32
5
votes
1 answer

Add pagination for a pdfdocument ios swift

I have created a pdf document and displayed it in a PDFView using PDFKit.Is there any direct way to show the pages in the document as pagination.
Faheem Rahman
  • 343
  • 2
  • 10
5
votes
4 answers

How to eliminate PDFView "page shadow"?

When an iOS PDFView is added to a UIView, the PDFView's page area adds a shadow-like border. Is there a way to eliminate the shadow? I know a few messy ways to do this: Extend the bounds off-screen, overlay a white UIView to hide the shadows, or…
Mitch Cohen
  • 1,551
  • 3
  • 15
  • 29
5
votes
1 answer

PDFKIT IOS 11 A4 Size to Save Swift

I have one PDF Kit I want to save the File in A4 Size here is my code let newPagetxt = PDFPage(image:image!) let apdf = PDFDocument() apdf.insert(newPagetxt!, at:index) apdf.documentAttributes!["Title"] = …