rghost 0.9.4 → 0.9.5
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 +8 -8
- data/lib/rghost/constants.rb +1 -1
- data/lib/rghost/ruby_ghost_config.rb +20 -9
- data/lib/rghost/ruby_to_ps.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmNjNjcxYWM5NDA0OTkyNmVhMDIwYzdkMWE1OTlmOThhMGM4MzVlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjAyMTgwMWY0NjM5YzgxOTVlYTAwYThhZDU5N2ViYWQxNTg5MzI5Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2FhZmRkYzJhZWY5MmRlOGRiYzVkZWU0MjQxNjBlZjJjODM1ZjQ2ODkxNGQ3
|
10
|
+
ZGVmNGFlNWE0YmY4NGY0MmU3YjRhNGM3YjE5YjhkNTA3ZjBlNDNlMmE0ZTQw
|
11
|
+
ZDY0NWM0ZmI1ZTc1MjA2N2Q2MmU1ZDg3ODAxMDY5MzQ2NDEzMTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTI1MTRmNDRmMmU5NDg2NDk1OTE4MjA0MjYwODczNWVjYTViMjYzYTY4NmZj
|
14
|
+
ZTJmMTM5ZTExYjJlN2U5MzE1MjA0N2QyMTUxZTI3YjJhMGU0MThjYzMwNjVj
|
15
|
+
YTY3Y2NhNjZmZGExZWI5N2FiOGM4MTdkZTFkNTJjOGU2NmRiYjA=
|
data/lib/rghost/constants.rb
CHANGED
@@ -70,15 +70,8 @@ module RGhost::Config
|
|
70
70
|
:default_params=> %w(gs -dNOPAUSE -dBATCH -dQUIET -dNOPAGEPROMPT),
|
71
71
|
:stack_elements => 5000,
|
72
72
|
:font_encoding => :IsoLatin,
|
73
|
-
:
|
74
|
-
|
75
|
-
require 'iconv'
|
76
|
-
lambda { |text| Iconv::iconv('latin1','utf-8', text).join }
|
77
|
-
else
|
78
|
-
lambda { |text| text.encode('ISO-8859-1', 'UTF-8') }
|
79
|
-
end
|
80
|
-
end,
|
81
|
-
:external_encoding => nil,
|
73
|
+
:external_encoding => 'ascii-8bit',
|
74
|
+
:charset_convert => nil,
|
82
75
|
:fontsize => 8,
|
83
76
|
:unit => RGhost::Units::Cm
|
84
77
|
}
|
@@ -120,10 +113,28 @@ module RGhost::Config
|
|
120
113
|
d.benchmark(:stop)
|
121
114
|
d.done
|
122
115
|
d
|
116
|
+
end
|
123
117
|
|
118
|
+
#Generate the UTF-8 encoding mapping
|
119
|
+
#
|
120
|
+
# RGhost::Config.utf8_encodings.render :pdf, :filename => "/tmp/encoding_map.pdf"
|
121
|
+
#
|
122
|
+
def self.utf8_encodings
|
123
|
+
doc = RGhost::Document.new :paper => [20,10], :margin_left => 2.3, :margin_bottom => 2.3
|
124
124
|
|
125
|
+
doc.virtual_pages do
|
126
|
+
7.times do
|
127
|
+
new_page :width => 2, :margin_left => 1
|
128
|
+
end
|
129
|
+
end
|
125
130
|
|
131
|
+
RGhost::RubyToPs::UTF8_ENCODINGS.each do |k,v|
|
132
|
+
doc.show "#{k} = #{v}"
|
133
|
+
doc.next_row
|
134
|
+
end
|
135
|
+
doc
|
126
136
|
end
|
137
|
+
|
127
138
|
#This method is a helper to gets the best encoding.
|
128
139
|
#
|
129
140
|
#link:images/encode_test.png
|
data/lib/rghost/ruby_to_ps.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rghost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shairon Toledo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby Ghostscript Engine is a document creation and conversion API, support(PDF,PS,GIF,TIF,PNG,JPG...).
|
14
14
|
It uses the GhostScript framework for the format conversion, utilizes EPS templates
|