Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
pdf-customizer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c121c74d
authored
2016-07-07 09:50:38 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
design changes
1 parent
eff8dcd8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
3 deletions
app/Http/Controllers/PdfController.php
public/files/js/interfaceGdrive.js
app/Http/Controllers/PdfController.php
View file @
c121c74
...
...
@@ -181,9 +181,46 @@ try {
$num_optlist
=
"fillcolor={"
.
$fontColor
.
" } position=
{
".$fontAlignment."
}
boxsize={"
.
$textwidth
.
" "
.
$textheight
.
"} fontsize="
.
$fontSize
.
" "
.
$fitm
.
" "
;
$p
->
fit_textline
(
$textline
,
$textLRight
,
$textLUp
,
$num_optlist
);
}
else
if
(
$row
->
change_type
==
'img'
)
{
}
else
if
(
$row
->
change_type
==
'date'
)
{
$yoff
=
50
;
//Get font var from row
$textline
=
$row
->
content
;
$textLUp
=
$row
->
locationUp
;
$textwidth
=
$row
->
width
;
$textheight
=
$row
->
height
;
$textLRight
=
$row
->
locationRight
;
$fontStyles
=
unserialize
(
$row
->
style
);
$fitmethod
=
$fontStyles
[
"fitmethod"
];
$fontAlignment
=
$fontStyles
[
"alignment"
];
$fontFamily
=
$fontStyles
[
"font-family"
];
$fontSize
=
$fontStyles
[
"font-size"
];
if
(
isset
(
$fontStyles
[
"font-color"
]))
{
$fontColor
=
$fontStyles
[
"font-color"
];
}
else
{
$fontColor
=
'cmyk 0.75 0.68 0.67 0.90'
;
}
/// Load and insert text and font
$p
->
set_option
(
"FontOutline={"
.
$fontFamily
.
"="
.
$storagePath
.
$folder
.
"/"
.
$fontFamily
.
".otf}"
);
/* For PDFlib Lite: change "unicode" to "winansi" */
$font
=
$p
->
load_font
(
$fontFamily
,
"unicode"
,
"embedding"
);
if
(
$font
==
0
)
{
die
(
"Error: "
.
$p
->
get_errmsg
());
}
$p
->
setfont
(
$font
,
$fontSize
);
//$num_optlist = "fontname=".$fontFamily." fontsize=".$fontSize." encoding=unicode alignment=".$fontAlignment." fillcolor={".$fontColor." }";
if
(
$fitmethod
==
''
){
$fitm
=
""
;
}
else
{
$fitm
=
"fitmethod="
.
$fitmethod
;}
$num_optlist
=
"fillcolor={"
.
$fontColor
.
" } position=
{
".$fontAlignment."
}
boxsize={"
.
$textwidth
.
" "
.
$textheight
.
"} fontsize="
.
$fontSize
.
" "
.
$fitm
.
" "
;
$p
->
fit_textline
(
$textline
,
$textLRight
,
$textLUp
,
$num_optlist
);
}
else
if
(
$row
->
change_type
==
'img'
)
{
//Get image var from row
...
...
public/files/js/interfaceGdrive.js
View file @
c121c74
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment