mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-11 05:18:40 +00:00
impruve pdf rendering
This commit is contained in:
parent
f90946aa5d
commit
54c1f8783d
|
|
@ -35,9 +35,45 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||||
|
|
||||||
<script src="viewer.js"></script>
|
<script src="viewer.js"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.spinner-1 {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
margin: 50px auto;
|
||||||
|
-webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
|
||||||
|
animation: sk-rotateplane 1.2s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes sk-rotateplane {
|
||||||
|
0% { -webkit-transform: perspective(120px) }
|
||||||
|
50% { -webkit-transform: perspective(120px) rotateY(180deg) }
|
||||||
|
100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes sk-rotateplane {
|
||||||
|
0% {
|
||||||
|
transform: perspective(120px) rotateX(0deg) rotateY(0deg);
|
||||||
|
-webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
|
||||||
|
} 50% {
|
||||||
|
transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
|
||||||
|
-webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
|
||||||
|
} 100% {
|
||||||
|
transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
|
||||||
|
-webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#outerContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body tabindex="1" class="loadingInProgress">
|
<body tabindex="1" class="loadingInProgress">
|
||||||
|
<div id="contentSpinner" class="spinner-1"></div>
|
||||||
<div id="outerContainer">
|
<div id="outerContainer">
|
||||||
|
|
||||||
<div id="sidebarContainer">
|
<div id="sidebarContainer">
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,45 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||||
|
|
||||||
<script src="viewer.js"></script>
|
<script src="viewer.js"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.spinner-1 {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
margin: 50px auto;
|
||||||
|
-webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
|
||||||
|
animation: sk-rotateplane 1.2s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes sk-rotateplane {
|
||||||
|
0% { -webkit-transform: perspective(120px) }
|
||||||
|
50% { -webkit-transform: perspective(120px) rotateY(180deg) }
|
||||||
|
100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes sk-rotateplane {
|
||||||
|
0% {
|
||||||
|
transform: perspective(120px) rotateX(0deg) rotateY(0deg);
|
||||||
|
-webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
|
||||||
|
} 50% {
|
||||||
|
transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
|
||||||
|
-webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
|
||||||
|
} 100% {
|
||||||
|
transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
|
||||||
|
-webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#outerContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body tabindex="1" class="loadingInProgress">
|
<body tabindex="1" class="loadingInProgress">
|
||||||
|
<div id="contentSpinner" class="spinner-1"></div>
|
||||||
<div id="outerContainer">
|
<div id="outerContainer">
|
||||||
|
|
||||||
<div id="sidebarContainer">
|
<div id="sidebarContainer">
|
||||||
|
|
|
||||||
|
|
@ -906,6 +906,8 @@ const PDFViewerApplication = {
|
||||||
loadingTask.onUnsupportedFeature = this.fallback.bind(this);
|
loadingTask.onUnsupportedFeature = this.fallback.bind(this);
|
||||||
return loadingTask.promise.then(pdfDocument => {
|
return loadingTask.promise.then(pdfDocument => {
|
||||||
this.load(pdfDocument);
|
this.load(pdfDocument);
|
||||||
|
document.getElementById('contentSpinner').style.display = 'none';
|
||||||
|
document.getElementById('outerContainer').style.display = 'block';
|
||||||
}, exception => {
|
}, exception => {
|
||||||
if (loadingTask !== this.pdfLoadingTask) {
|
if (loadingTask !== this.pdfLoadingTask) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
@ -1278,7 +1280,7 @@ const PDFViewerApplication = {
|
||||||
this.documentInfo = info;
|
this.documentInfo = info;
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
this.contentDispositionFilename = contentDispositionFilename;
|
this.contentDispositionFilename = contentDispositionFilename;
|
||||||
console.log(`PDF ${pdfDocument.fingerprint} [${info.PDFFormatVersion} ` + `${(info.Producer || "-").trim()} / ${(info.Creator || "-").trim()}] ` + `(PDF.js: ${_pdfjsLib.version || "-"}` + `${this.pdfViewer.enableWebGL ? " [WebGL]" : ""})`);
|
|
||||||
let pdfTitle;
|
let pdfTitle;
|
||||||
const infoTitle = info && info.Title;
|
const infoTitle = info && info.Title;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ class TCPDF_STATIC {
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function getTCPDFProducer() {
|
public static function getTCPDFProducer() {
|
||||||
return "\x54\x43\x50\x44\x46\x20".self::getTCPDFVersion()."\x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29";
|
return "\x3F "; // Don't show TCPDF version to hide from crawlers in case of vulnerabilities
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user