Skip to content

Commit

Permalink
Pdfjs legacy (#1214)
Browse files Browse the repository at this point in the history
* first test

* second test

* revert to composer but take legacy pdfjs

* remove pdfjs-dist yarn dep

---------

Co-authored-by: Florian Schmitt <[email protected]>
Co-authored-by: acheype <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent f75f60c commit a45bcb7
Show file tree
Hide file tree
Showing 88 changed files with 28,371 additions and 4,169 deletions.
346 changes: 169 additions & 177 deletions composer.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions includes/ComposerScriptsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private static function extractPdfJsDistFileUrl(array $data): array
foreach ($data['assets'] as $asset) {
if (!empty($asset['name']) && is_string($asset['name'])
&& !empty($asset['browser_download_url']) && is_string($asset['browser_download_url'])
&& preg_match("/^pdfjs-(\d+)\.(\d+)\.(\d+)-dist\.zip$/i", $asset['name'], $match)) {
&& preg_match("/^pdfjs-(\d+)\.(\d+)\.(\d+)-legacy-dist\.zip$/i", $asset['name'], $match)) {
return [
'fileName' => $asset['name'],
'url' => $asset['browser_download_url'],
Expand Down Expand Up @@ -142,7 +142,7 @@ private static function updatePdfJsDist(array $params)
echo "!! Zip not downloaded : $zipContent\n";
}
} else {
echo "erro while putting zip into $tmpFileName\n";
echo "erro while putting zip into $tmpFilename\n";
}
} else {
echo "Not possible to create a tempfile !\n";
Expand Down
2 changes: 1 addition & 1 deletion javascripts/vendor/extract-files-from-node-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ cp -f node_modules/ace-builds/src-min-noconflict/ext-searchbox.js tools/aceditor
mkdir -p javascripts/vendor/iframe-resizer && \
cp -f node_modules/iframe-resizer/js/iframeResizer.min.js javascripts/vendor/iframe-resizer && \
cp -f node_modules/iframe-resizer/js/iframeResizer.contentWindow.min.js javascripts/vendor/iframe-resizer && \
cp -f node_modules/iframe-resizer/LICENSE javascripts/vendor/iframe-resizer
cp -f node_modules/iframe-resizer/LICENSE javascripts/vendor/iframe-resizer
Loading

0 comments on commit a45bcb7

Please sign in to comment.