poppler-utils › Wiki › ubuntuusers.de (2024)

Das Upgrade von Ubuntu 22.04 LTS auf Ubuntu 24.04 LTS wurde aufgrund eines Fehlers im APT-Solver gestoppt. Sobald der Fehler behoben ist, wird das Upgrade wieder freigegeben.

Dieser Artikel wurde für die folgendenUbuntu-Versionen getestet:

  • Ubuntu 20.04 Focal Fossa

Du möchtest den Artikel für eine weitere Ubuntu-Version testen? Mitarbeit im Wiki ist immer willkommen! Dazu sind die Hinweise zum Testen von Artikeln zu beachten.

Zum Verständnis dieses Artikels sind folgende Seiten hilfreich:

  1. ⚓︎ Installation von Programmen

  2. ⚓︎ Ein Terminal öffnen

Inhaltsverzeichnis

  1. Installation
  2. Benutzung
    1. pdfinfo
    2. pdffonts
    3. pdftotext
    4. pdftoppm
    5. pdftohtml
    6. pdfimages
    7. pdfunite
    8. pdfseparate
    9. pdftocairo
  3. Links

poppler-utils › Wiki › ubuntuusers.de (1)Die poppler-utils 🇬🇧 sind eine Sammlung von Kommandozeilen-Programmen, mit denen Informationen über PDF-Dokumente gewonnen, die Dokumente in andere Formate umgewandelt oder manipuliert werden können. Dazu wird libpoppler genutzt, welches unter Linux die Standardbibliothek zur Darstellung von PDF-Dokumenten ist, z.B. auch in Evince und Okular.

Dieses Paket enthält folgende (auf Poppler beruhende) Kommandozeilenprogramme:

  • pdfdetach – Listet oder entnimmt eingebettete Dateien (Anhänge)

  • pdffonts – Analyse von Schriften

  • pdfimages – Entnahme von Bildern

  • pdfinfo – Dokumentinformationen

  • pdfseparate – Werkzeug zur Entnahme von Seiten

  • pdfunite – Zusammenführen von PDF-Dateien

  • pdfsig – prüft digitale Signaturen

  • pdftocairo – Umwandlung von PDF nach PNG/JPEG/PDF/PS/EPS/SVG mittels Cairo

  • pdftohtml – Umwandlung von PDF nach HTML

  • pdftoppm – Umwandlung von PDF nach PPM/PNG/JPEG

  • pdftops – Umwandlung von PDF nach PostScript (PS)

  • pdftotext – Entnahme von Text

Installation

Um die Hilfsprogramme nutzen zu können, muss das folgende Paket installiert werden [1]:

  • poppler-utils

Befehl zum Installieren der Pakete:

sudo apt-get install poppler-utils 

Oder mit apturl installieren, Link: apt://poppler-utils

Benutzung

Die Nutzung der verschiedenen Programme aus poppler-utils ist immer relativ ähnlich. Man ruft das entsprechende Programm auf und übergibt als Parameter die zu lesenden PDF-Datei und den gewünschten Namen der Ausgabedatei. Natürlich kennen die einzelnen Programme auch diverse Optionen.

Leider gibt es keine Man-Page für die poppler-utils. Man kann aber jedes der Programme mit der Option -h aufrufen, um eine kurze Hilfe über die verschiedenen Optionen zu bekommen

Ist die PDF-Datei verschlüsselt, so funktionieren Operationen wie Text extrahieren in der Regel nicht. Ob ein PDF-Dokument verschlüsselt ist kann man mit Hilfe von pdfinfo feststellen, welches Teil der poppler-utils ist.

pdfinfo

Wie der Name vermuten lässt, erhält man mit pdfinfo Informationen zum PDF-Dokumenten, wie z.B. [2]

pdfinfo dokument.pdf 
Creator: cairo 1.8.6 (http://cairographics.org)Producer: John DoeTagged: noPages: 3Encrypted: noPage size: 612 x 792 pts (letter)File size: 542783 bytesOptimized: noPDF version: 1.4

Man sieht also, womit und von wem das PDF-Dokument erstellt wurde ("Creator" und "Producer"), wie viele Seite enthalten sind, ob das PDF verschlüsselt ist, welche Seitengröße es hat, wie groß die ganze Datei ist, ob es sich um ein optimiertes PDF handelt und welche PDF-Version das Dokument hat. Besonders die Information, ob das Dokument verschlüsselt ist, kann von Interesse sein, da man aus verschlüsselten PDFs in der Regel keine Texte/Bilder extrahieren kann. Die Angabe zur PDF-Version kann nützlich sein, da nicht alle PDF-Betrachter mit allen (= den neueren) PDF-Versionen umgehen können.

pdffonts

Mit Hilfe dieses Befehls kann festgestellt werden, welche Schriftarten ("Fonts") innerhalb des PDF-Dokuments verwendet werden. Beispiel [2]:

pdffonts dokument.pdf 
name type emb sub uni object ID------------------------------------ ----------------- --- --- --- ---------Verdana CID TrueType yes no yes 5 0TrebuchetMS CID TrueType yes no yes 6 0VerdanaBold CID TrueType yes no yes 7 0DejaVuSerif CID TrueType yes no yes 8 0

Die Spalte emb gibt an, ob die betreffende Schrift in das Dokument eingebettet ist.

pdftotext

Möchte man den kompletten Text aus dem PDF-Dokument extrahieren, so kann man dafür pdftotext nutzen. Der Befehlsaufruf lautet [2]

pdftotext dokument.pdf ausgabe.txt 

Hier wird der Text aus dokument.pdf in die Datei ausgabe.txt geschrieben. Wie gut das Ergebnis ist, hängt grundlegend davon ab, wie komplex das PDF-Dokument ist, also z.B. ob das Ausgangsdokument einfacher Fließtext ist, viele vom Text umflossene Bilder enthält oder sogar mehrspaltig ist. In der Regel muss das kreierte Textdokument immer nachbearbeitet werden, um z.B. überflüssige Leerzeichen und falsche Zeilenumbrüche zu entfernen.

pdftotext kennt u.a. die folgenden Optionen:

Optionen von pdftotext
OptionBeschreibung
-f Nr beginne auf Seite Nr
-l Nr stoppe auf Seite Nr
-htmlmeta erzeugt eine (einfache) HTML-Datei
-enc TYP verwendet das Encoding TYP für die Textdatei
-listenc zeigt alle mögliche Encodings (für -enc) an
-eol TYP das Zeilenende in der Ausgabedatei wird auf TYP gesetzt (mögliche Werte: unix, dos, mac)

pdftoppm

Mit pdftoppm können die Seiten eines PDF-Dokuments in Bilddateien umgewandelt werden, standardmäßig sind dies PPM-Dateien, welche von allen gängigen Grafikbetrachtern gelesen (und konvertiert) werden können.

Der Befehlsaufruf lautet [2]:

pdftoppm dokument.pdf SEITE 

SEITE ist dabei das Präfix für die Namen der Ausgabedateien. Hat eine PDF-Dokument z.B. drei Seiten, so werden die Dateien seite-000.ppm, seite-001.ppm und seite-002.ppm erzeugt. pdftoppm kennt einige Optionen, u.a. auch für das Ausgabeformat:

Optionen von pdftoppm
OptionBeschreibung
-monoAusgabe als monochrome PBM-Datei
-grayAusgabe als PGM-Datei (Grauskala)
-pngAusgabe als PNG-Datei

Des Weiteren gibt es noch diverse Optionen, um die Ausgabegröße und Auflösung festzulegen, welche in der Hilfe nachgelesen werden können.

pdftohtml

Durch pdftohtml können PDF-Dokumente in HTML-Seiten umwandelt werden. Der Aufruf lautet [2]

pdftohtml dokument.pdf seite 

Dabei wird die Datei dokument.pdf in eine eine HTML-Datei Names seite.html umgewandelt. Genau genommen entstehen immer drei HTML-Dateien: Einmal die genannte Hauptdatei plus, in diesem Beispiel, die Seiten seite_ind.html und seites.html. Dies liegt daran, dass die HTML-Ausgabe (nicht mehr ganz zeitgemäß) Frames verwendet, um im linken Frame ein einfaches Inhaltsverzeichnis und im Hauptframe den Inhalt an sich darzustellen. Weiterhin wird der Text komplett über die die "klassischen" HMTL-Tags formiert anstatt CSS-Styles zu verwenden.

Über die Option -xml wird eine XML-Datei anstatt einer HTML-Datei generiert.

Um eine PDF-Datei aus dem Kontextmenü in Nautilus heraus in eine HTML-Datei umzuwandeln, importiert man diese Datei ⮷.

pdfimages

Mit Hilfe von pdfimages lassen sich alle Bilder aus einem PDF-Dokument extrahieren. Die Bilder werden dabei als PPM-Datei gespeichert.

Der Aufruf des Programms erfolgt über

pdfimages dokument.pdf bild 

bild ist dabei das Präfix für die Ausgabedatei(en). Enthält ein PDF z.B. drei Bilder, so werden die Dateien bild-000.ppm, bild-001.ppm und bild-002.ppm generiert. Über die Option -j werden alle im PDF-Dokument enthalten JPEG-Bilder auch als JPEG gespeichert und nicht als PPM.

pdfunite

Mit Hilfe von pdfunite lassen sich mehrere PDF-Dokumente durch Aneinanderhängen zu einem einzigen vereinen.

Der Aufruf des Programms erfolgt über

pdfunite dokument1.pdf dokument2.pdf dokumentN.pdf Ausgabedokument.pdf 

Es kann mit zur Bestimmung der Ausgangsdokumente mit Platzhaltern (*.pdf) gearbeitet werden, wobei die gefundenen Dokumente alphabetisch (Dateiname) sortiert verarbeitet werden.

pdfseparate

Um Seiten aus einem PDF-Dokument zu extrahieren, verwendet man pdfseparate. Der Befehlsaufruf lautet:

pdfseparate dokument.pdf AUSGABE 

In AUSGABE muss mindestens %d angegeben werden, welches bei den Ausgabedateien durch die jeweilige Seitenzahl ersetzt wird.

pdfseparate unterstützt folgende Optionen:

Optionen von pdfseparate
OptionBeschreibung
-f Nr beginne auf Seite Nr
-l Nr stoppe auf Seite Nr

Wenn keine Optionen angegeben werden, extrahiert pdfseparate alle Seiten des Eingabedokuments.

pdftocairo

Konvertiert seitenweise eine PDF-Datei in verschiedene Grafikformate (PNG, JPEG, TIFF, PDF, PS, EPS, SVG). Durch den Befehl pdftocairo --help werden alle Optionen sichtbar.

Der Befehl

pdftocairo dateiname.pdf -png dateiname 

generiert je eine Seite ein PNG-Bild.

Damit wird aus der ersten Seite ein Bild im PNG-Format erzeugt:

pdftocairo -png -singlefile dokument.pdf dokument 

Weitere Parameter lassen umfangreiche Anpassungen zu. So können ausgewählte Seiten umgewandelt werden oder die Ausgabegröße beliebig angepasst werden.
Anhand der Optionen -f und -l kann eine Selektion durchgeführt werden: -f n - bestimmt die erste Seite für die Ausgabe, -l n - bestimmt die letzte Seite für die Ausgabe.

Damit erzeugt pdftocairo aus den Seiten 3 – 8 sechs PNG-Dateien mit einer Breite von 300 Pixel:

pdftocairo -png -scale-to-x 300 -f 3 -l 8 dokument.pdf dokument 

Links

  • PDF Übersichtsartikel

poppler-utils › Wiki › ubuntuusers.de (2024)

FAQs

What is poppler utils in Ubuntu? ›

Poppler is a PDF rendering library based on Xpdf PDF viewer. This package contains command line utilities (based on Poppler) for getting. information of PDF documents, convert them to other formats, or manipulate. them: * pdfdetach -- lists or extracts embedded files (attachments)

What is poppler used for? ›

Poppler is a PDF rendering library that also includes a collection of utility binaries, which allows for the manipulation and extraction of data from PDF documents such as converting PDF files to HTML, TXT, or PostScript.

What is the poppler package for Linux? ›

Poppler is a free and open-source software library for rendering Portable Document Format (PDF) documents. Its development is supported by freedesktop.org. Commonly used on Linux systems, it powers the PDF viewers of the GNOME and KDE desktop environments.

Is poppler installed and in path in Ubuntu? ›

Check if poppler is in your PATH: You can do this by running echo %PATH% in your command prompt. This will print out all the directories in your PATH. Look for the directory that contains poppler . Add poppler to your PATH: If poppler is not in your PATH, you can add it by modifying your system's environment variables.

Does PDF2Image need poppler? ›

Indeed, this library requires Poppler, but it is impossible to add poppler to the requirements. Have you even encounter this? You need to use a packages. txt file in addition to a requirements.

What is Util Linux in Ubuntu? ›

Util Linux is a collection of essential utility programs for Linux operating systems.

What is the difference between poppler and Ghostscript? ›

However, Ghostscript was created primarily to manage Postscript files, while Poppler—from its inception—was only meant to be a PDF manipulation tool. With Poppler, you can perform any action on PDF files, including creation, merging, and even converting.

How to check if poppler is installed in Windows? ›

Installing poppler

You can check if you already have it installed by calling pdftoppm -h in your terminal/cmd.

How to install poppler through conda? ›

Installing poppler from the conda-forge channel can be achieved by adding conda-forge to your channels with:
  1. conda config --add channels conda-forge conda config --set channel_priority strict. ...
  2. conda install poppler poppler-qt. ...
  3. mamba install poppler poppler-qt. ...
  4. conda search poppler --channel conda-forge.

What is poppler Qt5? ›

The Poppler Qt5 interface library, libpoppler-qt5, is a library that allows Qt5 programmers to easily load and render PDF files. The Poppler Qt5 interface library uses poppler internally to do its job, but the Qt5 programmer will never have to worry about poppler internals.

How to configure a package Linux? ›

Configuring a Linux package definition
  1. To create a package definition, right-click Packages, then select New Package Definition. The New Package Definition wizard opens. ...
  2. To modify an existing package definition, right-click the package definition you want to modify and select Open Package Definition.

How to install poppler in Debian? ›

sudo apt install poppler-utils This command will install the Poppler utilities, which include pdftotext, pdfinfo, and others, as well as the Poppler libraries.

How to install poppler in Docker? ›

Adding this changes to your Dockerfile would look like this: FROM gcr.io/google-appengine/python RUN apt-get update RUN apt-get install poppler-utils -y RUN virtualenv -p python3. 7 /env # Rest of your build steps...

How to use path in Ubuntu? ›

Linux: Add to PATH Permanently
  1. Open the .bashrc file using a text editor. The example below uses Vim.
  2. Go to the end of the file.
  3. Paste the export syntax at the end of the file. export PATH="/Directory1:$PATH"
  4. Save and exit.
  5. Execute the script or reboot the system to make the changes live.
Sep 22, 2022

How to set executable path in Ubuntu? ›

2 Answers
  1. Create a folder called bin in your home directory. ...
  2. Add ~/bin to your PATH for all sessions of Bash (the default shell used inside of the terminal). ...
  3. Add either the executable files themselves OR symlinks to the executable into ~/bin.
Jul 22, 2013

What is can utils in Linux? ›

Can-utils is a command line Linux utility that contains basic tools which can display, record, generate and replay CAN traffic. Along with these basic operations we can also calculate busload, convert log files and it also contain ISO 15765-2:2016 tools.

What is the use of yum utils in Linux? ›

The yum-utils package includes several utilities that can help you to manage configuration and apply updates safely to your existing configuration. Most significant of these is yum-config-manager. The legacy repository configuration file is unmaintained and deprecated.

What is CIFS utils in Ubuntu? ›

cifs utility attaches the UNC name (exported network resource) specified as service (using //server/share syntax, where "server" is the server name or IP address and "share" is the name of the share) to the local directory mount-point. Options to mount.

What is the use of utils in Python? ›

Python Utils is a collection of small Python functions and classes which make common patterns shorter and easier. It is by no means a complete collection but it has served me quite a bit in the past and I will keep extending it.

Top Articles
Emergency rooms and care in the Netherlands: what to expect
PASIEMPRE (FEAT. JHAYCO, OMAR COURTZ, ANUEL AA, ARCA Y ARCANGEL) - DJ Juanovski - LETRAS.COM
Wordscapes Level 5130
Walmart Automotive Number
Equipment Hypixel Skyblock
Osage actor talks Scorsese, 'Big Uncle Energy' and 'Killers of the Flower Moon'
Culver's Flavor Of The Day Paducah Ky
20 of the Funniest Obituaries That Will Have You Dying Laughing
Anchoring in Masonry Structures – Types, Installation, Anchorage Length and Strength
Who should be in the Country Music Hall of Fame (but isn't yet)? Our picks
洗面台用 アクセサリー セットの商品検索結果 | メチャ買いたい.com
5162635626
Shs Games 1V1 Lol
Wells Fargo Banks In Florida
Redose Mdma
O'reilly Auto Parts Near Me Open Now
8 30 Eastern Standard Time
Laura Houston Wbap
James And Lisa Goy Obituary
Rockcastle County Schools Calendar
Www.dunkin Baskin Runs On You.com
More Apt To Complain Crossword
Elemental Showtimes Near Regal White Oak
Palladium-Item from Richmond, Indiana
Razwan Ali ⇒ Free Company Director Check
Freeman Funeral Home Chapmanville Wv Obits
Cia Decrypter
Ethos West Mifflin
Brett Cooper Wikifeet
South Louisiana Community College Bookstore
Realidades 2 Capitulo 2B Answers
Storenet Walgreens At Home
Latest News Archives - Mon Valley Independent
Grand Forks (British Columbia) – Travel guide at Wikivoyage
Simple Simon's Pizza Lone Jack Menu
Withers Not In Sarcophagus
Charter Spectrum Appointment
Drugst0Recowgirl Leaks
Dimmitt Range Rover
Brian Lizer Life Below Zero Next Generation
Protegrity Restoration Reviews
Sirius Satellite Radio Sports Schedule
Ten Conservative Principles
Best Conjuration Spell In Skyrim
Ttw Cut Content
Craigs List Williamsport
Best Homemade Tartar Sauce
Rida Asfahani Leaked Video
Lesson 2 Homework 4.1 Answer Key
Barber Gym Quantico Hours
Corn And Tater Fest 2023
Latest Posts
Article information

Author: Arline Emard IV

Last Updated:

Views: 6486

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.