Questions tagged [python-pdfkit]

84 questions
0
votes
1 answer

Pdfkit Html to pdf not working as expected in python

I am converting a html file to pdf using pdfkit library in python. This is what my page looks like in html And this is what I get after converting it to pdf. It puts "Summary" in the next line, but I want it in the same line. Here is my python…
hard coder
  • 5,449
  • 6
  • 36
  • 61
0
votes
0 answers

PDFkit - different page size on production machine

I have a Django project in which I generate PDF from HTML with PDFkit. On my local machine I see the pdf just fine but on production machine the generated pdf page is a little bigger. The html is correct and identical on both machines. The OSes…
alexarsh
  • 5,123
  • 12
  • 42
  • 51
0
votes
1 answer

How to get cookies from mechanize to use in pdfkit

Does anyone know how to get a cookie that I have logged into using mechanize browser, so that I can use those urls in pdfkit? I have looked around a bit, but can't manage to see how to get a cookie in the right format and pass it to pdfkit.from_url.
arias_JC
  • 549
  • 3
  • 15
0
votes
1 answer

I am creating a service to create PDF(say from html to PDF) using python.

Initially tried it using pdfkit, but it doesn't support @page so the styles which are given for printed documents are not included in the result. Can someone provide an alternative for the above issue? Thanks in advance.
Njan
  • 89
  • 6
0
votes
1 answer

Printing html to pdf not working as expected in neither pdfkit nor weasyprint

In the last week, I have been working in automating invoicing generation for an organization I support. The process is composed of 3 steps: generate invoice print invoice into pdf send invoice attached in an e-mail I'm having trouble in the second…
fernandosjp
  • 2,658
  • 1
  • 25
  • 29
0
votes
1 answer

Python to save webpages in pdf format

So, I have a list of webpages that I want to save as pdf. They are like http://nptel.ac.in/courses/115103028/module1/lec1/3.html. The list is very long that's why I am using python to automate the process. This is my code import pdfkit import…
Eular
  • 1,707
  • 4
  • 26
  • 50
0
votes
1 answer

Problems when using py2app to freeze a python script which uses pdfkit

I recently created an application using pdfkit that takes a keyword entered by the user and makes various internet searches using that keyword. It then uses pdfkit to generate pdf files of each of the separate searches and saves them to a…
Ruthus99
  • 492
  • 2
  • 10
  • 25
-1
votes
1 answer

How to set page size for a specific page

I am using pdfkit in Python to convert my Django template to PDF. I am going to generate a pdf with 3 pages and I need my last page size should be landscape. I tried with options parameter but couldn't find how to apply page_size for a specific…
kishore
  • 413
  • 1
  • 4
  • 20
-1
votes
3 answers

How to conserve the pdf layout after converting content from English to French using Python

I am working on a simple application which will help me to convert all my pdf files which have text in English to French text as pdf. I have worked on a simple proof of concept which helps me to iterate over the given file and convert all text into…
Bastin Robin
  • 907
  • 16
  • 30
1 2 3 4 5
6