fork from https://github.com/mozilla/pdf.js.git
This commit is contained in:
137
web/internal/debugger.html
Normal file
137
web/internal/debugger.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Copyright 2026 Mozilla Foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>PDF.js — Debugging tools</title>
|
||||
<link rel="stylesheet" href="debugger.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h1>PDF.js — Debugging tools</h1>
|
||||
<span id="pdf-info" aria-live="polite"></span>
|
||||
</div>
|
||||
<div id="controls" role="toolbar" aria-label="PDF viewer controls">
|
||||
<label for="file-input">PDF file:</label>
|
||||
<input type="file" id="file-input" accept=".pdf" />
|
||||
<label for="goto-input">Go to:</label>
|
||||
<input type="text" id="goto-input" placeholder="num, numR, numRgen" size="18" disabled aria-describedby="goto-input-hint" aria-invalid="false" />
|
||||
<span id="goto-input-hint" class="sr-only">
|
||||
Enter a page number (e.g. 5), a reference as numR (e.g. 10R) or numRgen (e.g. 10R2). Press Enter to navigate.
|
||||
</span>
|
||||
<button id="tree-button">Tree</button>
|
||||
<button id="debug-button" disabled>Debug</button>
|
||||
<span id="status" role="status" aria-live="polite"> Select a PDF file to explore its internal structure. </span>
|
||||
<a id="github-link" href="https://github.com/mozilla/pdf.js" target="_blank" rel="noopener noreferrer" aria-label="PDF.js on GitHub">
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<path
|
||||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<div id="tree" role="tree" aria-label="PDF internal structure"></div>
|
||||
<div id="debug-view" hidden>
|
||||
<div id="render-panels">
|
||||
<div id="op-left-col">
|
||||
<div id="op-list-panel">
|
||||
<div id="op-list" role="listbox" aria-label="Operator list"></div>
|
||||
</div>
|
||||
<div id="op-detail-panel"></div>
|
||||
<div id="gfx-state-panel" aria-label="Graphics state" hidden></div>
|
||||
</div>
|
||||
<div id="font-panel" hidden></div>
|
||||
<div id="canvas-panel">
|
||||
<div id="canvas-toolbar" role="toolbar" aria-label="Zoom controls">
|
||||
<div class="toolbar-left">
|
||||
<button id="text-filter-button" title="Show only text drawing operations" aria-pressed="false">T</button>
|
||||
<button id="text-layer-color-button" title="Text layer color">
|
||||
<span id="text-layer-color-swatch"></span>
|
||||
</button>
|
||||
<input type="color" id="text-layer-color-input" hidden />
|
||||
<button id="text-span-border-button" title="Show span borders" aria-pressed="false">
|
||||
<svg
|
||||
width="18"
|
||||
height="14"
|
||||
viewBox="0 0 18 14"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.5"
|
||||
stroke-dasharray="2 1.5"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<rect x="0.75" y="0.75" width="16.5" height="12.5" />
|
||||
</svg>
|
||||
</button>
|
||||
<button id="font-view-button" title="Show fonts used on page" aria-pressed="false">F</button>
|
||||
</div>
|
||||
<div class="toolbar-center">
|
||||
<button id="zoom-out-button" title="Zoom out">−</button>
|
||||
<span id="zoom-level" aria-live="polite"></span>
|
||||
<button id="zoom-in-button" title="Zoom in">+</button>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<button id="redraw-button" title="Redraw page">Redraw</button>
|
||||
<button id="step-button" title="Step one instruction" disabled><u>S</u>tep</button>
|
||||
<button id="continue-button" title="Continue to next breakpoint" disabled><u>C</u>ontinue</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="canvas-scroll">
|
||||
<div id="canvas-wrapper">
|
||||
<div class="canvas-checker">
|
||||
<canvas id="render-canvas"></canvas>
|
||||
</div>
|
||||
<canvas id="highlight-canvas" aria-hidden="true"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dialog id="password-dialog" aria-labelledby="password-dialog-title">
|
||||
<form method="dialog">
|
||||
<p id="password-dialog-title"></p>
|
||||
<label for="password-input">Password:</label>
|
||||
<input type="password" id="password-input" autocomplete="current-password" />
|
||||
<div class="password-dialog-buttons">
|
||||
<button type="submit" id="password-submit">OK</button>
|
||||
<button type="button" id="password-cancel">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<!--#if GENERIC-->
|
||||
<!--<script src="../build/pdf.mjs" type="module"></script>-->
|
||||
<!--<script src="debugger.mjs" type="module"></script>-->
|
||||
<!--#else-->
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"pdfjs/": "../../src/",
|
||||
"pdfjs-lib": "../../src/pdf.js",
|
||||
|
||||
"display-binary_data_factory": "../../src/display/binary_data_factory.js",
|
||||
"display-network_stream": "../../src/display/network_stream.js",
|
||||
"display-node_utils": "../../src/display/stubs.js"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="debugger.js" type="module"></script>
|
||||
<!--#endif-->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user