93 liens privés
hp-scan --color -dhpaio:/usb/Officejet_5600_series?serial=CN6ACDE36K04B2 --res=300 --size=a4 -o /tmp/scan.pdf && gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -sOUTPUTFILE=zepdf.pdf /tmp/scan.pdf
A 300 dpi le A4 fait 10Mo recompressé passe à 1Mo
Pourquoi PDF24 incorpore dans son installeur Webview 2:
Version 11.0.0
22.03.2022
Toolbox: Webview2 is now used instead of IE for the UIIE as rendering engine has been replaced by Webview2. Webview2 is Chrome based, more modern and brings many advantages. With this change, we now have many new opportunities in improving the UI and can use current standards. With the introduction of Webview2 the installer of PDF24 Creator became a bit bigger, but it is worth it.
Toolbox: Import signature via cameraThe PDF signing tool now also offers the possibility to import a signature via camera. This option has been available in the PDF24 Online Tools for a long time, but could not be implemented in the PDF24 Creator because the old IE based UI did not support it. With the new Webview2 based UI this is now possible.
Toolbox: A dark theme is now availableThe online tools already had the dark theme in the UI, but the PDF24 Creator did not yet. With the introduction of Webview2 we could now enable and improve the dark theme. The theme can be toggled by the palette icon in the UI.
Toolbox: Several small improvements in the UIAs part of the transition to Webview2, we have incorporated some improvements in the UI that enhance the experience of working with the program. More improvements will follow in subsequent versions.
Toolbox: Using a newer PDFJS versionPDFJS is used in many places in the Toolbox UI to render and display PDF pages. With the older version, some PDFs could not be rendered correctly. With the introduction of Webview2 we could now use a current version of PDFJS.
assembler pdf
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
vérifier métadonnées:
exiftool 123.pdf
supprimer metadonnées
mogrify -strip 123.pdf
problème: perte de qualité
TL;TD : gérer perte de qualité quand je caviarde un pdf importé dans Gimp en Cairo
Cas d'usage, scanner ticket & facture
-
scanner le long ticket en 2 fichiers
-
assembler avec gimp
-
attention export PDF soit il faut recadrer format A4, soit imprimer dans un fichier qui redimensionne en A4 directement
-
scanner les pages de facture avec xsane ou
-
en PDF
hp-scan --color -dhpaio:/usb/Officejet_5600_series?serial=CN6ACDE36K04B2 --res=600 -o 2.pdf && zenity --info
-
ou en jpeg
hp-scan --color -dhpaio:/usb/Officejet_5600_series?serial=CN6ACDE36K04B2 --res=600 -o 02.jpeg
-
compresser tous les PDF (en 600dpi ratio 20Mo > 1Mo)
gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -sOUTPUTFILE=1.pdf ticket.pdf
-
compression plus violente
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=7c.pdf 7.pdf
-
assembler les PDF
gs -dFirstPage=1 -dLastPage=1 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf 1.pdf 2.pdf 3.pdf
Problème: extraire données tableau dans un PDF
Ouverture PDF avec Atril, sélection texte
LibreOffice Calc, collage spécial avec le dialogue importation de texte
très souvent la notion de tableau est reconnue comme des lignes et peu exploitable
tr
td
td
tr
l'astuce est de mouliner le pdf par pdftotext qui va extraire en texte en gardant la forme
pdftotext -layoutpdfPenible.pdf tmp.txt
puis redonner le texte sélectionné à LO pour y faire une importation par taille fixe
tout simplrement génial !
à grand coup de pdfgrep -r pattern_regex /dossier/
Pour extraire directement la/les pages voulues
pdftk source.pdf cat 11 output destination.pdf
pdftk source.pdf cat 12-15 output destination_p12-15.pdf