Merge pull request #509 from Frooodle/securityStuff

Docker file security updates and minor fixes to things
This commit is contained in:
Anthony Stirling 2023-12-10 23:10:04 +00:00 committed by GitHub
commit 87bc0fc975
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 340 additions and 136 deletions

View file

@ -1,5 +1,5 @@
# Use the base image
FROM frooodle/stirling-pdf-base:beta4
FROM frooodle/stirling-pdf-base:version6
ARG VERSION_TAG

View file

@ -1,5 +1,15 @@
# Main stage
FROM bellsoft/liberica-openjdk-debian:17 AS base
FROM ubuntu:latest AS base
# JDK for app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openjdk-17-jre
# Doc conversion
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libreoffice-core-nogui \
@ -8,30 +18,33 @@ RUN apt-get update && \
libreoffice-calc-nogui \
libreoffice-impress-nogui \
python3-uno \
unoconv
# OCR MY PDF (unpaper for descew and other advanced featues)
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common gnupg2 && \
add-apt-repository ppa:alex-p/tesseract-ocr5 && apt install -y --no-install-recommends tesseract-ocr && \
apt-get update && \
apt-get install -y --no-install-recommends \
ghostscript \
python3-pip \
unoconv \
pngquant \
unpaper \
ocrmypdf && \
rm -rf /var/lib/apt/lists/* && \
ocrmypdf \
unpaper && \
pip install --upgrade pip && \
pip install --no-cache-dir --upgrade ocrmypdf && \
pip install --no-cache-dir --upgrade pillow==10.0.1 reportlab==3.6.13 wheel==0.38.1 setuptools==65.5.1 pyjwt==2.4.0 cryptography==39.0.1
#CV
RUN pip install --no-cache-dir opencv-python-headless
# cleanup and etc
RUN rm -rf /var/lib/apt/lists/* && \
mkdir /usr/share/tesseract-ocr-original && \
cp -r /usr/share/tesseract-ocr/* /usr/share/tesseract-ocr-original && \
rm -rf /usr/share/tesseract-ocr
# Python packages stage
FROM base AS python-packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libssl-dev \
zlib1g-dev \
libjpeg-dev && \
pip install --upgrade pip && \
pip install --no-cache-dir \
opencv-python-headless WeasyPrint && \
rm -rf /var/lib/apt/lists/*
# Final stage: Copy necessary files from the previous stage
FROM base
COPY --from=python-packages /usr/local /usr/local

View file

@ -2,6 +2,9 @@
This document provides instructions on how to add additional language packs for the OCR tab in Stirling-PDF, both inside and outside of Docker.
## My OCR used to work and now doesnt!
Please update your tesseract docker volume path version from 4.00 to 5
## How does the OCR Work
Stirling-PDF uses [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF) which in turn uses tesseract for its text recognition.
All credit goes to them for this awesome work!
@ -18,7 +21,7 @@ Depending on your requirements, you can choose the appropriate language pack for
### Installing Language Packs
1. Download the desired language pack(s) by selecting the `.traineddata` file(s) for the language(s) you need.
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/4.00/tessdata` (Debian) or `/usr/share/tesseract/tessdata` (Fedora)
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/5/tessdata` (Debian) or `/usr/share/tesseract/tessdata` (Fedora)
# DO NOT REMOVE EXISTING ENG.TRAINEDDATA, IT'S REQUIRED.
@ -34,14 +37,14 @@ services:
your_service_name:
image: your_docker_image_name
volumes:
- /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata
- /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata
```
#### Docker run
Add the following to your existing docker run command
```bash
-v /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata
-v /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata
```
#### Non-Docker

View file

@ -139,7 +139,7 @@ Easiest is to use the langpacks provided by your repositories. Skip the other st
Manual:
1. Download the desired language pack(s) by selecting the `.traineddata` file(s) for the language(s) you need.
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/4.00/tessdata`
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/5/tessdata`
3.
Please view [OCRmyPDF install guide](https://ocrmypdf.readthedocs.io/en/latest/installation.html) for more info.
**IMPORTANT:** DO NOT REMOVE EXISTING `eng.traineddata`, IT'S REQUIRED.

View file

@ -113,7 +113,7 @@ Docker Run
```
docker run -d \
-p 8080:8080 \
-v /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata \
-v /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata \
-v /location/of/extraConfigs:/configs \
-e DOCKER_ENABLE_SECURITY=false \
--name stirling-pdf \
@ -133,7 +133,7 @@ services:
ports:
- '8080:8080'
volumes:
- /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata #Required for extra OCR languages
- /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata #Required for extra OCR languages
- /location/of/extraConfigs:/configs
# - /location/of/customFiles:/customFiles/
environment:

View file

@ -8,7 +8,7 @@ plugins {
}
group = 'stirling.software'
version = '0.15.2'
version = '0.16.0'
sourceCompatibility = '17'
repositories {
@ -80,6 +80,8 @@ dependencies {
// https://mvnrepository.com/artifact/org.apache.pdfbox/jbig2-imageio
implementation group: 'org.apache.pdfbox', name: 'jbig2-imageio', version: '3.0.4'
implementation 'com.github.jai-imageio:jai-imageio-core:1.4.0'
implementation 'com.github.jai-imageio:jai-imageio-jpeg2000:1.3.0'
implementation 'commons-io:commons-io:2.13.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'

View file

@ -5,6 +5,10 @@ echo "Copying original files without overwriting existing files"
mkdir -p /usr/share/tesseract-ocr
cp -rn /usr/share/tesseract-ocr-original/* /usr/share/tesseract-ocr
if [ -d /usr/share/tesseract-ocr/4.00/tessdata ]; then
cp -r /usr/share/tesseract-ocr/4.00/tessdata/* /usr/share/tesseract-ocr/5/tessdata/ || true;
fi
# Check if TESSERACT_LANGS environment variable is set and is not empty
if [[ -n "$TESSERACT_LANGS" ]]; then
# Convert comma-separated values to a space-separated list

View file

@ -1,4 +1,4 @@
package stirling.software.SPDF.controller.api;
package stirling.software.SPDF.controller.api.converters;
import com.opencsv.CSVWriter;
import io.swagger.v3.oas.annotations.Operation;
@ -12,27 +12,28 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import stirling.software.SPDF.controller.api.CropController;
import stirling.software.SPDF.controller.api.strippers.PDFTableStripper;
import stirling.software.SPDF.model.api.extract.PDFFilePage;
import java.awt.*;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("/api/v1/extract/pdf-to-csv")
@RequestMapping("/api/v1/convert")
@Tag(name = "General", description = "General APIs")
public class ExtractController {
private static final Logger logger = LoggerFactory.getLogger(CropController.class);
@PostMapping(consumes = "multipart/form-data")
@PostMapping(value = "/pdf-to-csv", consumes = "multipart/form-data")
@Operation(summary = "Extracts a PDF document to csv", description = "This operation takes an input PDF file and returns CSV file of whole page. Input:PDF Output:CSV Type:SISO")
public ResponseEntity<String> PdfToCsv(@ModelAttribute PDFFilePage form)
throws IOException {
throws Exception {
ArrayList<String> tableData = new ArrayList<>();
int columnsCount = 0;
@ -40,13 +41,9 @@ public class ExtractController {
try (PDDocument document = PDDocument.load(new ByteArrayInputStream(form.getFileInput().getBytes()))) {
final double res = 72; // PDF units are at 72 DPI
PDFTableStripper stripper = new PDFTableStripper();
stripper.setSortByPosition(true);
stripper.setRegion(new Rectangle((int) Math.round(1.0 * res), (int) Math.round(1 * res), (int) Math.round(6 * res), (int) Math.round(9.0 * res)));
PDPage pdPage = document.getPage(form.getPageId() - 1);
stripper.extractTable(pdPage);
columnsCount = stripper.getColumns();
for (int c = 0; c < columnsCount; ++c) {
for(int r=0; r<stripper.getRows(); ++r) {
tableData.add(stripper.getText(r, c));
@ -72,6 +69,9 @@ public class ExtractController {
ArrayList<String> headersList = getTableHeaders(columnsCount,fullTable);
ArrayList<String> recordList = getRecordsList(rowsCount,fullTable);
if(headersList.size() == 0 && recordList.size() == 0) {
throw new Exception("No table detected, no headers or records found");
}
StringWriter writer = new StringWriter();
try (CSVWriter csvWriter = new CSVWriter(writer)) {

View file

@ -39,7 +39,7 @@ public class OCRController {
private static final Logger logger = LoggerFactory.getLogger(OCRController.class);
public List<String> getAvailableTesseractLanguages() {
String tessdataDir = "/usr/share/tesseract-ocr/4.00/tessdata";
String tessdataDir = "/usr/share/tesseract-ocr/5/tessdata";
File[] files = new File(tessdataDir).listFiles();
if (files == null) {
return Collections.emptyList();

View file

@ -78,7 +78,7 @@ public class OtherWebController {
}
public List<String> getAvailableTesseractLanguages() {
String tessdataDir = "/usr/share/tesseract-ocr/4.00/tessdata";
String tessdataDir = "/usr/share/tesseract-ocr/5/tessdata";
File[] files = new File(tessdataDir).listFiles();
if (files == null) {
return Collections.emptyList();

View file

@ -35,7 +35,7 @@ spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB;DB_CLOSE_DELAY=-1;D
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.h2.console.enabled=true
spring.h2.console.enabled=false
spring.jpa.hibernate.ddl-auto=update
# Change the default URL path for OpenAPI JSON

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=تحويل
#PDFToCSV
PDFToCSV.title=PDF ??? CSV
PDFToCSV.header=PDF ??? CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=??????

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Автоматично редактиране
home.autoRedact.desc=Автоматично редактира (зачернява) текст в PDF въз основа на въведен текст
showJS.tags=Редактиране,Скриване,затъмняване,черен,маркер,скрит
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Преобразуване
#PDFToCSV
PDFToCSV.title=PDF ??? CSV
PDFToCSV.header=PDF ??? CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=????????

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Converteix
#PDFToCSV
PDFToCSV.title=PDF a CSV
PDFToCSV.header=PDF a CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extracte

View file

@ -93,6 +93,7 @@ account.accountSettings=Kontoeinstellungen
account.adminSettings=Admin Einstellungen - Benutzer anzeigen und hinzufügen
account.userControlSettings=Benutzerkontrolle
account.changeUsername=Benutzername ändern
account.changeUsername=Benutzername ändern
account.password=Bestätigungspasswort
account.oldPassword=Altes Passwort
account.newPassword=Neues Passwort
@ -830,4 +831,5 @@ PDFToXML.submit=Konvertieren
#PDFToCSV
PDFToCSV.title=PDF zu CSV
PDFToCSV.header=PDF zu CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extrakt

View file

@ -336,6 +336,10 @@ home.autoRedact.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03BF \u039C\u0
home.autoRedact.desc=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 (\u039C\u03B1\u03CD\u03C1\u03B9\u03C3\u03BC\u03B1) \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF\u03C5 \u03C3\u03B5 PDF \u03BC\u03B5 \u03B2\u03AC\u03C3\u03B7 \u03C4\u03BF \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03B5\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2
showJS.tags=Redact,Hide,black out,black,marker,hidden
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE
#PDFToCSV
PDFToCSV.title=PDF ?? CSV
PDFToCSV.header=PDF ?? CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=?????????

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=Redact,Hide,black out,black,marker,hidden
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Convert
#PDFToCSV
PDFToCSV.title=PDF to CSV
PDFToCSV.header=PDF to CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extract

View file

@ -93,6 +93,7 @@ account.accountSettings=Account Settings
account.adminSettings=Admin Settings - View and Add Users
account.userControlSettings=User Control Settings
account.changeUsername=Change Username
account.changeUsername=Change Username
account.password=Confirmation Password
account.oldPassword=Old password
account.newPassword=New Password
@ -333,12 +334,11 @@ showJS.tags=JS
home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
autoRedact.tags=JS
home.tableExtraxt.title=Table Extraction
home.tableExtraxt.desc=Table Extraction from PDF to CSV
tableExtraxt.tags=CSV
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
@ -777,6 +777,7 @@ changeMetadata.keywords=Keywords:
changeMetadata.modDate=Modification Date (yyyy/MM/dd HH:mm:ss):
changeMetadata.producer=Producer:
changeMetadata.subject=Subject:
changeMetadata.title=Title:
changeMetadata.trapped=Trapped:
changeMetadata.selectText.4=Other Metadata:
changeMetadata.selectText.5=Add Custom Metadata Entry
@ -830,4 +831,5 @@ PDFToXML.submit=Convert
#PDFToCSV
PDFToCSV.title=PDF to CSV
PDFToCSV.header=PDF to CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extract

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redactar
home.autoRedact.desc=Redactar automáticamente (ocultar) texto en un PDF según el texto introducido
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Convertir
#PDFToCSV
PDFToCSV.title=PDF a CSV
PDFToCSV.header=PDF a CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extracto

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Idatzi
home.autoRedact.desc=Auto Idatzi testua pdf fitxategian sarrerako testuan oinarritua
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Bihurtu
#PDFToCSV
PDFToCSV.title=PDF a CSV
PDFToCSV.header=PDF a CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extracto

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Caviarder automatiquement
home.autoRedact.desc=Caviardez automatiquement les informations sensibles d\u2019un PDF.
showJS.tags=caviarder,redact,auto
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Convertir
#PDFToCSV
PDFToCSV.title=PDF en CSV
PDFToCSV.header=PDF en CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extrait

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Redazione automatica
home.autoRedact.desc=Redige automaticamente (oscura) il testo in un PDF in base al testo immesso
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Converti
#PDFToCSV
PDFToCSV.title=Da PDF a CSV
PDFToCSV.header=Da PDF a CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Estratto

View file

@ -336,6 +336,10 @@ home.autoRedact.title=自動塗りつぶし
home.autoRedact.desc=入力したテキストに基づいてPDF内のテキストを自動で塗りつぶし(黒塗り)します。
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=変換
#PDFToCSV
PDFToCSV.title=PDF??CSV?
PDFToCSV.header=PDF??CSV?
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=????

View file

@ -336,6 +336,10 @@ home.autoRedact.title=자동 검열
home.autoRedact.desc=PDF 문서에서 입력된 텍스트들을 자동으로 검열(모자이크)합니다.
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=변환
#PDFToCSV
PDFToCSV.title=PDF? CSV?
PDFToCSV.header=PDF? CSV?
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=??

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Converteren
#PDFToCSV
PDFToCSV.title=PDF naar CSV
PDFToCSV.header=PDF naar CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extract

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Konwertuj
#PDFToCSV
PDFToCSV.title=PDF na CSV
PDFToCSV.header=PDF na CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Wyci?g

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Конвертировать
#PDFToCSV
PDFToCSV.title=PDF ? CSV
PDFToCSV.header=PDF ? CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=???????

View file

@ -336,6 +336,10 @@ home.autoRedact.title=Auto Redact
home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text
showJS.tags=JS
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=Konvertera
#PDFToCSV
PDFToCSV.title=PDF till CSV
PDFToCSV.header=PDF till CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Navvit

View file

@ -92,7 +92,7 @@ account.title=Hesap Ayarları
account.accountSettings=Hesap Ayarları
account.adminSettings=Yönetici Ayarları - Kullanıcıları Görüntüle ve Ekle
account.userControlSettings=Kullanıcı Kontrol Ayarları
account.changeUsername=Yeni Kullanıcı Adı
account.changeUsername=Kullanıcı Adını Değiştir
account.changeUsername=Kullanıcı Adını Değiştir
account.password=Onay Şifresi
account.oldPassword=Eski Şifre
@ -122,11 +122,16 @@ adminUserSettings.webOnlyUser=Sadece Web Kullanıcısı
adminUserSettings.forceChange=Kullanıcının girişte kullanıcı adı/şifre değiştirmesini zorla
adminUserSettings.submit=Kullanıcıyı Kaydet
#############
# HOME-PAGE #
#############
home.desc=Yerel olarak barındırılan tüm PDF ihtiyaçlarınız için tek durak noktanız.
home.searchBar=Search for features...
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 Çoklu Araç
home.multiTool.desc=Birleştir, Döndür, Yeniden Düzenle ve Sayfaları Kaldır
@ -144,6 +149,7 @@ home.rotate.title=Döndür
home.rotate.desc=PDF'lerinizi kolayca döndürün.
rotate.tags=sunucu tarafı
home.imageToPdf.title=Resimden PDF'e
home.imageToPdf.desc=Bir resmi (PNG, JPEG, GIF) PDF'e dönüştürün.
imageToPdf.tags=dönüşüm,img,jpg,fotoğraf,resim
@ -156,6 +162,7 @@ home.pdfOrganiser.title=Düzenle
home.pdfOrganiser.desc=Sayfaları herhangi bir sırayla kaldırın/düzenleyin
pdfOrganiser.tags=çift,çift,yan,yana,sırala,taşı
home.addImage.title=Resim Ekle
home.addImage.desc=PDF'e belirli bir konuma resim ekler
addImage.tags=img,jpg,fotoğraf,resim
@ -168,6 +175,7 @@ home.permissions.title=İzinleri Değiştir
home.permissions.desc=PDF belgenizin izinlerini değiştirin
permissions.tags=oku,yaz,düzenle,yazdır
home.removePages.title=Kaldır
home.removePages.desc=PDF belgenizden istenmeyen sayfaları silin.
removePages.tags=Sayfaları kaldır,sayfaları sil
@ -184,6 +192,7 @@ home.compressPdfs.title=Sıkıştır
home.compressPdfs.desc=PDF'lerin dosya boyutunu azaltmak için sıkıştırın.
compressPdfs.tags=sıkıştır,küçük,minik
home.changeMetadata.title=Metaveriyi Değiştir
home.changeMetadata.desc=Bir PDF belgesinden metaveriyi değiştir/kaldır/ekle
changeMetadata.tags=Başlık,yazar,tarih,oluşturma,zaman,yayıncı,üretici,istatistikler
@ -196,6 +205,7 @@ home.ocr.title=OCR / Taramaları Temizle
home.ocr.desc=Taramaları temizler ve bir PDF içindeki resimlerden metni algılar ve tekrar metin olarak ekler.
ocr.tags=tanıma,metin,resim,tarama,okuma,tanımlama,algılama,düzenlenebilir
home.extractImages.title=Resimleri Çıkar
home.extractImages.desc=Bir PDF'ten tüm resimleri çıkarır ve bunları zip olarak kaydeder.
extractImages.tags=fotoğraf,resim,kaydet,arşiv,zip,yakala,al
@ -211,6 +221,7 @@ PDFToWord.tags=doc,docx,odt,word,dönüşüm,format,dönüşüm,ofis,microsoft,d
home.PDFToPresentation.title=PDF'den Sunuma
home.PDFToPresentation.desc=PDF'yi Sunum formatlarına dönüştürün (PPT, PPTX ve ODP)
PDFToPresentation.tags=slaytlar,show,ofis,microsoft
home.PDFToText.title=PDF'den RTF (Metin)'e
home.PDFToText.desc=PDF'i Metin veya RTF formatına dönüştür
PDFToText.tags=zenginformat,zenginmetinformatı,zengin metin formatı
@ -219,6 +230,7 @@ home.PDFToHTML.title=PDF'den HTML'e
home.PDFToHTML.desc=PDF'i HTML formatına dönüştür
PDFToHTML.tags=web içeriği,tarayıcı dostu
home.PDFToXML.title=PDF'den XML'e
home.PDFToXML.desc=PDF'i XML formatına dönüştür
PDFToXML.tags=veri-çıkarımı,yapılandırılmış-içerik,entegrasyon,dönüşüm,dönüştür
@ -295,30 +307,38 @@ home.HTMLToPDF.title=HTML'den PDF'e
home.HTMLToPDF.desc=Herhangi bir HTML dosyasını veya zip'i PDF'e dönüştürür
HTMLToPDF.tags=biçimlendirme,web-içeriği,dönüşüm,dönüştür
home.MarkdownToPDF.title=Markdown'dan PDF'e
home.MarkdownToPDF.desc=Herhangi bir Markdown dosyasını PDF'e dönüştürür
MarkdownToPDF.tags=biçimlendirme,web-içeriği,dönüşüm,dönüştür
home.getPdfInfo.title=PDF Hakkında TÜM Bilgiyi Al
home.getPdfInfo.desc=PDF'ler hakkında mümkün olan her türlü bilgiyi toplar
getPdfInfo.tags=bilgi,veri,istatistikler,istatistik
home.extractPage.title=Sayfa(ları) Çıkar
home.extractPage.desc=PDF'ten seçili sayfaları çıkarır
extractPage.tags=çıkar
home.PdfToSinglePage.title=PDF'i Tek Büyük Sayfaya
home.PdfToSinglePage.desc=Tüm PDF sayfalarını tek büyük bir sayfada birleştirir
PdfToSinglePage.tags=tek sayfa
home.showJS.title=Javascript'i Göster
home.showJS.desc=Bir PDF'e enjekte edilen herhangi bir JS'i araştırır ve gösterir
showJS.tags=JS
showJS.tags=Karart,Gizle,karartma,siyah,markör,gizli
home.autoRedact.title=Otomatik Karartma
home.autoRedact.desc=Giriş metnine dayanarak bir PDF'teki metni Otomatik Karartır (Redakte)
showJS.tags=Karart,Gizle,karartma,siyah,markör,gizli
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
@ -333,6 +353,7 @@ login.invalid=Geçersiz kullanıcı adı veya şifre.
login.locked=Hesabınız kilitlendi.
login.signinTitle=Lütfen giriş yapınız.
#auto-redact
autoRedact.title=Otomatik Karartma
autoRedact.header=Otomatik Karartma
@ -345,28 +366,33 @@ autoRedact.customPaddingLabel=Özel Ekstra Dolgu
autoRedact.convertPDFToImageLabel=PDF'i PDF-Görüntü'ye dönüştür (Kutunun arkasındaki metni kaldırmak için kullanılır)
autoRedact.submitButton=Gönder
#showJS
showJS.title=Javascript'i Göster
showJS.header=Javascript'i Göster
showJS.downloadJS=Javascript İndir
showJS.submit=Göster
#pdfToSinglePage
pdfToSinglePage.title=PDF'i Tek Sayfaya
pdfToSinglePage.header=PDF'i Tek Sayfaya
pdfToSinglePage.submit=Tek Sayfaya Dönüştür
#pageExtracter
pageExtracter.title=Sayfaları Çıkar
pageExtracter.header=Sayfaları Çıkar
pageExtracter.submit=Çıkar
#getPdfInfo
getPdfInfo.title=PDF Hakkında Bilgi Al
getPdfInfo.header=PDF Hakkında Bilgi Al
getPdfInfo.submit=Bilgi Al
getPdfInfo.downloadJson=JSON İndir
#markdown-to-pdf
MarkdownToPDF.title=Markdown'dan PDF'e
MarkdownToPDF.header=Markdown'dan PDF'e
@ -374,12 +400,15 @@ MarkdownToPDF.submit=Dönüştür
MarkdownToPDF.help=Devam eden iş
MarkdownToPDF.credit=WeasyPrint Kullanıyor
#url-to-pdf
URLToPDF.title=URL'den PDF'e
URLToPDF.header=URL'den PDF'e
URLToPDF.submit=Dönüştür
URLToPDF.credit=WeasyPrint Kullanıyor
#html-to-pdf
HTMLToPDF.title=HTML'den PDF'e
HTMLToPDF.header=HTML'den PDF'e
@ -387,6 +416,7 @@ HTMLToPDF.help=HTML dosyalarını ve html/css/görsel vb. içeren ZIP'leri kabul
HTMLToPDF.submit=Dönüştür
HTMLToPDF.credit=WeasyPrint Kullanıyor
#sanitizePDF
sanitizePDF.title=PDF'i Temizle
sanitizePDF.header=PDF dosyasını temizle
@ -397,6 +427,7 @@ sanitizePDF.selectText.4=Linkleri kaldır
sanitizePDF.selectText.5=Fontları kaldır
sanitizePDF.submit=PDF'i Temizle
#addPageNumbers
addPageNumbers.title=Sayfa Numaraları Ekle
addPageNumbers.header=Sayfa Numaraları Ekle
@ -411,11 +442,13 @@ addPageNumbers.numberPagesDesc=Hangi sayfaların numaralandırılacağını, var
addPageNumbers.customNumberDesc=Varsayılan {n}, ayrıca 'Sayfa {n} / {total}', 'Metin-{n}', '{filename}-{n} kabul eder
addPageNumbers.submit=Sayfa Numaraları Ekle
#auto-rename
auto-rename.title=Otomatik Yeniden Adlandır
auto-rename.header=PDF'i Otomatik Yeniden Adlandır
auto-rename.submit=Otomatik Yeniden Adlandır
#adjustContrast
adjustContrast.title=Kontrastı Ayarla
adjustContrast.header=Kontrastı Ayarla
@ -424,11 +457,13 @@ adjustContrast.brightness=Parlaklık:
adjustContrast.saturation=Doygunluk:
adjustContrast.download=İndir
#crop
crop.title=Kırp
crop.header=Resmi Kırp
crop.submit=Gönder
#autoSplitPDF
autoSplitPDF.title=PDF'i Otomatik Böl
autoSplitPDF.header=PDF'i Otomatik Böl
@ -455,6 +490,7 @@ pageLayout.pagesPerSheet=Sayfa başına sayfalar:
pageLayout.addBorder=Kenarlık Ekle
pageLayout.submit=Gönder
#scalePages
scalePages.title=Sayfa Ölçeğini Ayarla
scalePages.header=Sayfa Ölçeğini Ayarla
@ -462,6 +498,7 @@ scalePages.pageSize=Belgenin bir sayfa boyutu.
scalePages.scaleFactor=Bir sayfanın yakınlaştırma seviyesi (kırpma).
scalePages.submit=Gönder
#certSign
certSign.title=Sertifika İmzalama
certSign.header=Sertifikanızla bir PDF imzalayın (Devam eden iş)
@ -477,6 +514,7 @@ certSign.location=Konum
certSign.name=İsim
certSign.submit=PDF'i İmzala
#removeBlanks
removeBlanks.title=Boşları Kaldır
removeBlanks.header=Boş Sayfaları Kaldır
@ -486,6 +524,7 @@ removeBlanks.whitePercent=Beyaz Yüzde (%):
removeBlanks.whitePercentDesc=Bir sayfanın 'beyaz' pixel olması gereken yüzdesi
removeBlanks.submit=Boşları Kaldır
#compare
compare.title=Karşılaştır
compare.header=PDF'leri Karşılaştır
@ -503,16 +542,19 @@ sign.text=Metin Girişi
sign.clear=Temizle
sign.add=Ekle
#repair
repair.title=Onar
repair.header=PDF'leri Onar
repair.submit=Onar
#flatten
flatten.title=Düzleştir
flatten.header=PDF'leri Düzleştir
flatten.submit=Düzleştir
#ScannerImageSplit
ScannerImageSplit.selectText.1=ı Eşiği:
ScannerImageSplit.selectText.2=Resmin döndürülmesi için gereken minimum mutlak açıyı ayarlar (varsayılan: 10).
@ -525,6 +567,7 @@ ScannerImageSplit.selectText.8=Bir fotoğraf için minimum kontur alanı eşiği
ScannerImageSplit.selectText.9=Kenar Boyutu:
ScannerImageSplit.selectText.10=Çıktıda beyaz kenarların önlenmesi için eklenen ve kaldırılan kenarın boyutunu ayarlar (varsayılan: 1).
#OCR
ocr.title=OCR / Tarama Temizleme
ocr.header=Taramaları Temizle / OCR (Optik Karakter Tanıma)
@ -551,6 +594,7 @@ extractImages.header=Resimleri Çıkar
extractImages.selectText=Çıkarılan resimleri dönüştürmek için resim formatını seçin
extractImages.submit=Çıkar
#File to PDF
fileToPDF.title=Dosyadan PDF'e
fileToPDF.header=Herhangi bir dosyayı PDF'e dönüştür
@ -558,6 +602,7 @@ fileToPDF.credit=Bu hizmet dosya dönüşümü için LibreOffice ve Unoconv'u ku
fileToPDF.supportedFileTypes=Desteklenen dosya türleri aşağıdakileri içermelidir ancak desteklenen formatların tam güncellenmiş listesi için lütfen LibreOffice dokümantasyonuna başvurun
fileToPDF.submit=PDF'e Dönüştür
#compress
compress.title=Sıkıştır
compress.header=PDF'i Sıkıştır
@ -569,6 +614,7 @@ compress.selectText.4=Otomatik mod - PDF'in tam boyutuna ulaşmak için kaliteyi
compress.selectText.5=Beklenen PDF Boyutu (örn. 25MB, 10.8MB, 25KB)
compress.submit=Sıkıştır
#Add image
addImage.title=Resim Ekle
addImage.header=PDF'e resim ekle
@ -576,6 +622,7 @@ addImage.everyPage=Her Sayfa?
addImage.upload=Resim ekle
addImage.submit=Resim ekle
#merge
merge.title=Birleştir
merge.header=Çoklu PDF'leri Birleştir (2+)
@ -583,15 +630,21 @@ merge.sortByName=İsme göre sırala
merge.sortByDate=Tarihe göre sırala
merge.submit=Birleştir
#pdfOrganiser
pdfOrganiser.title=Sayfa Organizatörü
pdfOrganiser.header=PDF Sayfa Organizatörü
pdfOrganiser.submit=Sayfaları Yeniden Düzenle
#multiTool
multiTool.title=PDF Çoklu Araç
multiTool.header=PDF Çoklu Araç
#view pdf
viewPdf.title=View PDF
viewPdf.header=View PDF
#pageRemover
pageRemover.title=Sayfa Silici
pageRemover.header=PDF Sayfa silici
@ -605,7 +658,8 @@ rotate.header=PDF Döndür
rotate.selectAngle=Döndürme açısını seçin (90 derecenin katları olarak):
rotate.submit=Döndür
#split
#merge
split.title=PDF Ayır
split.header=PDF Ayır
split.desc.1=Seçtiğiniz numaralar, bir ayrım yapmak istediğiniz sayfa numarasıdır
@ -619,7 +673,8 @@ split.desc.8=Belge #6: Sayfa 9 ve 10
split.splitPages=Ayrılacak sayfaları girin:
split.submit=Ayır
#imageToPDF
#merge
imageToPDF.title=Resimden PDF'e
imageToPDF.header=Resimden PDF'e
imageToPDF.submit=Dönüştür
@ -632,6 +687,7 @@ imageToPDF.selectText.3=Çoklu dosya mantığı (Yalnızca birden fazla resimle
imageToPDF.selectText.4=Tek bir PDF'e birleştir
imageToPDF.selectText.5=Ayrı PDF'lere dönüştür
#pdfToImage
pdfToImage.title=PDF'den Resme
pdfToImage.header=PDF'den Resme
@ -645,6 +701,7 @@ pdfToImage.grey=Gri tonlama
pdfToImage.blackwhite=Siyah ve Beyaz (Veri kaybolabilir!)
pdfToImage.submit=Dönüştür
#addPassword
addPassword.title=Parola Ekle
addPassword.header=Parola Ekle (Şifrele)
@ -681,6 +738,7 @@ watermark.selectText.8=Filigran Türü:
watermark.selectText.9=Filigran Resmi:
watermark.submit=Filigran Ekle
#Change permissions
permissions.title=İzinleri Değiştir
permissions.header=İzinleri Değiştir
@ -697,6 +755,7 @@ permissions.selectText.9=Yazdırmayı önle
permissions.selectText.10=Farklı formatlarda yazdırmayı önle
permissions.submit=Değiştir
#remove password
removePassword.title=Parola Kaldır
removePassword.header=Parola Kaldır (Şifre Çöz)
@ -704,8 +763,9 @@ removePassword.selectText.1=Şifreyi Çözmek için PDF Seçin
removePassword.selectText.2=Parola
removePassword.submit=Kaldır
#changeMetadata
changeMetadata.title=Metaveriyi Değiştir
changeMetadata.title=Başlık:
changeMetadata.header=Metaveriyi Değiştir
changeMetadata.selectText.1=Değiştirmek istediğiniz değişkenleri düzenleyin
changeMetadata.selectText.2=Tüm metaveriyi sil
@ -723,12 +783,14 @@ changeMetadata.selectText.4=Diğer Metaveri:
changeMetadata.selectText.5=Özel Metaveri Girişi Ekle
changeMetadata.submit=Değiştir
#pdfToPDFA
pdfToPDFA.title=PDF'den PDF/A'ya
pdfToPDFA.header=PDF'den PDF/A'ya
pdfToPDFA.credit=Bu hizmet PDF/A dönüşümü için OCRmyPDF kullanır
pdfToPDFA.submit=Dönüştür
#PDFToWord
PDFToWord.title=PDF'den Word'e
PDFToWord.header=PDF'den Word'e
@ -736,6 +798,7 @@ PDFToWord.selectText.1=Çıktı dosya formatı
PDFToWord.credit=Bu hizmet dosya dönüşümü için LibreOffice kullanır.
PDFToWord.submit=Dönüştür
#PDFToPresentation
PDFToPresentation.title=PDF'den Sunuma
PDFToPresentation.header=PDF'den Sunuma
@ -743,6 +806,7 @@ PDFToPresentation.selectText.1=Çıktı dosya formatı
PDFToPresentation.credit=Bu hizmet dosya dönüşümü için LibreOffice kullanır.
PDFToPresentation.submit=Dönüştür
#PDFToText
PDFToText.title=PDF'den RTF (Metin)'e
PDFToText.header=PDF'den RTF (Metin)'e
@ -750,14 +814,22 @@ PDFToText.selectText.1=Çıktı dosya formatı
PDFToText.credit=Bu hizmet dosya dönüşümü için LibreOffice kullanır.
PDFToText.submit=Dönüştür
#PDFToHTML
PDFToHTML.title=PDF'den HTML'e
PDFToHTML.header=PDF'den HTML'e
PDFToHTML.credit=Bu hizmet dosya dönüşümü için LibreOffice kullanır.
PDFToHTML.submit=Dönüştür
#PDFToXML
PDFToXML.title=PDF'den XML'e
PDFToXML.header=PDF'den XML'e
PDFToXML.credit=Bu hizmet dosya dönüşümü için LibreOffice kullanır.
PDFToXML.submit=Dönüştür
#PDFToCSV
PDFToCSV.title=PDF to CSV
PDFToCSV.header=PDF to CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=Extract

View file

@ -336,6 +336,10 @@ home.autoRedact.title=自动删除
home.autoRedact.desc=根据输入文本自动删除覆盖PDF中的文本
showJS.tags=JavaScript
home.tableExtraxt.title=PDF to CSV
home.tableExtraxt.desc=Extracts Tables from a PDF converting it to CSV
tableExtraxt.tags=CSV,Table Extraction,extract,convert
###########################
# #
# WEB PAGES #
@ -827,4 +831,5 @@ PDFToXML.submit=转换
#PDFToCSV
PDFToCSV.title=PDF ? CSV
PDFToCSV.header=PDF ? CSV
PDFToCSV.prompt=Choose page to extract table
PDFToCSV.submit=??

View file

@ -24,55 +24,86 @@ function getElements() {
elements.navIcons = document.querySelectorAll("nav .icon, .navbar-icon")
elements.navDropdownMenus = document.querySelectorAll("nav .dropdown-menu")
}
function setMode(mode) {
var event = new CustomEvent("modeChanged", { detail: mode })
document.dispatchEvent(event)
elements.lightModeStyles.disabled = mode !== "off"
elements.darkModeStyles.disabled = mode !== "on"
elements.rainbowModeStyles.disabled = mode !== "rainbow"
var jumbotron = document.getElementById("jumbotron")
var event = new CustomEvent("modeChanged", { detail: mode });
document.dispatchEvent(event);
if (elements && elements.lightModeStyles) {
elements.lightModeStyles.disabled = mode !== "off";
}
if (elements && elements.darkModeStyles) {
elements.darkModeStyles.disabled = mode !== "on";
}
if (elements && elements.rainbowModeStyles) {
elements.rainbowModeStyles.disabled = mode !== "rainbow";
}
var jumbotron = document.getElementById("jumbotron");
if (mode === "on") {
elements.darkModeIcon.src = "moon.svg"
// Dark mode improvement
elements.searchBar.classList.add("dark-mode-search")
elements.formControls.forEach(input => input.classList.add("bg-dark", "text-white"))
// navbar toggle
elements.navbar.classList.remove("navbar-light", "bg-light")
elements.navbar.classList.add("navbar-dark", "bg-dark")
navDropdownMenus.forEach(menu => menu.classList.add("dropdown-menu-dark"))
navIcons.forEach(icon => (icon.style.filter = "invert(1)"))
// Add the table-dark class to tables for dark mode
var tables = document.querySelectorAll(".table")
if (elements && elements.darkModeIcon) {
elements.darkModeIcon.src = "moon.svg";
}
if (elements && elements.searchBar) {
elements.searchBar.classList.add("dark-mode-search");
}
if (elements && elements.formControls) {
elements.formControls.forEach(input => input.classList.add("bg-dark", "text-white"));
}
if (elements && elements.navbar) {
elements.navbar.forEach(navElement => {
navElement.classList.remove("navbar-light", "bg-light");
navElement.classList.add("navbar-dark", "bg-dark");
});
}
if (elements && elements.navDropdownMenus) {
elements.navDropdownMenus.forEach(menu => menu.classList.add("dropdown-menu-dark"));
}
if (elements && elements.navIcons) {
elements.navIcons.forEach(icon => (icon.style.filter = "invert(1)"));
}
var tables = document.querySelectorAll(".table");
tables.forEach(table => {
table.classList.add("table-dark")
})
table.classList.add("table-dark");
});
if (jumbotron) {
jumbotron.classList.add("bg-dark")
jumbotron.classList.remove("bg-light")
jumbotron.classList.add("bg-dark");
jumbotron.classList.remove("bg-light");
}
} else if (mode === "off") {
elements.darkModeIcon.src = "sun.svg"
// Dark Mode Improvement
elements.searchBar.classList.remove("dark-mode-search")
elements.formControls.forEach(input => input.classList.remove("bg-dark", "text-white"))
// navbar toggle
elements.navbar.classList.remove("navbar-dark", "bg-dark")
elements.navbar.classList.add("navbar-light", "bg-light")
navDropdownMenus.forEach(menu => menu.classList.remove("dropdown-menu-dark"))
navIcons.forEach(icon => (icon.style.filter = "none"))
// Remove the table-dark class for light mode
var tables = document.querySelectorAll(".table-dark")
if (elements && elements.darkModeIcon) {
elements.darkModeIcon.src = "sun.svg";
}
if (elements && elements.searchBar) {
elements.searchBar.classList.remove("dark-mode-search");
}
if (elements && elements.formControls) {
elements.formControls.forEach(input => input.classList.remove("bg-dark", "text-white"));
}
if (elements && elements.navbar) {
elements.navbar.forEach(navElement => {
navElement.classList.remove("navbar-dark", "bg-dark");
navElement.classList.add("navbar-light", "bg-light");
});
}
if (elements && elements.navDropdownMenus) {
elements.navDropdownMenus.forEach(menu => menu.classList.remove("dropdown-menu-dark"));
}
if (elements && elements.navIcons) {
elements.navIcons.forEach(icon => (icon.style.filter = "none"));
}
var tables = document.querySelectorAll(".table-dark");
tables.forEach(table => {
table.classList.remove("table-dark")
})
table.classList.remove("table-dark");
});
if (jumbotron) {
console.log(mode)
jumbotron.classList.remove("bg-dark")
jumbotron.classList.add("bg-light")
jumbotron.classList.remove("bg-dark");
jumbotron.classList.add("bg-light");
}
} else if (mode === "rainbow") {
elements.darkModeIcon.src = "rainbow.svg"
if (elements && elements.darkModeIcon) {
elements.darkModeIcon.src = "rainbow.svg";
}
}
}

View file

@ -7,17 +7,18 @@
<body>
<div id="page-container">
<div id="content-wrap">
<div th:insert="~{fragments/navbar.html :: navbar}"></div>
</br></br>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<h2 th:text="#{PDFToCSV.header}"></h2>
<form id="PDFToCSVForm" th:action="@{api/v1/extract/pdf-to-csv}" method="post" enctype="multipart/form-data">
<form id="PDFToCSVForm" th:action="@{api/v1/convert/pdf-to-csv}" method="post" enctype="multipart/form-data">
<input id="pageId" type="hidden" name="pageId" />
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
<button type="submit" class="btn btn-primary" th:text="#{PDFToCSV.submit}"></button>
</form>
<p id="instruction-text" style="margin: 0; display: none">Choose page to extract table</p>
<p id="instruction-text" style="margin: 0; display: none" th:text="#{PDFToCSV.prompt}"></p>
<div style="position: relative; display: inline-block;">
<div>

View file

@ -84,10 +84,7 @@
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('pdf-to-html', 'images/filetype-html.svg', 'home.PDFToHTML.title', 'home.PDFToHTML.desc', 'PDFToHTML.tags')}"></div>
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('pdf-to-xml', 'images/filetype-xml.svg', 'home.PDFToXML.title', 'home.PDFToXML.desc', 'PDFToXML.tags')}"></div>
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('pdf-to-pdfa', 'images/file-earmark-pdf.svg', 'home.pdfToPDFA.title', 'home.pdfToPDFA.desc', 'pdfToPDFA.tags')}"></div>
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('pdf-to-csv', 'images/pdf-csv.svg', 'home.tableExtraxt.title', 'home.tableExtraxt.desc', 'pdfToPDFA.tags')}"></div>
</div>
</li>
@ -105,8 +102,6 @@
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('cert-sign', 'images/award.svg', 'home.certSign.title', 'home.certSign.desc', 'certSign.tags')}"></div>
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('sanitize-pdf', 'images/sanitize.svg', 'home.sanitizePdf.title', 'home.sanitizePdf.desc', 'sanitizePdf.tags')}"></div>
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('auto-redact', 'images/eraser-fill.svg', 'home.autoRedact.title', 'home.autoRedact.desc', 'autoRedact.tags')}"></div>
<div th:replace="~{fragments/navbarEntry :: navbarEntry ('auto-extract', 'images/eraser-fill.svg', 'home.tableExtraxt.title', 'home.tableExtraxt.desc', 'tableExtraxt.tags')}"></div>
</div>
</li>

View file

@ -27,18 +27,17 @@ See https://github.com/adobe-type-tools/cmap-resources
<meta name="google" content="notranslate">
<title>PDF.js viewer</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"></script>
<!-- Bootstrap -->
<script src="js/thirdParty/popper.min.js"></script>
<script src="js/thirdParty/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- This snippet is used in production (included from view-pdf.html) -->
<link rel="resource" type="application/l10n" href="/pdfjs/locale/locale.properties">
<script src="/pdfjs/pdf.js"></script>
<link rel="resource" type="application/l10n" href="pdfjs/locale/locale.properties">
<script src="pdfjs/pdf.js"></script>
<link rel="stylesheet" href="/pdfjs/css/viewer.css">
<script src="/pdfjs/js/viewer.js"></script>
<link rel="stylesheet" href="pdfjs/css/viewer.css">
<script src="pdfjs/js/viewer.js"></script>
</head>
<body tabindex="1">