ironpress 1.5.3-aarch64-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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0c1e4f6fa0b70dcce8c93b7489cb3702c620d90d4e8832d55958af2738c49fbf
4
+ data.tar.gz: a4438739386f99f66a5dc624e0ce195c1586cf6011e6e477c3b4e185aac6e356
5
+ SHA512:
6
+ metadata.gz: 1533e82c36ddc07404375d724a07b5cad7d14490a9bea02ee17ef77dfe766d865a687d2059d93e867d6f56c73b9e2b0b714990a38ef466d2c2e987d1e76b6fb0
7
+ data.tar.gz: 4d4437802858a25f805b73627dea42ade56a3d731a90973885b4eb900d9e2859e69af1f66173af65434231326855ec24ed9585b268cc85f2d72fdabe92d59b4c
data/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Ironpress for Ruby
2
+
3
+ Generate PDF bytes from HTML or Markdown without launching a browser.
4
+
5
+ ## Installation
6
+
7
+ ```ruby
8
+ gem "ironpress"
9
+ ```
10
+
11
+ Ironpress supports Ruby 3.0 and later. Releases include a source gem and native
12
+ gems for Linux, macOS, and Windows.
13
+
14
+ ## Usage
15
+
16
+ ```ruby
17
+ require "ironpress"
18
+
19
+ pdf = Ironpress.html_to_pdf("<h1>Hello</h1>")
20
+ File.binwrite("output.pdf", pdf)
21
+ ```
22
+
23
+ Configuration methods return the converter, so policies can be composed in an
24
+ idiomatic chain:
25
+
26
+ ```ruby
27
+ converter = Ironpress::HtmlConverter.new
28
+ .page_size("Letter")
29
+ .margin_sides(36, 54, 36, 54)
30
+ .header("Quarterly report")
31
+ .footer("Page {page} of {pages}")
32
+ .sanitize(true)
33
+
34
+ pdf = converter.convert("<h1>Results</h1>")
35
+ ```
36
+
37
+ The converter supports page geometry, PDF and image quality, sanitization,
38
+ headers and footers, custom TTF fonts, and optional CJK or emoji packs. Native
39
+ Ruby also supports constrained local resources through `base_path` and
40
+ `resource_root`, plus direct file output.
41
+
42
+ See the [binding capability matrix](../README.md) for the contract shared with
43
+ Rust, Python, and WebAssembly.
44
+
45
+ ## Font packs
46
+
47
+ Ironpress never downloads fallback fonts while rendering. Download the artifact
48
+ your application needs, verify it as part of deployment, then install its bytes:
49
+
50
+ ```ruby
51
+ converter = Ironpress::HtmlConverter.new.add_font_pack(
52
+ "cjk-jp",
53
+ File.binread("ironpress-font-cjk-jp.ttf")
54
+ )
55
+ pdf = converter.convert("<p lang='ja'>日本語</p>")
56
+ ```
57
+
58
+ Valid pack names are `cjk-jp`, `cjk-kr`, `cjk-sc`, `cjk-tc`, and `emoji`.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ironpress
4
+ VERSION = "1.5.3"
5
+ end
data/lib/ironpress.rb ADDED
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rbconfig"
4
+ require_relative "ironpress/version"
5
+
6
+ ruby_api_version = RUBY_VERSION.split(".").first(2).join(".")
7
+ versioned_extension = File.join(__dir__, "ironpress", ruby_api_version, "ironpress_ruby")
8
+ source_extension = File.join(__dir__, "ironpress", "ironpress_ruby")
9
+ extension_suffix = RbConfig::CONFIG.fetch("DLEXT")
10
+ extension = if File.file?("#{versioned_extension}.#{extension_suffix}")
11
+ versioned_extension
12
+ else
13
+ source_extension
14
+ end
15
+ require extension
16
+
17
+ module Ironpress
18
+ # Mutable Ruby facade over immutable native converter values.
19
+ class HtmlConverter
20
+ CONFIGURATION_METHODS = %i[
21
+ page_size
22
+ page_size_custom
23
+ margin
24
+ margin_sides
25
+ compress
26
+ jpeg_quality
27
+ auto_resize_images
28
+ image_dpi
29
+ filter_dpi
30
+ mask_dpi
31
+ background_raster_dpi
32
+ occlusion_cull
33
+ sanitize
34
+ add_font
35
+ add_font_pack
36
+ base_path
37
+ resource_root
38
+ header
39
+ footer
40
+ ].freeze
41
+
42
+ def initialize
43
+ @native = NativeConverter.new
44
+ end
45
+
46
+ CONFIGURATION_METHODS.each do |name|
47
+ define_method(name) do |*arguments|
48
+ @native = @native.public_send(name, *arguments)
49
+ self
50
+ end
51
+ end
52
+
53
+ def convert(html)
54
+ @native.convert(html)
55
+ end
56
+
57
+ def convert_markdown(markdown)
58
+ @native.convert_markdown(markdown)
59
+ end
60
+
61
+ def convert_to_file(html, path)
62
+ @native.convert_to_file(html, path)
63
+ self
64
+ end
65
+
66
+ def convert_markdown_to_file(markdown, path)
67
+ @native.convert_markdown_to_file(markdown, path)
68
+ self
69
+ end
70
+ end
71
+
72
+ private_constant :NativeConverter
73
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ironpress
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.3
5
+ platform: aarch64-linux
6
+ authors:
7
+ - Paul Gaston Gouron
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-08-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: |-
14
+ Convert HTML, CSS, and Markdown to PDF with no browser or system
15
+ dependencies. Native Rust extension for maximum performance.
16
+ email:
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - lib/ironpress.rb
23
+ - lib/ironpress/3.0/ironpress_ruby.so
24
+ - lib/ironpress/3.1/ironpress_ruby.so
25
+ - lib/ironpress/3.2/ironpress_ruby.so
26
+ - lib/ironpress/3.3/ironpress_ruby.so
27
+ - lib/ironpress/3.4/ironpress_ruby.so
28
+ - lib/ironpress/version.rb
29
+ homepage: https://github.com/gastongouron/ironpress
30
+ licenses:
31
+ - MIT
32
+ metadata: {}
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '3.0'
42
+ - - "<"
43
+ - !ruby/object:Gem::Version
44
+ version: 3.5.dev
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ requirements: []
51
+ rubygems_version: 3.5.23
52
+ signing_key:
53
+ specification_version: 4
54
+ summary: Pure Rust HTML/CSS/Markdown to PDF converter
55
+ test_files: []