Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
626ab1f8
Verified
Commit
626ab1f8
authored
Jun 25, 2018
by
Kaspar Vollenweider
👻
Browse files
change dpi option in pdf to 400 so that an a4 page is a4 again
parent
2457e5e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/certificates_controller.rb
View file @
626ab1f8
...
...
@@ -12,7 +12,9 @@ class CertificatesController < ApplicationController
format
.
html
format
.
pdf
do
render
pdf:
pdf_file_name
(
@certificate
),
layout:
'certificate.pdf'
,
print_media_type:
true
,
no_background:
true
,
show_as_html:
params
.
key?
(
'debug'
),
layout:
'certificate.pdf'
,
dpi:
'400'
,
margin:
{
top:
0
,
bottom:
0
,
left:
0
,
right:
0
}
end
end
...
...
app/views/certificates/show.pdf.slim
View file @
626ab1f8
...
...
@@ -32,7 +32,7 @@
.text-body
=
markdown
(
@certificate
.
text_body
)
.signature
.row
.signature
.col-xs-8
.name
=
@certificate
.
creator_name
.position
=
@certificate
.
creator_function
...
...
config/initializers/wicked_pdf.rb
View file @
626ab1f8
...
...
@@ -10,5 +10,8 @@
WickedPdf
.
config
=
{
layout:
'pdf.html'
,
encoding:
'UTF-8'
encoding:
'UTF-8'
,
page_size:
'A4'
,
print_media_type:
true
,
no_background:
true
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment