Git Product home page Git Product logo

collective.sendaspdf's People

Contributors

avoinea avatar davidemoro avatar fredvd avatar giacomos avatar jean avatar mauritsvanrees avatar olimpiurob avatar vincent-psarga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

collective.sendaspdf's Issues

use updated URL for wkhtmltopdf downloads

Hello,

wkhtmltopdf has moved the downloads provider from SourceForge to gna.org. As mentioned in the linked message, all earlier downloads have been removed from SourceForge and you are strongly advised to migrate to the new URLs. The following files in your repository will need to be updated:

  • buildout.d/osx.cfg
  • buildout.d/base.cfg
  • .travis.yml

It is recommended to either subscribe to the mailing list or Twitter feed to receive updates on new releases and further changes.

Thanks,
wkhtmltopdf maintainer

Problem loading styles from https

This has worked fine for a long time as far as I know. But today downloading an https page as pdf misses all styles. Somehow the styles (plus presumably any images) cannot be loaded.

It may be due to this stackoverflow question: http://stackoverflow.com/questions/26529863/how-do-i-configure-wkhtmltopdf-to-request-https-pages-by-url-not-ip-on-windows-8

Possibly a recent openssl update on the server causes this, but that is a guess.

It does not matter whether wkhtmltopdf itself is running on the server that hosts the https website, or locally on my laptop. This gets executed:

parts/wkhtmltopdf/wkhtmltopdf --disable-javascript --toc-header-text Inhoudsopgave --margin-right 10 --margin-left 10 --margin-bottom 10 --margin-top 10 --print-media-type file:///tempfile.html /tmp/tempfile.pdf

Any https links in tempfile.html cannot be loaded. When I replace https with http, it works just fine:

cat tempfile.html | sed "s/https/http/g" > newfile.html

I tried just now with running wkhtmltopdf on https://google.com, but that looks fine. So there may be something wrongly configured on the server.

Workaround that I did on the server to fix it: I edited transforms/wk.py and in the html_to_pdf function I added a line source = source.replace('https://', 'http://'). (Yes, I did that by editing the collective.sendaspdf distribution on the server. I am bad.)

JS is not cookable

There's any motivation about the reason that the JavaScript source use:

  • compression="none"
  • cookable="False"

?

wkhtmltopdf 0.12.1 compatibility?

I'm trying to run collective.sendaspdf on a server with wkhtmltopdf 0.12.1 installed.

This fails because of the option "--toc-header-text", whose syntax has apparently changed. The exact same setup works fine on another server with wkhtmltopdf 0.9.9

I'm able to get it to work by simply dropping 'toc-header-text' from the variable 'valued_options' in transforms/wk.py. However, this doesn't seem very elegant and given this error string:

Please check that you use a version compatible with your OS and the version is 0.9.

should collective.sendaspdf be considered "locked" to wkhtml 0.9.*? Are there plans to support later versions like 0.12+ at some point?

`extract_from_url` URL parameter parsing breaks

This works:

(Pdb) extract_from_url('http://.../pgTimePrint/OpenBareForm?ref=562a&to_date=2013-12-31', context_url)
('OpenBareForm', {'ref': '562a', 'to_date': '2013-12-31'})

This does not:

(Pdb) extract_from_url('http://.../pgTimePrint/OpenBareForm?ref=562a&to_date=2013-12-31 00:00', context_url)
(None, None)

In the second case, the to_date parameter includes a time (00:00). The parsing chokes on the :.
It also chokes on urlencoded parameters, e.g.

(Pdb) extract_from_url('http://.../pgTimePrint/OpenBareForm?ref=562a&to_date=2013-12-31+00%3A00', context_url)
(None, None)

Perhaps extract_from_url could be changed to use urlparse.parse_qs instead of regex-parsing the URL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.