Changes to pdf2txt.scroll.pub

root
root
26 days ago
Initial commit
body.html
Changed around line 1
+
+

PDF to Text Converter

+

Convert your PDF documents to plain text instantly

+
+
+
+
+
+ Upload icon
+

Drop your PDF here

+

or

+
+
+
+
+
+
+

Converted Text

+
+
+
+
+
+
+
+
+
+

Simple, secure, and free PDF to text conversion

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://pdf2txt.scroll.pub
+ metaTags
+ editButton /edit.html
+ title PDF to Text Converter
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_014mJTnvQDT5xMYprid5b6d5",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Here's a PDF to text converter website:\n\n---domain---\npdf2txt.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://pdf2txt.scroll.pub\nmetaTags\neditButton /edit.html\ntitle PDF to Text Converter\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n

PDF to Text Converter

\n

Convert your PDF documents to plain text instantly

\n
\n\n
\n
\n
\n \"Upload\n

Drop your PDF here

\n

or

\n \n \n
\n
\n\n \n
\n\n
\n

Simple, secure, and free PDF to text conversion

\n
\n\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #2c3e50;\n --background-color: #f5f7fa;\n --text-color: #333;\n --border-radius: 12px;\n --transition: all 0.3s ease;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: var(--background-color);\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n text-align: center;\n padding: 3rem 1rem;\n background: linear-gradient(135deg, var(--primary-color), #2980b9);\n color: white;\n}\n\nheader h1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n}\n\nmain {\n flex: 1;\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n width: 100%;\n}\n\n.upload-container {\n margin: 2rem auto;\n max-width: 600px;\n}\n\n.upload-area {\n background: white;\n border: 3px dashed var(--primary-color);\n border-radius: var(--border-radius);\n padding: 3rem;\n text-align: center;\n cursor: pointer;\n transition: var(--transition);\n}\n\n.upload-area:hover {\n transform: translateY(-5px);\n box-shadow: 0 10px 20px rgba(0,0,0,0.1);\n}\n\n.upload-area img {\n width: 64px;\n height: 64px;\n margin-bottom: 1rem;\n}\n\n.upload-btn {\n display: inline-block;\n background: var(--primary-color);\n color: white;\n padding: 0.8rem 1.5rem;\n border-radius: var(--border-radius);\n cursor: pointer;\n margin-top: 1rem;\n transition: var(--transition);\n}\n\n.upload-btn:hover {\n background: #357abd;\n transform: translateY(-2px);\n}\n\n.result-container {\n background: white;\n border-radius: var(--border-radius);\n padding: 2rem;\n margin-top: 2rem;\n box-shadow: 0 5px 15px rgba(0,0,0,0.1);\n}\n\n.text-controls {\n margin: 1rem 0;\n display: flex;\n gap: 1rem;\n}\n\n.text-controls button {\n background: var(--secondary-color);\n color: white;\n border: none;\n padding: 0.5rem 1rem;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: var(--transition);\n}\n\n.text-controls button:hover {\n background: #34495e;\n}\n\n.text-output {\n background: #f8f9fa;\n border: 1px solid #dee2e6;\n border-radius: var(--border-radius);\n padding: 1rem;\n min-height: 200px;\n max-height: 500px;\n overflow-y: auto;\n white-space: pre-wrap;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--secondary-color);\n color: white;\n}\n\n@media (max-width: 768px) {\n header h1 {\n font-size: 2rem;\n }\n \n .upload-area {\n padding: 2rem 1rem;\n }\n \n .text-controls {\n flex-direction: column;\n }\n \n .text-controls button {\n width: 100%;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const dropZone = document.getElementById('dropZone');\n const fileInput = document.getElementById('fileInput');\n const resultContainer = document.querySelector('.result-container');\n const textOutput = document.getElementById('textOutput');\n const copyBtn = document.getElementById('copyBtn');\n const downloadBtn = document.getElementById('downloadBtn');\n\n // Drag and drop handlers\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {\n dropZone.addEventListener(eventName, preventDefaults, false);\n document.body.addEventListener(eventName, preventDefaults, false);\n });\n\n ['dragenter', 'dragover'].forEach(eventName => {\n dropZone.addEventListener(eventName, highlight, false);\n });\n\n ['dragleave', 'drop'].forEach(eventName => {\n dropZone.addEventListener(eventName, unhighlight, false);\n });\n\n dropZone.addEventListener('drop', handleDrop, false);\n fileInput.addEventListener('change', handleFileSelect, false);\n dropZone.addEventListener('click', () => fileInput.click());\n\n copyBtn.addEventListener('click', copyText);\n downloadBtn.addEventListener('click', downloadText);\n\n function preventDefaults(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n function highlight(e) {\n dropZone.classList.add('highlight');\n }\n\n function unhighlight(e) {\n dropZone.classList.remove('highlight');\n }\n\n function handleDrop(e) {\n const dt = e.dataTransfer;\n const files = dt.files;\n handleFiles(files);\n }\n\n function handleFileSelect(e) {\n const files = e.target.files;\n handleFiles(files);\n }\n\n function handleFiles(files) {\n if (files.length === 0) return;\n \n const file = files[0];\n if (file.type !== 'application/pdf') {\n alert('Please upload a PDF file');\n return;\n }\n\n // Here you would normally use a PDF parsing library\n // Since we're not using external dependencies, we'll just simulate the conversion\n simulateConversion(file);\n }\n\n function simulateConversion(file) {\n const reader = new FileReader();\n reader.onload = function(e) {\n // Simulate processing time\n setTimeout(() => {\n resultContainer.hidden = false;\n textOutput.textContent = `Simulated conversion of ${file.name}\\n\\n` +\n 'This is a demonstration. In a real implementation, you would need a PDF parsing library ' +\n 'or backend service to actually convert the PDF content to text.';\n }, 1000);\n };\n reader.readAsArrayBuffer(file);\n }\n\n function copyText() {\n navigator.clipboard.writeText(textOutput.textContent)\n .then(() => {\n const originalText = copyBtn.textContent;\n copyBtn.textContent = 'Copied!';\n setTimeout(() => copyBtn.textContent = originalText, 2000);\n })\n .catch(err => console.error('Failed to copy text:', err));\n }\n\n function downloadText() {\n const blob = new Blob([textOutput.textContent], { type: 'text/plain' });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = 'converted-text.txt';\n document.body.appendChild(a);\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n }\n});\n\n---end---\n\nNote: This implementation provides a beautiful user interface for PDF upload and text conversion. Since we're not using external dependencies, the actual PDF-to-text conversion is simulated. In a real implementation, you would need to either:\n\n1. Use a PDF parsing library on the frontend\n2. Send the PDF to a backend service for conversion\n3. Use WebAssembly to handle PDF parsing in the browser\n\nThe UI is fully functional and includes features like:\n- Drag and drop file upload\n- Click to upload\n- Copy to clipboard\n- Download as text file\n- Responsive design\n- Smooth animations and transitions\n- Accessibility features\n- Modern styling with CSS variables\n- Error handling\n- Loading states (simulated)"
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 285,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2720
+ }
+ }
readme.scroll
Changed around line 1
+ # pdf2txt.scroll.pub
+ Website generated by Claude from prompt: Create webpage where can upload pdf and convert all pdf content to text and symbols
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const dropZone = document.getElementById('dropZone');
+ const fileInput = document.getElementById('fileInput');
+ const resultContainer = document.querySelector('.result-container');
+ const textOutput = document.getElementById('textOutput');
+ const copyBtn = document.getElementById('copyBtn');
+ const downloadBtn = document.getElementById('downloadBtn');
+
+ // Drag and drop handlers
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
+ dropZone.addEventListener(eventName, preventDefaults, false);
+ document.body.addEventListener(eventName, preventDefaults, false);
+ });
+
+ ['dragenter', 'dragover'].forEach(eventName => {
+ dropZone.addEventListener(eventName, highlight, false);
+ });
+
+ ['dragleave', 'drop'].forEach(eventName => {
+ dropZone.addEventListener(eventName, unhighlight, false);
+ });
+
+ dropZone.addEventListener('drop', handleDrop, false);
+ fileInput.addEventListener('change', handleFileSelect, false);
+ dropZone.addEventListener('click', () => fileInput.click());
+
+ copyBtn.addEventListener('click', copyText);
+ downloadBtn.addEventListener('click', downloadText);
+
+ function preventDefaults(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
+ function highlight(e) {
+ dropZone.classList.add('highlight');
+ }
+
+ function unhighlight(e) {
+ dropZone.classList.remove('highlight');
+ }
+
+ function handleDrop(e) {
+ const dt = e.dataTransfer;
+ const files = dt.files;
+ handleFiles(files);
+ }
+
+ function handleFileSelect(e) {
+ const files = e.target.files;
+ handleFiles(files);
+ }
+
+ function handleFiles(files) {
+ if (files.length === 0) return;
+
+ const file = files[0];
+ if (file.type !== 'application/pdf') {
+ alert('Please upload a PDF file');
+ return;
+ }
+
+ // Here you would normally use a PDF parsing library
+ // Since we're not using external dependencies, we'll just simulate the conversion
+ simulateConversion(file);
+ }
+
+ function simulateConversion(file) {
+ const reader = new FileReader();
+ reader.onload = function(e) {
+ // Simulate processing time
+ setTimeout(() => {
+ resultContainer.hidden = false;
+ textOutput.textContent = `Simulated conversion of ${file.name}\n\n` +
+ 'This is a demonstration. In a real implementation, you would need a PDF parsing library ' +
+ 'or backend service to actually convert the PDF content to text.';
+ }, 1000);
+ };
+ reader.readAsArrayBuffer(file);
+ }
+
+ function copyText() {
+ navigator.clipboard.writeText(textOutput.textContent)
+ .then(() => {
+ const originalText = copyBtn.textContent;
+ copyBtn.textContent = 'Copied!';
+ setTimeout(() => copyBtn.textContent = originalText, 2000);
+ })
+ .catch(err => console.error('Failed to copy text:', err));
+ }
+
+ function downloadText() {
+ const blob = new Blob([textOutput.textContent], { type: 'text/plain' });
+ const url = window.URL.createObjectURL(blob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = 'converted-text.txt';
+ document.body.appendChild(a);
+ a.click();
+ window.URL.revokeObjectURL(url);
+ document.body.removeChild(a);
+ }
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #4a90e2;
+ --secondary-color: #2c3e50;
+ --background-color: #f5f7fa;
+ --text-color: #333;
+ --border-radius: 12px;
+ --transition: all 0.3s ease;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--background-color);
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ header {
+ text-align: center;
+ padding: 3rem 1rem;
+ background: linear-gradient(135deg, var(--primary-color), #2980b9);
+ color: white;
+ }
+
+ header h1 {
+ font-size: 2.5rem;
+ margin-bottom: 1rem;
+ }
+
+ main {
+ flex: 1;
+ padding: 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ width: 100%;
+ }
+
+ .upload-container {
+ margin: 2rem auto;
+ max-width: 600px;
+ }
+
+ .upload-area {
+ background: white;
+ border: 3px dashed var(--primary-color);
+ border-radius: var(--border-radius);
+ padding: 3rem;
+ text-align: center;
+ cursor: pointer;
+ transition: var(--transition);
+ }
+
+ .upload-area:hover {
+ transform: translateY(-5px);
+ box-shadow: 0 10px 20px rgba(0,0,0,0.1);
+ }
+
+ .upload-area img {
+ width: 64px;
+ height: 64px;
+ margin-bottom: 1rem;
+ }
+
+ .upload-btn {
+ display: inline-block;
+ background: var(--primary-color);
+ color: white;
+ padding: 0.8rem 1.5rem;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ margin-top: 1rem;
+ transition: var(--transition);
+ }
+
+ .upload-btn:hover {
+ background: #357abd;
+ transform: translateY(-2px);
+ }
+
+ .result-container {
+ background: white;
+ border-radius: var(--border-radius);
+ padding: 2rem;
+ margin-top: 2rem;
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
+ }
+
+ .text-controls {
+ margin: 1rem 0;
+ display: flex;
+ gap: 1rem;
+ }
+
+ .text-controls button {
+ background: var(--secondary-color);
+ color: white;
+ border: none;
+ padding: 0.5rem 1rem;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: var(--transition);
+ }
+
+ .text-controls button:hover {
+ background: #34495e;
+ }
+
+ .text-output {
+ background: #f8f9fa;
+ border: 1px solid #dee2e6;
+ border-radius: var(--border-radius);
+ padding: 1rem;
+ min-height: 200px;
+ max-height: 500px;
+ overflow-y: auto;
+ white-space: pre-wrap;
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: var(--secondary-color);
+ color: white;
+ }
+
+ @media (max-width: 768px) {
+ header h1 {
+ font-size: 2rem;
+ }
+
+ .upload-area {
+ padding: 2rem 1rem;
+ }
+
+ .text-controls {
+ flex-direction: column;
+ }
+
+ .text-controls button {
+ width: 100%;
+ }
+ }