Help:PDF/fr

 The article PDF/fr on Wikipedia projects:
 Wikidata contains data entry Q42332 related to these Wikipedia articles.

PDF est un format de fichier pour les documents. Cette page partage quelques conseils sur l'utilisation des PDF.


Recherche des fichiers PDF dans Wikimedia Commons

Essayez le bouton de recherche ci-dessus pour limiter les résultats de recherche aux PDF. Ceci est réalisé en incluant filemime:pdf dans les mots clés de recherche.

Utiliser PDF dans les projets Wikimedia

Page

Boléro: page 2 de la partition

Habituellement c'est la page 1 du fichier PDF ou DjVu qui sert à générer la vignette. Vous pouvez choisir une page différente en l'indiquant dans le paramètre |page= : [[File:IMSLP01578-Ravel - Bolero Full Score Durand 1929.pdf|thumb|page=2|''Boléro'': page 2 de la partition]] :


Logiciel PDF

Voir la liste des logiciels PDF. Par exemple vous pouvez utiliser le logiciel libre Okular pour lire les fichiers PDF, LibreOffice Draw pour les éditer et ImageMagick pour les modifier.

Créer des fichiers PDF

See also: Help:Converting.

Traitement d'images issues de scanners

Images obtained from scanners usually require some processing before making a PDF or DJVU out of them: cropping, turning, splitting, reducing the size, converting to TIFF etc. The open-source application ScanTailor-Universal is designed for this purpose. It can be downloaded from the project's releases page.

Créer un fichier PDF à partir d'images

  • Si ImageMagick est installé, vous pouvez exécuter convert ./page*.png ./output.pdf pour convertir les images nommées par exemple page_1.png (exemple) en PDF selon le tri.
  • img2pdf, an open-source command line program, is designed to convert images losslessly to PDF. It can also set metadata (such as the title and author) and how the resulting PDF file should be presented by a PDF viewing program.

La commande suivante prendra en compte tous les fichiers du dossier actuel et les convertira en un seul PDF nommé test.pdf avec les métadonnées du titre et de l'auteur :

img2pdf --title "My First PDF" --author "Jack Example" --output test.pdf *

Note that this assumes the current directory does not contain non-image files or sub-folders. If all your source files are of a single type, such as JPEGs, you can specify *.jpg as the input instead. You can also specify multiple input files individually.

Voir img2pdf --help pour connaître tout ce que img2pdf peut faire.

img2pdf is available from the Python Package Index and is also included in the repositories of many Linux distributions. A Windows executable is also available via the project's Appveyor.

The following command will use ImageMagick's mogrify tool to convert all JPEG files to individual PDF files and place them in a subfolder named "pdf":

mogrify -format pdf -path pdf/ *.jpg

On some Linux distributions, the default ImageMagick security policy will block the program from handling PDF files. See this StackOverflow question for how to change the security policy.

Créer un PDF à partir d'images bitonales

Bitonal images (i.e. images that only contain a single shade of black and white) are a very efficient way of storing scanned documents that only contain text or other simple elements that only need two colors to be clearly represented. A high-quality bitonal text page is commonly only tens of kilobytes in size.

There are two bitonal compression methods used in PDF files, namely the CCITT Group 4 Fax compression and the JBIG2 compression. The latter is more efficient but has some perceived patent issues associated with it, resulting in JBIG2 encoding functionality often being missing or disabled in PDF creation software. However, it is sometimes possible to enable such functionality by installing the encoder yourself.

There are a number of tools for converting images to use bitonal compression. ScanTailor-Universal is an open-source tool for processing scanned pages that can output bitonal images. ImageMagick and GraphicsMagick are also able to do this with the -threshold option.

The following ImageMagick command converts all .jpg files in a folder into bitonal TIF files using Group 4 compression and places them into a folder named "bitonal":

mogrify -format tif -compress Group4 -path bitonal/ -threshold 50% *.jpg

Essayez plusieurs valeurs de -threshold pour trouver celle qui fournit les meilleurs résultats pour votre contenu.

Conversion JBIG2

OCRmyPDF is an open-source command line program mainly designed to add an OCR text layer to scanned PDF files. One of its additional features is its ability to optimize PDF files, which includes the conversion of other bitonal image formats to JBIG2. This requires the installation of the jbig2enc encoder. Compilation and installation instructions for Linux users are available here, and a third-party Windows executable is available here. The MacOS version packaged in Homebrew already includes jbig2enc.

See here for how to install OCRmyPDF on Windows. Many Linux distributions come with an OCRmyPDF package included in the repositories, though this may be outdated. OCRmyPDF is also available on pip.

The following command uses OCRmyPDF to add an OCR text layer to a PDF and arranges the PDF in a way that allows a web browser to start displaying it before it has been fully downloaded:

ocrmypdf --output-type pdf --fast-web-view 0 test.pdf test-OCR.pdf

OCRmyPDF by default losslessly optimizes the PDF, so bitonal images are automatically converted to JBIG2 if jbig2enc is installed.

If you want to skip the OCR process because you don't need to OCR the PDF, use --tesseract-timeout 0 to skip OCR altogether.

See OCRmyPDF's documentation for further usage examples.

Voir aussi

Category:Digitisation help/Translations Category:PDF files Category:Commons help/fr#/Translations}} Category:Commons document resources/fr#/Translations}}
Category:Commons document resources/fr Category:Commons help/fr Category:Digitisation help/Translations Category:PDF files