Class: Vectory::Pdf
Instance Attribute Summary collapse
Attributes inherited from Vector
#initial_path
Attributes inherited from Image
#content
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Vector
#file_size, from_datauri, from_path, #height, #initialize, #mime, #path, #size, #to_uri, #width, #write
Methods inherited from Image
from_content, from_path, #initialize
Instance Attribute Details
#original_height ⇒ Object
Returns the value of attribute original_height.
5
6
7
|
# File 'lib/vectory/pdf.rb', line 5
def original_height
@original_height
end
|
#original_width ⇒ Object
Returns the value of attribute original_width.
5
6
7
|
# File 'lib/vectory/pdf.rb', line 5
def original_width
@original_width
end
|
Class Method Details
.default_extension ⇒ Object
7
8
9
|
# File 'lib/vectory/pdf.rb', line 7
def self.default_extension
"pdf"
end
|
.mimetype ⇒ Object
11
12
13
|
# File 'lib/vectory/pdf.rb', line 11
def self.mimetype
"application/pdf"
end
|
Instance Method Details
#to_emf ⇒ Object
36
37
38
|
# File 'lib/vectory/pdf.rb', line 36
def to_emf
with_inkscape_pdf_fallback(:emf, Emf)
end
|
#to_eps ⇒ Object
28
29
30
|
# File 'lib/vectory/pdf.rb', line 28
def to_eps
with_inkscape_pdf_fallback(:eps, Eps)
end
|
#to_ps ⇒ Object
32
33
34
|
# File 'lib/vectory/pdf.rb', line 32
def to_ps
with_inkscape_pdf_fallback(:ps, Ps)
end
|
#to_svg ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/vectory/pdf.rb', line 15
def to_svg
svg = convert_to_svg
if original_height && original_width
adjusted_content = adjust_svg_dimensions(svg.content, original_width,
original_height)
svg = Svg.new(adjusted_content, svg.initial_path)
end
svg
end
|