-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
83 lines (81 loc) · 3.87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Client side browser tool to extract text from a PDF file using PDF.js" />
<meta name="author" content="Mark Bradley" />
<meta name="repo" content="github.com/bradsec/pdftotext" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="theme-color" content="#1d1d1d" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>PDFText.me</title>
<link href="css/reset.css" rel="stylesheet" />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined"
rel="stylesheet"
/>
<link href="css/styles.css" rel="stylesheet" />
</head>
</head>
<body>
<div class="wrapper">
<header>
<div class="header-top">
<div class="branding">PDF<span>Text</span>.me</div>
<div id="theme-switcher">
<svg id="sun-icon" class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<circle class="sun" cx="12" cy="12" r="6" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
<svg id="moon-icon" class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<mask id="moon-mask" class="moon">
<rect x="0" y="0" width="100%" height="100%" fill="currentColor" />
<circle cx="12" cy="10" r="6" fill="white" />
</mask>
<circle class="moon" cx="12" cy="12" r="6" fill="currentColor" />
</svg>
</div>
</div>
<div class="hero">
Convert standard PDF documents to text, all within your browser.
</div>
</header>
<main>
<label for="pdfFile" class="button">Select PDF file</label>
<input type="file" id="pdfFile" accept=".pdf">
<div id="flash-banner" class="flash-banner-container"></div>
<div id="fileName"></div>
<div id="countWrap">
<div id="wordCount">Words [<span id="wordCountNum">0</span>]</div>
<div id="charCount">Characters [<span id="charCountNum">0</span>]</div>
</div>
<textarea id="output" rows="15" cols="80" readonly></textarea>
<button id="downloadButton" disabled>Download as (.txt) text file</button>
<button id="copyButton" disabled>Copy text to clipboard</button>
</main>
<footer>
<p>
Some cleanup will be performed on the extracted text including removing non-standard characters and extra spaces to provide a more readable output. The PDF file is processed locally on your device by your browser using <a href="https://github.com/mozilla/pdf.js/" target="_blank">Mozilla PDF.js</a>.
</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.js"></script>
<script src="js/pdftext.js"></script>
<script src="js/theme.js"></script>
</div>
</body>
</html>