wkhtmltopdf

Flexbox wkhtmltopdf Rendering Issue

自作多情 提交于 2021-02-19 02:52:10
问题 I have a page that I am turning into a pdf with wkhtmltopdf. I have a 3 column layout and it works well in Chrome but the pdf is incorrectly generated. Is there an alternative to flexbox that would give the same view or a way to make flexbox work in wkhtmltopdf? Modernizr did not help. Thanks. HTML: <div class="header"> <div id="name" class="center"> <h2> Centered Text </h2> </div> <div id="links" class="left"> <h3> Left Line 1 <br> Left Line 2 </h3> </div> <div id="contact" class="right">

Laravel Snappy: TailwindCSS not loading completely

梦想与她 提交于 2021-02-11 12:26:40
问题 I am using Laravel (8 Jetstream) Snappy to print quite a colorful PDF from a blade view with TailwindCSS v2. However, the blade view is not the same looking in the generated PDF. First of all, nothing worked if I had the following call to the CSS file: <link href="{{ asset('css/app.css') }}" rel="stylesheet"> So I changed asset() for public_path() . Here is the whole blade view: <!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta

Laravel Snappy: TailwindCSS not loading completely

有些话、适合烂在心里 提交于 2021-02-11 12:25:29
问题 I am using Laravel (8 Jetstream) Snappy to print quite a colorful PDF from a blade view with TailwindCSS v2. However, the blade view is not the same looking in the generated PDF. First of all, nothing worked if I had the following call to the CSS file: <link href="{{ asset('css/app.css') }}" rel="stylesheet"> So I changed asset() for public_path() . Here is the whole blade view: <!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta

Hide Footer on first page

三世轮回 提交于 2021-02-10 14:26:51
问题 Is it possible to hide the header/footer of a TuesPechkin document for a specific page. I'd like the header and footers to be ignored on the first page of the PDF document but can't find a way to achieve this. Document setup as below: var document = new HtmlToPdfDocument { GlobalSettings = { ProduceOutline = true, DocumentTitle = "My Report", PaperSize = PaperKind.A4, // Implicit conversion to PechkinPaperSize Margins = { All = 1.375, Unit = Unit.Centimeters } }, Objects = { new

wkhtmltopdf: No such file or directory [ Closed ]

痞子三分冷 提交于 2021-02-09 09:18:21
问题 I installed wkhtmltopdf from the following code sudo apt-get install wkhtmltopdf But when I am creating PDF then it is generating following error Error: /bin/bash: /usr/bin/wkhtmltopdf: No such file or directory 回答1: It appears that when you're trying to run wkhtmltopdf, it's not finding the program to execute. You can try to locate it with locate wkhtmltopdf . That should return the path to the executable. If that doesn't return a path, you can use this (but it will take longer): find /

wkhtmltopdf: No such file or directory [ Closed ]

倖福魔咒の 提交于 2021-02-09 09:16:20
问题 I installed wkhtmltopdf from the following code sudo apt-get install wkhtmltopdf But when I am creating PDF then it is generating following error Error: /bin/bash: /usr/bin/wkhtmltopdf: No such file or directory 回答1: It appears that when you're trying to run wkhtmltopdf, it's not finding the program to execute. You can try to locate it with locate wkhtmltopdf . That should return the path to the executable. If that doesn't return a path, you can use this (but it will take longer): find /

Laravel 5.1 Snappy pdf image not rendering in pdf file

最后都变了- 提交于 2021-02-07 18:20:31
问题 I am using barryvdh/laravel-snappy to generate pdf file. I have two image files 1. yourlogohere.png is in public/image/ folder and 2. logo2.png is in folder other than public i.e. storage/app/logo and to get this file I defined a route (www.example.org/logo/logo.png) and use following code to access it. public function logo($filename) { $file = Storage::disk('local_logo')->get($filename); $mime = 'image/png'; return (new Response($file, 200))->header('Content-Type', $mime); } Problem: When I

No module named main, wkhtmltopdf issue

£可爱£侵袭症+ 提交于 2021-02-07 14:20:38
问题 I'm new in python, but all search results i found was useless for me. C:\Users\Aero>pip install wkhtmltopdf Collecting wkhtmltopdf Using cached wkhtmltopdf-0.2.tar.gz Installing collected packages: wkhtmltopdf Running setup.py install for wkhtmltopdf Successfully installed wkhtmltopdf-0.2 C:\Users\Aero>python Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import

Pechkin HTML to PDF that includes a link to an extensionless PNG

核能气质少年 提交于 2021-02-07 08:23:14
问题 I'm trying to convert an HTML string to PDF using Pechkin Synchronised (WkHtmlToPDF). Everything works perfectly apart from one (deal breaking) part. As part of the HTML string I have an Image tag that references a dynamically generated PNG file over SSL (See below for code). It simply appears as a blank box in the output pdf. I've checked the docs and turned on every option I can think of and have seen references to WkHtmlToPDF being able to support PNG format and pull data from SSL'd

Pechkin HTML to PDF that includes a link to an extensionless PNG

血红的双手。 提交于 2021-02-07 08:20:16
问题 I'm trying to convert an HTML string to PDF using Pechkin Synchronised (WkHtmlToPDF). Everything works perfectly apart from one (deal breaking) part. As part of the HTML string I have an Image tag that references a dynamically generated PNG file over SSL (See below for code). It simply appears as a blank box in the output pdf. I've checked the docs and turned on every option I can think of and have seen references to WkHtmlToPDF being able to support PNG format and pull data from SSL'd