{"action":"created","issue":{"url":"https://api.github.com/repos/JazzCore/python-pdfkit/issues/93","repository_url":"https://api.github.com/repos/JazzCore/python-pdfkit","labels_url":"https://api.github.com/repos/JazzCore/python-pdfkit/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/JazzCore/python-pdfkit/issues/93/comments","events_url":"https://api.github.com/repos/JazzCore/python-pdfkit/issues/93/events","html_url":"https://github.com/JazzCore/python-pdfkit/issues/93","id":288942052,"node_id":"MDU6SXNzdWUyODg5NDIwNTI=","number":93,"title":"css option not working","user":{"login":"zahidmak","id":3873274,"node_id":"MDQ6VXNlcjM4NzMyNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3873274?v=4","gravatar_id":"","url":"https://api.github.com/users/zahidmak","html_url":"https://github.com/zahidmak","followers_url":"https://api.github.com/users/zahidmak/followers","following_url":"https://api.github.com/users/zahidmak/following{/other_user}","gists_url":"https://api.github.com/users/zahidmak/gists{/gist_id}","starred_url":"https://api.github.com/users/zahidmak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zahidmak/subscriptions","organizations_url":"https://api.github.com/users/zahidmak/orgs","repos_url":"https://api.github.com/users/zahidmak/repos","events_url":"https://api.github.com/users/zahidmak/events{/privacy}","received_events_url":"https://api.github.com/users/zahidmak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-16T15:13:35Z","updated_at":"2018-06-11T20:43:05Z","closed_at":null,"author_association":"NONE","body":"I am trying to style the html using css file but I don't it being applied to the output pdf.\r\n\r\n```\r\noptions = {\r\n    'page-size': 'Letter',\r\n    'margin-top': '0.75in',\r\n    'margin-right': '0.75in',\r\n    'margin-bottom': '0.75in',\r\n    'margin-left': '0.75in',\r\n    'encoding': \"UTF-8\",\r\n    'no-outline': None\r\n}\r\ncss = 'mystyle.css'\r\npdfkit.from_string(body, 'out.pdf', options=options, css=css)\r\n```\r\n\r\nPlease suggest if you have any workaround to this.\r\n\r\nThank you,"},"comment":{"url":"https://api.github.com/repos/JazzCore/python-pdfkit/issues/comments/396380549","html_url":"https://github.com/JazzCore/python-pdfkit/issues/93#issuecomment-396380549","issue_url":"https://api.github.com/repos/JazzCore/python-pdfkit/issues/93","id":396380549,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjM4MDU0OQ==","user":{"login":"Swiftkilla","id":35080209,"node_id":"MDQ6VXNlcjM1MDgwMjA5","avatar_url":"https://avatars2.githubusercontent.com/u/35080209?v=4","gravatar_id":"","url":"https://api.github.com/users/Swiftkilla","html_url":"https://github.com/Swiftkilla","followers_url":"https://api.github.com/users/Swiftkilla/followers","following_url":"https://api.github.com/users/Swiftkilla/following{/other_user}","gists_url":"https://api.github.com/users/Swiftkilla/gists{/gist_id}","starred_url":"https://api.github.com/users/Swiftkilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Swiftkilla/subscriptions","organizations_url":"https://api.github.com/users/Swiftkilla/orgs","repos_url":"https://api.github.com/users/Swiftkilla/repos","events_url":"https://api.github.com/users/Swiftkilla/events{/privacy}","received_events_url":"https://api.github.com/users/Swiftkilla/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T20:43:05Z","updated_at":"2018-06-11T20:43:05Z","author_association":"NONE","body":"> Did you try first passing 'user-style-sheet' in the options dictionary?\r\n\r\nI'm facing a similar issue, I would like to customise the style of the PDF. I will say that if you are able to style the web page the exact way you want the PDF to be styled (unfortunately not in my case), then out-of-the-box pdfkit is absolutely perfect pretty much. I could suggest that it would be nice to see \"smart-auto\" page breaks (don't put two halves of a picture on 2 pages).\r\n\r\nI digress, neither of the following work:\r\n`css='<path\\\\to\\\\css>'\r\npdfkit.from_url('<url_to_export>', '<out\\\\file\\\\path\\\\name>.pdf', options=options, css=css)`\r\n\r\nOR\r\n\r\n`options = {\r\n  'page-size': 'A4',\r\n  'margin-top': '0.0in',\r\n  'margin-right': '0.0in',\r\n  'margin-bottom': '0.0in',\r\n  'margin-left': '0.0in',\r\n  'encoding': \"UTF-8\",\r\n  'cookie': [('cookie_name', 'cookie_val')],\r\n  'no-outline': None,\r\n  'user-style-sheet': '<path_to_css>'\r\n}`\r\n\r\nIs there something obvious that I'm doing wrong here?\r\n\r\nTYIA"}}
{"actor":{"display_login":"Swiftkilla"}}