Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncphp
/
mcClasses
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 60e4bad7
authored
Dec 16, 2013
by
sn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cairo
1 parent
294bc20c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
23 deletions
file/class_mcCairoSvg.inc.php
file/class_mcInkscape.inc.php
include.php
file/class_mcCairoSvg.inc.php
0 → 100644
View file @
60e4bad
<?php
class
mcCairoSvg
{
/**
*
* @param string $param_svgFileString
*/
public
static
function
svgToPdf
(
$param_in_svg
,
$param_out_pdf
=
false
)
{
if
(
$param_out_pdf
===
false
)
{
$param_out_pdf
=
tempnam
(
"/tmp"
,
"mcInkscape_"
);
$tmp_png
=
$param_out_pdf
.
'.pdf'
;
mcFile
::
rename
(
$param_out_pdf
,
$tmp_png
);
$param_out_pdf
=
$tmp_png
;
}
$inkscape_order
=
"cairosvg.sh
$param_in_svg
$param_out_pdf
"
;
$shell_exec
=
shell_exec
(
$inkscape_order
);
D
::
show
(
$shell_exec
,
$inkscape_order
);
return
$param_out_pdf
;
}
}
?>
file/class_mcInkscape.inc.php
View file @
60e4bad
...
@@ -49,26 +49,4 @@ class mcInkscape {
...
@@ -49,26 +49,4 @@ class mcInkscape {
}
}
class
mcCairoSvg
{
/**
*
* @param string $param_svgFileString
*/
public
static
function
svgToPdf
(
$param_in_svg
,
$param_out_pdf
=
false
)
{
if
(
$param_out_pdf
===
false
)
{
$param_out_pdf
=
tempnam
(
"/tmp"
,
"mcInkscape_"
);
$tmp_png
=
$param_out_pdf
.
'.pdf'
;
mcFile
::
rename
(
$param_out_pdf
,
$tmp_png
);
$param_out_pdf
=
$tmp_png
;
}
$inkscape_order
=
"cairosvg.sh
$param_in_svg
$param_out_pdf
"
;
$shell_exec
=
shell_exec
(
$inkscape_order
);
D
::
show
(
$shell_exec
,
$inkscape_order
);
return
$param_out_pdf
;
}
}
?>
?>
\ No newline at end of file
include.php
View file @
60e4bad
...
@@ -26,6 +26,7 @@ require_once $__PATH_to_mcClasses . 'class_mcMail.inc.php';
...
@@ -26,6 +26,7 @@ require_once $__PATH_to_mcClasses . 'class_mcMail.inc.php';
require_once
$__PATH_to_mcClasses
.
'class_mcConfig.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcConfig.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcFile.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcFile.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcInkscape.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcInkscape.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcCairoSvg.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcImage.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcImage.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcCONST.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcCONST.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcCsv.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcCsv.inc.php'
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment