laravel-snappy

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

Laravel snappy - How to Load internal/external css

浪子不回头ぞ 提交于 2021-01-27 13:41:43
问题 I am trying to get the css styling working for my pdf documents. So far no such luck. Is it possible to use CDN style sheet documents? When I add say bootstrap stylesheet cdn to my view's head section, I get the error below; The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% [======> ] 11% Error: Failed to load https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css, with network status code 3 and http status code 0 - Host