Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Clubphp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Clubphp
Commits
b98c1c14
Commit
b98c1c14
authored
May 24, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GO THERE
parent
7f5b59a3
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
682 additions
and
210 deletions
+682
-210
TutorialController.php
app/Modules/Tutorials/Controllers/TutorialController.php
+2
-2
export_pdf.php
app/Modules/Tutorials/Views/export_pdf.php
+677
-203
PdfExportService.php
app/Shared/Services/PdfExportService.php
+3
-5
No files found.
app/Modules/Tutorials/Controllers/TutorialController.php
View file @
b98c1c14
...
...
@@ -606,7 +606,7 @@ class TutorialController extends Controller
@
unlink
(
$tmpOutput
);
$response
=
new
Response
();
return
$response
->
html
(
$pdfContent
,
200
,
[
return
$response
->
html
(
$pdfContent
,
200
)
->
withHeaders
(
[
'Content-Type'
=>
'application/pdf'
,
'Content-Disposition'
=>
'attachment; filename="Book-of-the-ERP.pdf"'
,
'Content-Length'
=>
(
string
)
strlen
(
$pdfContent
),
...
...
@@ -616,7 +616,7 @@ class TutorialController extends Controller
}
$response
=
new
Response
();
return
$response
->
html
(
$html
,
200
,
[
return
$response
->
html
(
$html
,
200
)
->
withHeaders
(
[
'Content-Type'
=>
'text/html; charset=utf-8'
,
'Content-Disposition'
=>
'attachment; filename="Book-of-the-ERP.html"'
,
]);
...
...
app/Modules/Tutorials/Views/export_pdf.php
View file @
b98c1c14
This diff is collapsed.
Click to expand it.
app/Shared/Services/PdfExportService.php
View file @
b98c1c14
...
...
@@ -23,8 +23,7 @@ final class PdfExportService
$html
=
ob_get_clean
();
$response
=
new
Response
();
return
$response
->
html
(
$html
,
200
,
[
'Content-Type'
=>
'text/html; charset=utf-8'
,
return
$response
->
html
(
$html
,
200
)
->
withHeaders
([
'Content-Disposition'
=>
'attachment; filename="'
.
$filename
.
'"'
,
]);
}
...
...
@@ -61,7 +60,7 @@ final class PdfExportService
@
unlink
(
$tmpOutput
);
$response
=
new
Response
();
return
$response
->
html
(
$pdfContent
,
200
,
[
return
$response
->
html
(
$pdfContent
,
200
)
->
withHeaders
(
[
'Content-Type'
=>
'application/pdf'
,
'Content-Disposition'
=>
'attachment; filename="'
.
$filename
.
'"'
,
'Content-Length'
=>
(
string
)
strlen
(
$pdfContent
),
...
...
@@ -71,8 +70,7 @@ final class PdfExportService
}
$response
=
new
Response
();
return
$response
->
html
(
$html
,
200
,
[
'Content-Type'
=>
'text/html; charset=utf-8'
,
return
$response
->
html
(
$html
,
200
)
->
withHeaders
([
'Content-Disposition'
=>
'attachment; filename="'
.
str_replace
(
'.pdf'
,
'.html'
,
$filename
)
.
'"'
,
]);
}
...
...
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