« Linux tools PDF » : différence entre les versions

Aucun résumé des modifications
 
(2 versions intermédiaires par le même utilisateur non affichées)
Ligne 134 : Ligne 134 :
== '''🧰 <code>pdfinfo</code> ''' ==
== '''🧰 <code>pdfinfo</code> ''' ==
(fournie par `poppler-utils`)
(fournie par `poppler-utils`)
=== 📄 1️⃣ Informations de base sur un PDF ===
=== 1️⃣ Informations de base sur un PDF ===


<syntaxhighlight lang="bash">pdfinfo document.pdf</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo document.pdf</syntaxhighlight>
Ligne 152 : Ligne 152 :
-----
-----


=== 📏 2️⃣ Obtenir uniquement le nombre de pages ===
=== 2️⃣ Obtenir uniquement le nombre de pages ===


<syntaxhighlight lang="bash">pdfinfo document.pdf | grep Pages</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo document.pdf | grep Pages</syntaxhighlight>
Ligne 164 : Ligne 164 :
-----
-----


=== 🖨 3️⃣ Connaître la taille et l’orientation des pages ===
=== 3️⃣ Connaître la taille et l’orientation des pages ===


<syntaxhighlight lang="bash">pdfinfo document.pdf | grep "Page size"</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo document.pdf | grep "Page size"</syntaxhighlight>
Ligne 175 : Ligne 175 :
-----
-----


=== 🔐 4️⃣ Vérifier si le PDF est protégé ===
=== 4️⃣ Vérifier si le PDF est protégé ===


<syntaxhighlight lang="bash">pdfinfo document.pdf | grep Encrypted</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo document.pdf | grep Encrypted</syntaxhighlight>
Ligne 186 : Ligne 186 :
-----
-----


=== 🧾 5️⃣ Afficher les métadonnées complètes ===
=== 5️⃣ Afficher les métadonnées complètes ===


<syntaxhighlight lang="bash">pdfinfo -meta document.pdf</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo -meta document.pdf</syntaxhighlight>
Ligne 198 : Ligne 198 :
-----
-----


=== 📐 6️⃣ Informations page par page ===
=== 6️⃣ Informations page par page ===


<syntaxhighlight lang="bash">pdfinfo -box document.pdf</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo -box document.pdf</syntaxhighlight>
Ligne 213 : Ligne 213 :
-----
-----


=== 🔢 7️⃣ Script shell : compter les pages ===
=== 7️⃣ Script shell : compter les pages ===


<syntaxhighlight lang="bash">PAGES=$(pdfinfo document.pdf | awk '/Pages/ {print $2}')
<syntaxhighlight lang="bash">PAGES=$(pdfinfo document.pdf | awk '/Pages/ {print $2}')
Ligne 220 : Ligne 220 :
-----
-----


=== 🧪 8️⃣ Tester si un PDF contient du texte exploitable ===
=== 8️⃣ Tester si un PDF contient du texte exploitable ===


<syntaxhighlight lang="bash">pdfinfo document.pdf && pdftotext document.pdf -</syntaxhighlight>
<syntaxhighlight lang="bash">pdfinfo document.pdf && pdftotext document.pdf -</syntaxhighlight>
Ligne 228 : Ligne 228 :
-----
-----


=== 📂 9️⃣ Batch sur plusieurs fichiers ===
=== 9️⃣ Batch sur plusieurs fichiers ===


<syntaxhighlight lang="bash">for f in *.pdf; do
<syntaxhighlight lang="bash">for f in *.pdf; do
Ligne 271 : Ligne 271 :


-----
-----


== '''🧰 <code>qpdf</code> ''' ==
== '''🧰 <code>qpdf</code> ''' ==
Ligne 353 : Ligne 352 :


-----
-----
== '''🧰 <code>ExifTool</code> ''' ==
voir [[Logiciels_terminal#🧰_ExifTool|ExifTool]]


[[Catégorie:Linux]] [[Catégorie:Tools]] [[Catégorie: Terminal Tools]]
[[Catégorie:Linux]] [[Catégorie:Tools]] [[Catégorie: Terminal Tools]]