pdf_gem 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/lib/pdf_gem/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c6ee1c453af223c06cda4f2785f8a69f02da7c3e9f4c8116be1b40b08165e60
|
|
4
|
+
data.tar.gz: 43be06726e1ca3e06b0442a810e231f9abd28c12fb2e1dfd3ad29abe3e251d2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28635eb2f795ce7cd35cda838db9546a612b2d0fae5186cb277105e8d3bfd3100078ba8734948e9395d1797d6a06b9e8d25375a2a8a142d070c6973ebefd5b9c
|
|
7
|
+
data.tar.gz: cbb3d3bc77429cf93b09b89518c1733b304539dee62199a7cd005e0b87a5d1b5d5bddadd747b15e744a7a6de03a71a7aca2cf234f1e57af582fbba2a0bdf4ceb
|
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# PdfGem
|
|
2
|
-
This is a gem for
|
|
2
|
+
This is a gem for converting HTML in PDF, the rendering engine is Chromium Browser
|
|
3
3
|
|
|
4
4
|
## Prerequisites
|
|
5
5
|
This package depends on node.js and puppeteer run this command for installing them:
|
|
@@ -67,11 +67,11 @@ PdfGem.pdf_from_string(options)
|
|
|
67
67
|
## Options
|
|
68
68
|
|
|
69
69
|
- `options` <[Object]> Options object which might have the following properties:
|
|
70
|
-
- `url` <[string]> (
|
|
71
|
-
- `html` <[string]> (
|
|
70
|
+
- `url` <[string]> (Used only for PdfGem.pdf_from_url) This is the url to render.
|
|
71
|
+
- `html` <[string]> (Used only for PdfGem.pdf_from_string) This is the html string to render.
|
|
72
72
|
- `disposition` <[string]> (Use only for controller render) Disposition string (inline/attachment).
|
|
73
73
|
- `filename` <[string]> (Use only for controller render) Filename of the file.
|
|
74
|
-
- `destination` <[string]> The file path to save the PDF to. If no destination is provided, will be returned a binary string
|
|
74
|
+
- `destination` <[string]> (Use only for PdfGem.pdf_from_url and PdfGem.pdf_from_string) The file path to save the PDF to. If no destination is provided, will be returned a binary string
|
|
75
75
|
- `scale` <[number]> Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2.
|
|
76
76
|
- `displayHeaderFooter` <[boolean]> Display header and footer. Defaults to `false`.
|
|
77
77
|
- `headerTemplate` <[string]> HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
|
|
@@ -94,8 +94,6 @@ PdfGem.pdf_from_string(options)
|
|
|
94
94
|
- `left` <[string]|[number]> Left margin, accepts values labeled with units.
|
|
95
95
|
- `preferCSSPageSize` <[boolean]> Give any CSS `@page` size declared in the page priority over what is declared in `width` and `height` or `format` options. Defaults to `false`, which will scale the content to fit the paper size.
|
|
96
96
|
|
|
97
|
-
> **NOTE** Generating a pdf is currently only supported in Chrome headless.
|
|
98
|
-
|
|
99
97
|
> **NOTE** By default, generates a pdf with modified colors for printing. Use the [`-webkit-print-color-adjust`](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust) property to force rendering of exact colors.
|
|
100
98
|
|
|
101
99
|
|
data/lib/pdf_gem/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pdf_gem
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Blasina
|
|
@@ -38,7 +38,8 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
-
description:
|
|
41
|
+
description: This is a gem for converting HTML in PDF, the rendering engine is Chromium
|
|
42
|
+
Browser
|
|
42
43
|
email:
|
|
43
44
|
- blzk100@gmailcom
|
|
44
45
|
executables: []
|