Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
table, th, td { | ||
border: 1px solid black; | ||
border-collapse: collapse; | ||
} | ||
table { | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8' /> | ||
<%= wicked_pdf_stylesheet_link_tag "pdf" -%> | ||
<%= wicked_pdf_javascript_include_tag "number_pages" %> | ||
</head> | ||
<body onload='number_pages'> | ||
<div id="header"> | ||
<%= wicked_pdf_image_tag 'mysite.jpg' %> | ||
</div> | ||
<div id="content"> | ||
<%= yield %> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
PDF generation date: | ||
<%= Time.zone.now %> | ||
|
||
<p> | ||
<strong>Post ID:</strong> | ||
<%= @post.id %> | ||
</p> | ||
|
||
<p> | ||
<strong>Title:</strong> | ||
<%= @post.title %> | ||
</p> | ||
|
||
<p> | ||
<strong>Content:</strong> | ||
<%= simple_format(@post.content) %> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# WickedPDF Global Configuration | ||
# | ||
# Use this to set up shared configuration options for your entire application. | ||
# Any of the configuration options shown here can also be applied to single | ||
# models by passing arguments to the `render :pdf` call. | ||
# | ||
# To learn more, check out the README: | ||
# | ||
# https://github.com/mileszs/wicked_pdf/blob/master/README.md | ||
|
||
WickedPdf.config = { | ||
# Path to the wkhtmltopdf executable: This usually isn't needed if using | ||
# one of the wkhtmltopdf-binary family of gems. | ||
# exe_path: '/usr/local/bin/wkhtmltopdf', | ||
# or | ||
# exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf') | ||
|
||
# Layout file to be used for all PDFs | ||
# (but can be overridden in `render :pdf` calls) | ||
# layout: 'pdf.html', | ||
layout: "pdf", | ||
orientation: "Portrait", | ||
page_size: "A4" | ||
|
||
|
||
# Using wkhtmltopdf without an X server can be achieved by enabling the | ||
# 'use_xvfb' flag. This will wrap all wkhtmltopdf commands around the | ||
# 'xvfb-run' command, in order to simulate an X server. | ||
# | ||
# use_xvfb: true, | ||
} |