page_print 0.1.6-x86_64-linux → 0.1.8-x86_64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c4b102152d43feb2342bebd51167ef627964198945a74621060ab724d0cdd09
4
- data.tar.gz: bb9dfec69bb3caafb150060247d0201e97fca142102e774295a5edbb3f675ac6
3
+ metadata.gz: 3200a2bdff1d6d8d710fadaffe11918ab3a85304bd41cdbaac12981ecb85186e
4
+ data.tar.gz: cecc18dd91b32bd56e8246f70c9653a59f0b1c327a2036afcc25ce63c9bcab04
5
5
  SHA512:
6
- metadata.gz: f99c5d07470b510cdab437c1bf80d690efec59067003cd65515dc35915248016d2e45a7aeee48e7f738e1dd95c5de4f90c7af45b653c42d59a231bc6c0965dcc
7
- data.tar.gz: 6d4ec974bb6f0ce44ae515e6574d2362645ef0aaf519421f43fb352a6ddc16c3fb912febc413865a95925ac84f3762bb59007cc3b98ae6eea1ef4b454775ddf9
6
+ metadata.gz: 4e17f9312def12e19680048d69af45c8d28dc9f685c5b7254e6baf1382258396aa7eda562639e96e03b19fc04856d600c67126edb28a5701b7d3d029af2e8539
7
+ data.tar.gz: 325dbb540c591f9e018049481dda01f37989d517165efb4db186a5bf59f3dc2155812a512604d42f572b7ac90a0585a02d59c4d5c684b7253d5c4a12dab42a17
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  > [!IMPORTANT]
4
4
  > PagePrint is not production-ready yet. The gem is still in active testing, especially around native packaging and platform compatibility.
5
5
 
6
-
7
6
  `page_print` renders HTML strings to PDF files from Ruby using the `plutobook` library through a native C extension.
8
7
 
9
8
  It exists as a faster, simpler alternative to PDFKit and other `wkhtmltopdf`-based gems. There is no external renderer process to shell out to, and the public Ruby API is intentionally small.
@@ -13,7 +12,7 @@ It exists as a faster, simpler alternative to PDFKit and other `wkhtmltopdf`-bas
13
12
  Add PagePrint to your Gemfile:
14
13
 
15
14
  ```ruby
16
- gem "page_print", "~> 0.1.4"
15
+ gem "page_print"
17
16
  ```
18
17
 
19
18
  Or install from RubyGems directly:
@@ -145,7 +144,7 @@ RUNS=30 WARMUPS=3 bundle exec ruby benchmark/pdf_renderers.rb
145
144
  Measured on 2026-05-30 with Ruby 3.4.7 on Apple Silicon:
146
145
 
147
146
  | Renderer | Avg wall | P95 wall | Avg CPU | Avg peak RSS | Avg PDF |
148
- |---|---:|---:|---:|---:|---:|
147
+ | --- | ---: | ---: | ---: | ---: | ---: |
149
148
  | `page_print` | 78.2ms | 89.6ms | 93.4ms | 42.1MB | 33.0KB |
150
149
  | PDFKit | 782.2ms | 2127.1ms | 824.8ms | 59.4MB | 27.9KB |
151
150
 
@@ -161,7 +160,7 @@ For options and CSV output, see `benchmark/README.md`.
161
160
  Supported platforms:
162
161
 
163
162
  | Platform | Install Type |
164
- |---|---|
163
+ | --- | --- |
165
164
  | `x86_64-linux` | Vendored PlutoBook, local Ruby extension build |
166
165
  | `arm64-darwin` | Vendored PlutoBook, local Ruby extension build |
167
166
  | Other platforms | Source build |
@@ -12,6 +12,24 @@ def page_print_native_platform
12
12
  end
13
13
  end
14
14
 
15
+ def restore_vendor_so_aliases(vendor_lib_dir)
16
+ manifest_path = File.join(vendor_lib_dir, 'so_aliases')
17
+ return unless File.file?(manifest_path)
18
+
19
+ File.foreach(manifest_path) do |line|
20
+ alias_name, target_name = line.strip.split("\t", 2)
21
+ next if alias_name.nil? || alias_name.empty? || target_name.nil? || target_name.empty?
22
+ next if alias_name.include?('/') || target_name.include?('/') || alias_name.start_with?('.') || target_name.start_with?('.')
23
+
24
+ alias_path = File.join(vendor_lib_dir, alias_name)
25
+ target_path = File.join(vendor_lib_dir, target_name)
26
+ next unless File.file?(target_path)
27
+ next if File.exist?(alias_path) || File.symlink?(alias_path)
28
+
29
+ File.symlink(target_name, alias_path)
30
+ end
31
+ end
32
+
15
33
  project_root = File.expand_path('../..', __dir__)
16
34
  vendor_platform = ENV.fetch('PAGE_PRINT_VENDOR_PLATFORM', page_print_native_platform)
17
35
  vendor_dir = File.join(project_root, 'lib', 'page_print', 'vendor', vendor_platform)
@@ -19,6 +37,7 @@ vendor_include_dir = File.join(vendor_dir, 'include')
19
37
  vendor_lib_dir = File.join(vendor_dir, 'lib')
20
38
 
21
39
  if File.directory?(vendor_include_dir) && File.directory?(vendor_lib_dir)
40
+ restore_vendor_so_aliases(vendor_lib_dir)
22
41
  dir_config('plutobook', vendor_include_dir, vendor_lib_dir)
23
42
 
24
43
  if vendor_platform.end_with?('-linux')
@@ -0,0 +1,10 @@
1
+ libharfbuzz-gobject.so libharfbuzz-gobject.so.0.61230.0
2
+ libharfbuzz-gobject.so.0 libharfbuzz-gobject.so.0.61230.0
3
+ libharfbuzz-icu.so libharfbuzz-icu.so.0.61230.0
4
+ libharfbuzz-icu.so.0 libharfbuzz-icu.so.0.61230.0
5
+ libharfbuzz-subset.so libharfbuzz-subset.so.0.61230.0
6
+ libharfbuzz-subset.so.0 libharfbuzz-subset.so.0.61230.0
7
+ libharfbuzz.so libharfbuzz.so.0.61230.0
8
+ libharfbuzz.so.0 libharfbuzz.so.0.61230.0
9
+ libplutobook.so libplutobook.so.0.18.0
10
+ libplutobook.so.0 libplutobook.so.0.18.0
@@ -1,3 +1,3 @@
1
1
  module PagePrint
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Dino Maric
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-26 00:00:00.000000000 Z
11
+ date: 2026-08-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby gem with a native extension that renders HTML strings to PDF files
14
14
  via the plutobook C library.
@@ -86,17 +86,9 @@ files:
86
86
  - lib/page_print/vendor/x86_64-linux/lib/libgmp.so.10
87
87
  - lib/page_print/vendor/x86_64-linux/lib/libgobject-2.0.so.0
88
88
  - lib/page_print/vendor/x86_64-linux/lib/libgraphite2.so.3
89
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-gobject.so
90
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-gobject.so.0
91
89
  - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-gobject.so.0.61230.0
92
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-icu.so
93
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-icu.so.0
94
90
  - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-icu.so.0.61230.0
95
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-subset.so
96
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-subset.so.0
97
91
  - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz-subset.so.0.61230.0
98
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz.so
99
- - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz.so.0
100
92
  - lib/page_print/vendor/x86_64-linux/lib/libharfbuzz.so.0.61230.0
101
93
  - lib/page_print/vendor/x86_64-linux/lib/libicudata.so.67
102
94
  - lib/page_print/vendor/x86_64-linux/lib/libicui18n.so.67
@@ -104,11 +96,8 @@ files:
104
96
  - lib/page_print/vendor/x86_64-linux/lib/libmd.so.0
105
97
  - lib/page_print/vendor/x86_64-linux/lib/libpcre.so.3
106
98
  - lib/page_print/vendor/x86_64-linux/lib/libpixman-1.so.0
107
- - lib/page_print/vendor/x86_64-linux/lib/libplutobook.so
108
- - lib/page_print/vendor/x86_64-linux/lib/libplutobook.so.0
109
99
  - lib/page_print/vendor/x86_64-linux/lib/libplutobook.so.0.18.0
110
100
  - lib/page_print/vendor/x86_64-linux/lib/libpng16.so.16
111
- - lib/page_print/vendor/x86_64-linux/lib/libruby.so.3.2
112
101
  - lib/page_print/vendor/x86_64-linux/lib/libuuid.so.1
113
102
  - lib/page_print/vendor/x86_64-linux/lib/libxcb-render.so.0
114
103
  - lib/page_print/vendor/x86_64-linux/lib/libxcb-shm.so.0
@@ -119,6 +108,7 @@ files:
119
108
  - lib/page_print/vendor/x86_64-linux/lib/pkgconfig/harfbuzz-subset.pc
120
109
  - lib/page_print/vendor/x86_64-linux/lib/pkgconfig/harfbuzz.pc
121
110
  - lib/page_print/vendor/x86_64-linux/lib/pkgconfig/plutobook.pc
111
+ - lib/page_print/vendor/x86_64-linux/lib/so_aliases
122
112
  - lib/page_print/version.rb
123
113
  homepage: https://github.com/WizardComputer/page_print
124
114
  licenses: