Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchParapheur
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchParapheur
Commits
3c65ae4e
Commit
3c65ae4e
authored
4 years ago
by
Guillaume Heurtier
Browse files
Options
Downloads
Patches
Plain Diff
FIX #14566 TIME 0:10 fix convert loading time with big pdf file
parent
791a5734
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/convert/controllers/ConvertThumbnailController.php
+5
-6
5 additions, 6 deletions
src/app/convert/controllers/ConvertThumbnailController.php
with
5 additions
and
6 deletions
src/app/convert/controllers/ConvertThumbnailController.php
+
5
−
6
View file @
3c65ae4e
...
...
@@ -18,6 +18,7 @@ namespace Convert\controllers;
use
Docserver\controllers\DocserverController
;
use
Docserver\models\AdrModel
;
use
Docserver\models\DocserverModel
;
use
setasign\Fpdi\Tcpdf\Fpdi
;
use
SrcCore\models\CoreConfigModel
;
use
SrcCore\models\ValidatorModel
;
...
...
@@ -62,9 +63,8 @@ class ConvertThumbnailController
$filename
=
pathinfo
(
$pathToDocument
,
PATHINFO_FILENAME
);
$tmpPath
=
CoreConfigModel
::
getTmpPath
();
$img
=
new
\Imagick
();
$img
->
pingImage
(
$pathToDocument
);
$pageCount
=
$img
->
getNumberImages
();
$pdf
=
new
Fpdi
(
'P'
,
'pt'
);
$pageCount
=
$pdf
->
setSourceFile
(
$pathToDocument
);
$i
=
0
;
while
(
$i
<
$pageCount
)
{
...
...
@@ -141,9 +141,8 @@ class ConvertThumbnailController
$filename
=
pathinfo
(
$pathToDocument
,
PATHINFO_FILENAME
);
$tmpPath
=
CoreConfigModel
::
getTmpPath
();
$img
=
new
\Imagick
();
$img
->
pingImage
(
$pathToDocument
);
$pageCount
=
$img
->
getNumberImages
();
$pdf
=
new
Fpdi
(
'P'
,
'pt'
);
$pageCount
=
$pdf
->
setSourceFile
(
$pathToDocument
);
if
(
$pageCount
<
$args
[
'page'
])
{
return
[
'errors'
=>
'Page does not exist'
];
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment