Compare commits

...

32 Commits

Author SHA1 Message Date
Anthony Stirling
d532db91f9 fixes for #438 and #423 2023-10-28 10:40:26 +01:00
Anthony Stirling
bd0bf404f5 Merge pull request #445 from DimK10/Feature-request-pdf-reader
Adds navbar logo to pdf viewer
2023-10-27 18:28:33 +01:00
Dimitris Kaitantzidis
e51a9c209a Merge branch 'main' into Feature-request-pdf-reader 2023-10-27 20:11:14 +03:00
Dimitrios Kaitantzidis
6bf172fb25 Adds navbar logo to pdf viewer 2023-10-27 20:08:13 +03:00
Anthony Stirling
a1e93e0f5d Update .gitattributes 2023-10-25 22:07:05 +01:00
Anthony Stirling
6392f6ec12 Merge pull request #442 from joleaf/main
Fix help text in addPageNumbers.customNumberDesc
2023-10-25 10:20:33 +01:00
joleaf
fbdff5c97f Update messages_it_IT.properties - fix helptext addPageNumbers.customNumberDesc 2023-10-25 10:55:13 +02:00
joleaf
2ecc4ed080 Update messages_es_ES.properties - Fix helptext addPageNumbers.customNumberDesc 2023-10-25 10:54:21 +02:00
joleaf
3318cb96b2 Update messages_de_DE.properties - fix helptext addPageNumbers.customNumberDesc 2023-10-25 10:53:10 +02:00
Anthony Stirling
ab1297aee0 Version bump and readme change 2023-10-22 23:14:18 +01:00
Anthony Stirling
25a0cb7681 Merge pull request #439 from DimK10/Feature-request-pdf-reader
Feature request pdf reader
2023-10-22 23:02:14 +01:00
Dimitrios Kaitantzidis
116b034878 Adds support for greek language. 2023-10-23 00:56:53 +03:00
Dimitrios Kaitantzidis
038de2e264 Adds ignore for .idea folder entirely 2023-10-23 00:43:43 +03:00
Dimitrios Kaitantzidis
7e51cf8c5a Removes .idea files and updates README.md. 2023-10-23 00:40:03 +03:00
Dimitrios Kaitantzidis
a1eadba769 Fixes .idea ignored files. 2023-10-23 00:27:36 +03:00
Dimitrios Kaitantzidis
3145f5fdd0 Feature ready. 2023-10-23 00:12:13 +03:00
Dimitrios Kaitantzidis
8393dd4731 Deletes unnecessary files 2023-10-22 20:54:23 +03:00
Dimitrios Kaitantzidis
768877d969 Reader works correctly 2023-10-22 20:32:19 +03:00
Dimitrios Kaitantzidis
14a90f5e50 WIP: No errors but nothing is working 2023-10-22 20:16:59 +03:00
Dimitrios Kaitantzidis
99b0150e7a WIP: Adds Drap and drop 2023-10-21 11:26:58 +03:00
Anthony Stirling
3be12c8988 Merge pull request #424 from DimK10/Bug-Multitool-Filename
Bug multitool filename
2023-10-15 17:37:46 +01:00
Dimitrios Kaitantzidis
89345c8d60 Removes commas in multiple dots with text. 2023-10-15 19:10:30 +03:00
Dimitrios Kaitantzidis
49f1f4e7c7 Fixes bug with unfinished filename extension (multiple dots problem) 2023-10-15 19:03:10 +03:00
Dimitrios Kaitantzidis
d0ce7db9ee Fixes bug with unfinished filename extension (file.p) 2023-10-15 18:35:39 +03:00
Dimitrios Kaitantzidis
53a0291cc2 Adds requested changes 2023-10-15 16:49:12 +03:00
Dimitrios Kaitantzidis
9a3bc839dd Merge remote-tracking branch 'origin/Bug-Multitool-Filename' into Bug-Multitool-Filename 2023-10-14 00:38:16 +03:00
Dimitrios Kaitantzidis
e519840bd6 Fixes issue with light theme support. 2023-10-14 00:37:52 +03:00
Dimitris Kaitantzidis
ed32a3ca33 Merge branch 'main' into Bug-Multitool-Filename 2023-10-14 00:06:36 +03:00
Dimitrios Kaitantzidis
369ac99a16 Fixes issue. 2023-10-14 00:03:08 +03:00
Dimitrios Kaitantzidis
74da8c340d Adds support for disabled filename input if not pdf is loaded. Need to disable the input if all pages are deleted. 2023-10-10 20:24:11 +03:00
Dimitrios Kaitantzidis
323745e61f Change in name works. 2023-10-08 19:57:19 +03:00
Dimitrios Kaitantzidis
a1b7aaddb8 Changes filename using js, but the old filename persists in download 2023-10-08 18:59:43 +03:00
388 changed files with 66615 additions and 24029 deletions

1
.gitattributes vendored
View File

@@ -1,5 +1,6 @@
# Ignore all JavaScript files in a directory
src/main/resources/static/pdfjs/* linguist-vendored
src/main/resources/static/pdfjs/** linguist-vendored
src/main/resources/static/css/bootstrap-icons.css linguist-vendored
src/main/resources/static/css/bootstrap.min.css linguist-vendored
src/main/resources/static/css/fonts/* linguist-vendored

3
.gitignore vendored
View File

@@ -119,4 +119,5 @@ watchedFolders/
*.db
/build
/.vscode
/.vscode
/.idea

View File

@@ -32,6 +32,7 @@ Feel free to request any features or bug fixes either in github issues or our [D
## **PDF Features**
### **Page Operations**
- View and modify PDFs - View multi page PDFs with custom viewing sorting and searching. Plus on page edit features like annotate, draw and adding text and images. (Using PDF.js with Joxit and Liberation.Liberation fonts)
- Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages.
- Merge multiple PDFs together into a single resultant file.
- Split PDFs into multiple files at specified page numbers or extract all pages as individual files.
@@ -144,7 +145,7 @@ services:
Please view https://github.com/Frooodle/Stirling-PDF/blob/main/HowToUseOCR.md
## Want to add your own language?
Stirling PDF currently supports 18!
Stirling PDF currently supports 19!
- English (English) (en_GB)
- English (US) (en_US)
- Arabic (العربية) (ar_AR)
@@ -163,6 +164,7 @@ Stirling PDF currently supports 18!
- Basque (Euskara) (eu_ES)
- Japanese (日本語) (ja_JP)
- Dutch (Nederlands) (nl_NL)
- Greek (el_GR)
If you want to add your own language to Stirling-PDF please refer
https://github.com/Frooodle/Stirling-PDF/blob/main/HowToAddNewLanguage.md
@@ -257,7 +259,6 @@ For API usage you must provide a header with 'X-API-Key' and the associated API
- Folder support with auto scanning to perform operations on
- Redact text (Via UI not just automated way)
- Add Forms
- Annotations
- Multi page layout (Stich PDF pages together) support x rows y columns and custom page sizing
- Fill forms mannual and automatic

View File

@@ -8,7 +8,7 @@ plugins {
}
group = 'stirling.software'
version = '0.14.5'
version = '0.15.0'
sourceCompatibility = '17'
repositories {

View File

@@ -27,7 +27,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import stirling.software.SPDF.model.api.PDFWithPageNums;
import stirling.software.SPDF.utils.WebResponseUtils;
import org.apache.pdfbox.multipdf.Splitter;
@RestController
@RequestMapping("/api/v1/general")
@Tag(name = "General", description = "General APIs")
@@ -50,24 +50,26 @@ public class SplitPDFController {
pageNumbers.add(document.getNumberOfPages()- 1);
logger.info("Splitting PDF into pages: {}", pageNumbers.stream().map(String::valueOf).collect(Collectors.joining(",")));
Splitter splitter = new Splitter();
// split the document
List<ByteArrayOutputStream> splitDocumentsBoas = new ArrayList<>();
int previousPageNumber = 1; // PDFBox uses 1-based indexing for pages.
int previousPageNumber = 0;
for (int splitPoint : pageNumbers) {
splitPoint = splitPoint + 1;
splitter.setStartPage(previousPageNumber);
splitter.setEndPage(splitPoint);
List<PDDocument> splitDocuments = splitter.split(document);
try (PDDocument splitDocument = new PDDocument()) {
for (int i = previousPageNumber; i <= splitPoint; i++) {
PDPage page = document.getPage(i);
splitDocument.addPage(page);
logger.debug("Adding page {} to split document", i);
}
previousPageNumber = splitPoint + 1;
for (PDDocument splitDoc : splitDocuments) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
splitDoc.save(baos);
splitDocumentsBoas.add(baos);
splitDoc.close();
}
splitDocument.save(baos);
previousPageNumber = splitPoint + 1;
splitDocumentsBoas.add(baos);
} catch (Exception e) {
logger.error("Failed splitting documents and saving them", e);
throw e;
}
}
@@ -106,4 +108,4 @@ public class SplitPDFController {
}
}
}

View File

@@ -1,18 +1,9 @@
package stirling.software.SPDF.controller.web;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
@@ -21,11 +12,14 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Controller
@Tag(name = "General", description = "General APIs")
@@ -80,7 +74,13 @@ public class GeneralWebController {
model.addAttribute("currentPage", "merge-pdfs");
return "merge-pdfs";
}
@GetMapping("/view-pdf")
@Hidden
public String ViewPdfForm2(Model model) {
model.addAttribute("currentPage", "view-pdf");
return "view-pdf";
}
@GetMapping("/multi-tool")
@Hidden

View File

@@ -430,7 +430,7 @@ addPageNumbers.selectText.5=Seiten zu nummerieren
addPageNumbers.selectText.6=Benutzerdefinierter Text
addPageNumbers.customTextDesc=Benutzerdefinierter Text
addPageNumbers.numberPagesDesc=Welche Seiten nummeriert werden sollen, Standardeinstellung 'alle' ('all'), akzeptiert auch 1-5 oder 2,5,9 usw.
addPageNumbers.customNumberDesc=Standardmäßig {n}, akzeptiert auch 'Seite {n} von {insgesamt}', 'Text-{n}', '{Dateiname}-{n} ('{filename}-{n})
addPageNumbers.customNumberDesc=Standardmäßig {n}, akzeptiert auch 'Seite {n} von {total}', 'Text-{n}', '{filename}-{n}'
addPageNumbers.submit=Seitenzahlen hinzufügen

View File

@@ -127,6 +127,9 @@ adminUserSettings.submit=\u0391\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\
#############
home.desc= \u0397 \u03C4\u03BF\u03C0\u03B9\u03BA\u03AC \u03C6\u03B9\u03BB\u03BF\u03BE\u03B5\u03BD\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 one-stop-shop \u03C3\u03B1\u03C2 \u03B3\u03B9\u03B1 \u03CC\u03BB\u03B5\u03C2 \u03C4\u03B9\u03C2 \u03B1\u03BD\u03AC\u03B3\u03BA\u03B5\u03C2 \u03C3\u03B1\u03C2 \u03C3\u03B5 PDF.
home.viewPdf.title=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 PDF
home.viewPdf.desc=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7, \u03C0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C7\u03B5\u03B4\u03AF\u03BF\u03C5, \u03C0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 \u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD
viewPdf.tags=view,read,annotate,text,image
home.multiTool.title=PDF \u03A0\u03BF\u03BB\u03C5\u03B5\u03C1\u03B3\u03B1\u03BB\u03B5\u03AF\u03BF
home.multiTool.desc=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7, \u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE, \u0391\u03BD\u03B1\u03B4\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03BA\u03B1\u03B9 \u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD

View File

@@ -126,6 +126,9 @@ adminUserSettings.submit=Save User
# HOME-PAGE #
#############
home.desc=Your locally hosted one-stop-shop for all your PDF needs.
home.viewPdf.title=View PDF
home.viewPdf.desc=View, annotate, add text or images
viewPdf.tags=view,read,annotate,text,image
home.multiTool.title=PDF Multi Tool
@@ -629,7 +632,9 @@ merge.submit=Merge
pdfOrganiser.title=Page Organizer
pdfOrganiser.header=PDF Page Organizer
pdfOrganiser.submit=Rearrange Pages
#view pdf
viewPdf.title=View PDF
viewPdf.header=View PDF
#multiTool
multiTool.title=PDF Multi Tool

View File

@@ -429,8 +429,8 @@ addPageNumbers.selectText.4=Número de inicio
addPageNumbers.selectText.5=Páginas a numerar
addPageNumbers.selectText.6=Texto personalizado
addPageNumbers.customTextDesc=Texto personalizado
addPageNumbers.numberPagesDesc=Qué páginas numerar, por defecto 'todas', también acepta 1-5 o 2,5,9 etc
addPageNumbers.customNumberDesc=Por defecto a {n}, también acepta 'Página {n} de {total}', 'Texto-{n}', '{nombre de archivo}-{n}
addPageNumbers.numberPagesDesc=Qué páginas numerar, por defecto 'all', también acepta 1-5 o 2,5,9 etc
addPageNumbers.customNumberDesc=Por defecto a {n}, también acepta 'Página {n} de {total}', 'Texto-{n}', '{filename}-{n}
addPageNumbers.submit=Añadir Números de Página

View File

@@ -429,8 +429,8 @@ addPageNumbers.selectText.4=Numero di partenza
addPageNumbers.selectText.5=Pagine da numerare
addPageNumbers.selectText.6=Testo personalizzato
addPageNumbers.customTextDesc=Testo personalizzato
addPageNumbers.numberPagesDesc=Quali pagine numerare, impostazione predefinita "tutte", accetta anche 1-5 o 2,5,9 ecc
addPageNumbers.customNumberDesc=Il valore predefinito è {n}, accetta anche 'Pagina {n} di {totale}', 'Testo-{n}', '{nomefile}-{n}
addPageNumbers.numberPagesDesc=Quali pagine numerare, impostazione predefinita "all", accetta anche 1-5 o 2,5,9 ecc
addPageNumbers.customNumberDesc=Il valore predefinito è {n}, accetta anche 'Pagina {n} di {total}', 'Testo-{n}', '{filename}-{n}
addPageNumbers.submit=Aggiungi numeri di pagina

View File

@@ -91,3 +91,26 @@ hr {
border-color: rgba(255, 255, 255, 0.6); /* semi-transparent white */
background-color: rgba(255, 255, 255, 0.6); /* for some browsers that might use background instead of border for <hr> */
}
#global-buttons-container input {
background-color: #323948;
caret-color: #ffffff;
color: #ffffff;
}
#global-buttons-container input::placeholder {
color: #ffffff;
}
#global-buttons-container input:disabled::-webkit-input-placeholder { /* WebKit browsers */
color: #6E6865;
}
#global-buttons-container input:disabled:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #6E6865;
}
#global-buttons-container input:disabled::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #6E6865;
}
#global-buttons-container input:disabled:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #6E6865;
}

View File

@@ -2,4 +2,23 @@
body {
--body-background-color: 255, 255, 255;
--base-font-color: 33, 37, 41;
}
}
#global-buttons-container input {
background-color: #ffffff;
/*caret-color: #ffffff;*/
/*color: #ffffff;*/
}
/*#global-buttons-container input:disabled::-webkit-input-placeholder { !* WebKit browsers *!*/
/* color: #98A0AB;*/
/*}*/
/*#global-buttons-container input:disabled:-moz-placeholder { !* Mozilla Firefox 4 to 18 *!*/
/* color: #98A0AB;*/
/*}*/
/*#global-buttons-container input:disabled::-moz-placeholder { !* Mozilla Firefox 19+ *!*/
/* color: #98A0AB;*/
/*}*/
/*#global-buttons-container input:disabled:-ms-input-placeholder { !* Internet Explorer 10+ *!*/
/* color: #98A0AB;*/
/*}*/

View File

@@ -0,0 +1,18 @@
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
width="800px" height="800px" viewBox="0 0 318.336 318.336"
xml:space="preserve">
<g>
<g>
<path d="M302.137,74.432h-21.031c-30.496-13.614-56.389-20.611-77.028-20.611c-26.731,0-39.245,11.649-44.906,20.535
c-5.658-8.886-18.17-20.535-44.906-20.535c-20.638,0-46.533,7.003-77.037,20.611H16.2c-8.946,0-16.2,7.253-16.2,16.2v157.684
c0,8.949,7.254,16.2,16.2,16.2h285.937c8.948,0,16.199-7.251,16.199-16.2V90.632C318.336,81.686,311.085,74.432,302.137,74.432z
M154.786,84.265c-0.048,0.25-0.069,0.503-0.069,0.757V233.74c-7.084-8.18-18.95-14.438-38.804-14.438
c-35.44,0-79.927,19.432-95.813,26.947V91.528c13.608-6.927,26.31-12.587,38.156-17.096c21.745-8.271,40.526-12.511,56.004-12.511
c18.992,0,29.37,6.354,34.986,12.511c3.241,3.554,4.91,7.038,5.698,9.192C154.852,83.985,154.791,84.243,154.786,84.265z
M298.234,246.249c-15.884-7.516-60.371-26.947-95.809-26.947c-19.859,0-31.72,6.254-38.805,14.438
c-0.261,0.3-0.562,0.58-0.804,0.886V85.48c0.084-0.351,0.269-0.981,0.583-1.825c0.799-2.149,2.499-5.647,5.776-9.218
c5.648-6.157,16.026-12.512,34.9-12.512c15.478,0,34.251,4.24,56.004,12.512c11.854,4.509,24.548,10.17,38.153,17.097V246.249
L298.234,246.249z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -55,6 +55,17 @@ class PdfActionsManager {
deletePageButtonCallback(e) {
var imgContainer = this.getPageContainer(e.target);
this.pagesContainer.removeChild(imgContainer);
if (this.pagesContainer.childElementCount === 0) {
const filenameInput = document.getElementById('filename-input');
const filenameParagraph = document.getElementById('filename');
const downloadBtn = document.getElementById('export-button');
filenameInput.disabled = true;
filenameInput.value = "";
filenameParagraph.innerText = "";
downloadBtn.disabled = true;
}
};
insertFileButtonCallback(e) {

View File

@@ -3,17 +3,21 @@ class PdfContainer {
pagesContainer;
pagesContainerWrapper;
pdfAdapters;
downloadLink;
constructor(id, wrapperId, pdfAdapters) {
this.fileName = null;
this.pagesContainer = document.getElementById(id)
this.pagesContainerWrapper = document.getElementById(wrapperId);
this.downloadLink = null;
this.movePageTo = this.movePageTo.bind(this);
this.addPdfs = this.addPdfs.bind(this);
this.addPdfsFromFiles = this.addPdfsFromFiles.bind(this);
this.rotateElement = this.rotateElement.bind(this);
this.rotateAll = this.rotateAll.bind(this);
this.exportPdf = this.exportPdf.bind(this);
this.updateFilename = this.updateFilename.bind(this);
this.setDownloadAttribute = this.setDownloadAttribute.bind(this);
this.preventIllegalChars = this.preventIllegalChars.bind(this);
this.pdfAdapters = pdfAdapters;
@@ -28,6 +32,15 @@ class PdfContainer {
window.addPdfs = this.addPdfs;
window.exportPdf = this.exportPdf;
window.rotateAll = this.rotateAll;
const filenameInput = document.getElementById('filename-input');
const downloadBtn = document.getElementById('export-button');
filenameInput.onkeyup = this.updateFilename;
filenameInput.onkeydown = this.preventIllegalChars;
filenameInput.disabled = true;
filenameInput.innerText = "";
downloadBtn.disabled = true;
}
movePageTo(startElement, endElement, scrollTo = false) {
@@ -60,6 +73,29 @@ class PdfContainer {
input.setAttribute("accept", "application/pdf");
input.onchange = async(e) => {
const files = e.target.files;
if (files.length > 0) {
const filenameInput = document.getElementById('filename-input');
const pagesContainer = document.getElementById('pages-container');
const downloadBtn = document.getElementById('export-button');
filenameInput.disabled = false;
if (pagesContainer.childElementCount === 0) {
filenameInput.value = "";
this.filename = null;
downloadBtn.disabled = true;
} else {
this.filename = filenameInput.value;
}
if (this.filename === null || this.filename === undefined) {
filenameInput.value = files[0].name;
} else {
filenameInput.value = this.filename;
}
}
this.addPdfsFromFiles(files, nextSiblingElement);
}
@@ -192,6 +228,27 @@ class PdfContainer {
const url = URL.createObjectURL(pdfBlob);
const downloadOption = localStorage.getItem('downloadOption');
const filenameInput = document.getElementById('filename-input');
let inputArr = filenameInput.value.split('.');
if (inputArr !== null && inputArr !== undefined && inputArr.length > 0) {
inputArr = inputArr.filter(n => n); // remove all empty strings, nulls or undefined
if (inputArr.length > 1) {
inputArr.pop(); // remove right part after last dot
}
filenameInput.value = inputArr.join('');
this.filename = filenameInput.value;
}
if (!filenameInput.value.includes('.pdf')) {
filenameInput.value = filenameInput.value + '.pdf';
this.filename = filenameInput.value;
}
if (downloadOption === 'sameWindow') {
// Open the file in the same window
window.location.href = url;
@@ -200,12 +257,45 @@ class PdfContainer {
window.open(url, '_blank');
} else {
// Download the file
const downloadLink = document.createElement('a');
downloadLink.href = url;
downloadLink.download = this.fileName ? this.fileName : 'managed.pdf';
downloadLink.click();
this.downloadLink = document.createElement('a');
this.downloadLink.id = 'download-link';
this.downloadLink.href = url;
// downloadLink.download = this.fileName ? this.fileName : 'managed.pdf';
// downloadLink.download = this.fileName;
this.downloadLink.setAttribute('download', this.filename ? this.fileName : 'managed.pdf');
this.downloadLink.setAttribute('target', '_blank');
this.downloadLink.onclick = this.setDownloadAttribute;
this.downloadLink.click();
}
}
setDownloadAttribute() {
this.downloadLink.setAttribute("download", this.filename ? this.filename : 'managed.pdf');
}
updateFilename() {
const filenameInput = document.getElementById('filename-input');
const downloadBtn = document.getElementById('export-button');
if (filenameInput.value === "") {
downloadBtn.disabled = true;
return;
}
downloadBtn.disabled = false;
this.filename = filenameInput.value;
}
preventIllegalChars(e) {
// const filenameInput = document.getElementById('filename-input');
//
// filenameInput.value = filenameInput.value.replace('.pdf', '');
//
// // prevent .
// if (filenameInput.value.includes('.')) {
// filenameInput.value.replace('.','');
// }
}
}
export default PdfContainer;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
àRCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSEáCNS2-H

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
àRCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSEá ETen-B5-H` ^

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
àRCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE!!<21>º]aX!!]`<60>21<32>> <09>p <0B>z<EFBFBD>$]<06>"Rd<E2809A>-Uƒ7<C692>*
4„%<25>+ „Z „{<7B>/%…<<3C>9K…b<E280A6>1]†.<2E>" ‰`]‡,<2C>"]ˆ

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More