File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ public function download(){
107
107
108
108
/**
109
109
* Save the merged PDF content to the filesystem
110
- * @param mixed $filePath
111
110
*
112
111
* @return string
113
112
*/
@@ -135,7 +134,15 @@ public function setFileName($fileName){
135
134
return $ this ;
136
135
}
137
136
138
- public function addString ($ string , $ fileName , $ pages = 'all ' , $ orientation = null ){
137
+ /**
138
+ * Set the final filename
139
+ * @param string $string
140
+ * @param mixed $pages
141
+ * @param mixed $orientation
142
+ *
143
+ * @return string
144
+ */
145
+ public function addString ($ string , $ pages = 'all ' , $ orientation = null ){
139
146
140
147
$ filePath = storage_path ('tmp/ ' .str_random (16 ).'.pdf ' );
141
148
$ this ->oFilesystem ->put ($ filePath , $ string );
@@ -190,8 +197,8 @@ public function merge($orientation = 'P') {
190
197
191
198
$ this ->aFiles ->each (function ($ file ) use ($ oFPDI , $ orientation ){
192
199
$ file ['orientation ' ] = !is_null ($ file ['orientation ' ])?$ orientation :$ file ['orientation ' ];
200
+ $ count = $ oFPDI ->setSourceFile ($ file ['name ' ]);
193
201
if ($ file ['pages ' ] == 'all ' ) {
194
- $ count = $ oFPDI ->setSourceFile ($ file ['name ' ]);
195
202
196
203
for ($ i = 1 ; $ i <= $ count ; $ i ++) {
197
204
$ template = $ oFPDI ->importPage ($ i );
You can’t perform that action at this time.
0 commit comments