Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
forena
Commits
e3d925a2
Commit
e3d925a2
authored
Aug 13, 2014
by
David Metzler
Browse files
Added support for skin specified mpdf options.
parent
838d6a29
Changes
1
Hide whitespace changes
Inline
Side-by-side
docformats/FrxMPDF.inc
View file @
e3d925a2
...
...
@@ -27,15 +27,16 @@ class FrxMPDF extends FrxDocument {
// The option switch off links on PDF will bee good here too
$disable_links
=
variable_get
(
'forena_pdf_disable_links'
,
TRUE
);
$skin_data
=
Frx
::
Data
()
->
getContext
(
'skin'
);
$page_data
=
isset
(
$skin_data
[
'mpdf'
][
'page'
])
?
$skin_data
[
'mpdf'
][
'page'
]
:
array
(
'orientation'
=>
'P'
);
$html
=
$this
->
check_markup
(
$r
->
html
);
if
(
$disable_links
)
{
$html
=
preg_replace
(
'/<a href=\"(.*?)\">(.*?)<\/a>/'
,
"
\\
2"
,
$html
);
}
$mpdf
=
new
mPDF
(
'UTF-8'
);
$mpdf
->
AddPageByArray
(
array
(
'orientation'
=>
'P'
));
$mpdf
->
AddPageByArray
(
$page_data
);
$output
=
''
;
$output
=
'<html><head>'
;
...
...
Write
Preview
Markdown
is supported
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