What programs exist for Linux to scan a PDF file?

Hello Friends

According with your experience and if exists:

Question

  • What programs exist for Linux to scan a PDF file?

It to know if is infected with something

Thanks in advance

1 Like

I guess you mean for virus issues ?

If so clamav

Rather than scan as in make a copy ?

5 Likes

Hi @Manuel_Jordan and @callpaul.eu, :waving_hand:

I´d go for clamav, too.
In fact I make regular use of it for anything I download.

Note:

There´s a limit with regard to the size of the file to be scanned as far as usage without an additional parameter is concerned.

Off the top of my head I don´t know what the limit is. But if I remmeber correctly it´s pretty low.

Example:

I downloaded an Aldi pospectus as a PDF file (81,5 MB in size) and tried to scan it the “normal” way:

clamscan g-kgw_ab_12_Mai.pdf 
/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Aldi-Prospekte/g-kgw_ab_12_Mai.pdf: OK

----------- SCAN SUMMARY -----------
Known viruses: 8706351
Engine version: 0.103.12
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.00 MB  # that´s the crucial part. The file wasn´t scanned.
Data read: 77.76 MB (ratio 0.00:1)
Time: 34.671 sec (0 m 34 s)
Start Date: 2025:05:18 14:53:57
End Date:   2025:05:18 14:54:32

Then I added the parameters:

--max-filesize=1000M --max-scansize=1000M

to the clamscan command:

clamscan --max-filesize=1000M --max-scansize=1000M g-kgw_ab_12_Mai.pdf 
/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Aldi-Prospekte/g-kgw_ab_12_Mai.pdf: OK

----------- SCAN SUMMARY -----------
Known viruses: 8706351
Engine version: 0.103.12
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 151.07 MB # now the scan was successful
Data read: 77.76 MB (ratio 1.94:1)
Time: 76.910 sec (1 m 16 s)
Start Date: 2025:05:18 14:55:30
End Date:   2025:05:18 14:56:46

So for larger files don´t forget to increase the fileszize and scansize. :blush:

Many greetings from Rosika :slightly_smiling_face:

3 Likes

Never downloaded an Aldi (or Lidl) catalogue just go shopping instead

1 Like

@callpaul.eu :

Hi Paul, :waving_hand:

Good for you. :wink:

Some people however are in a situation (mentally or otherwise) that would prevent them from going out every week for doing some shopping.
To those Aldi´s (and other discounter´s) magazines come in handy as PDFs.

Besides: this was just meant to be an example for scanning larger files with clamscan. :blush:

Cheers from Rosika :slightly_smiling_face:

4 Likes

Thanks for the replies

Paul

I guess you mean for virus issues ?

Yes, to detect and remove any “bad” software

If so clamav

Huge thanks for that link

Rosika

There´s a limit with regard to the size of the file to be scanned as far as usage without an additional parameter is concerned.

Thanks for the 2nd confirmation.

There´s a limit with regard to the size of the file to be scanned as far as usage without an additional parameter is concerned.

Ouch! … my files have a size between 80MB to 120 MB

Then I added the parameters:
–max-filesize=1000M --max-scansize=1000M

Huge thanks for the fix solution!

So for larger files don´t forget to increase the fileszize and scansize. :blush:

:partying_face:

Many greetings from Rosika :slightly_smiling_face:

Huge thanks!

BTW to the audience. In other network:

was mentioned:

  • PDFiD
  • AnalyzePDF

Some thoughts about them?

Thank You

3 Likes

@Manuel_Jordan:

Hi Manuel, :waving_hand:

You´re very welcome. :heart:
I´m glad it worked out for you and that I could be of some minor help.

Cheers from Rosika :slightly_smiling_face:

3 Likes

The suggestion tool was not installed yet, therefore not tested. But I mean I already have the “trick solution” for large files thanks to you.

3 Likes

@Manuel_Jordan :

Hi Manuel, :waving_hand:

ah, I see.
No problem. If you feel like it, just go ahead and install clamav.
Well, I don´t know your system, but in case you make use of deb package management…

sudo apt-get install clamav clamav-freshclam

and optionally (you don´t need it, it´s just for documentation):

sudo apt-get install clamav-docs

Note:

freshclam is used to update the virus signatures for ClamAV (or clamscan).

After installation, the daemon is started automatically.
It updates the signatures at defined intervals, default is 24 times a day.

Hope it helps. :blush:

Many greetings from Rosika :slightly_smiling_face:

4 Likes

Hello Rosika

No problem. If you feel like it, just go ahead and install clamav.

Yes, it is on my “todo” list

Huge thanks for the extra details … huge thanks .. :bouquet: :beer_mug:

BTW … It seems exists some “GUI” tools for clamav. Do you use one of them? Or just plain command?

2 Likes

@Manuel_Jordan :

Hi Manuel, :waving_hand:

you´re very welcome. :heart:

I guess you´re referring to clamtk.

env LANG=en_GB:en apt-cache show clamtk
Package: clamtk
Architecture: all
Version: 6.07-1
Priority: optional
Section: universe/utils
Origin: Ubuntu
[...]
Description-en: graphical front-end for ClamAV
 ClamTk is a graphical front-end for Clam Antivirus.
 .
 It is designed to be an easy-to-use, lightweight, on-demand antivirus scanner
 for Linux systems.
 .
 Context menu support for KDE's Plasma Desktop (Dolphin file manager) and
 Nemo and Thunar sendto is included.  Context menu support for GNOME (Nautilus
 file manager), but due to additional dependencies required, it is in a
 separate package: clamtk-gnome.
[...]

Actually I tried using it in my earlier Linux days when I still was a Lubuntu user.
Since I changed over to Linux Lite I didn´t install it anymore.
To be honest, it didn´t quite suit my needs.

I make use of clamscan only, either by directly calling it from the terminal or by calling it as a user-defined right-click entry in my thunar file manager.
It´s more convenient for me this way.

BTW:

see also:

No idea if there has been any development of ClamTK in the meantime.

I´ll stick to plain old clamscan since it has proven to be exactly what I want. :wink:

Many greetings from Rosika :slightly_smiling_face:

4 Likes

Yes it did go a year back, the writer retired but there is

Not tried it yet

3 Likes

Huge thanks for both for the links …

I hope these tools are available through the official repository of the Linux distribution itself (Debian, Ubuntu ., etc)

1 Like

Last time i checked the normal clamav was available but not the nice gui version

2 Likes

@Manuel_Jordan :

Hi Manuel, :waving_hand:

I just checked on my Linux Lite system (which uses the Ubuntu repositories).
Yes, clamtk seems to be available:

env LANG=en_GB:en apt-cache show clamtk
Package: clamtk
Architecture: all
Version: 6.07-1
Priority: optional
Section: universe/utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: ClamAV Team <pkg-clamav-devel@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 966
Depends: perl:any, clamav (>= 0.95), clamav-freshclam (>= 0.95) | clamav-data, libgtk3-perl, libwww-perl, liblocale-gettext-perl, libtext-csv-perl, libjson-perl, liblwp-protocol-https-perl, gnome-icon-theme, cron | cron-daemon | anacron
Suggests: cabextract, clamtk-gnome
Breaks: clamtk-kde, nemo-sendto-clamtk, thunar-sendto-clamtk
Replaces: clamtk-kde, nemo-sendto-clamtk, thunar-sendto-clamtk
Enhances: dolphin, konqueror, nemo, thunar
Filename: pool/universe/c/clamtk/clamtk_6.07-1_all.deb
Size: 185482
[...]
Homepage: https://gitlab.com/dave_m/clamtk
Description-en: graphical front-end for ClamAV
 ClamTk is a graphical front-end for Clam Antivirus.
 
 It is designed to be an easy-to-use, lightweight, on-demand antivirus scanner
 for Linux systems.
 
[...]

Cheers from Rosika :slightly_smiling_face:

4 Likes

Rosika

Thanks for the feedback, but sadly it is not longer supported

I will check the Paul’s suggestion too

Best to all!

2 Likes

Hang on, if it is in the repository it is supported?

3 Likes

It could be in the repository but without any upgrade since some time … according with the previous posts it does not have support any longer

2 Likes

It will stay in the repo until it stops working.
There are lots of programs like that… unsupported but functional.
Support is only needed to keep up with system changes.

4 Likes

@nevj and @Manuel_Jordan :

Hi all, :waving_hand:

I agree with Neville.
As long as you can install it from the official repos you may as well use it with confidence.

ClamAV › Wiki › ubuntuusers.de still lists it and provides a dedicated paragraph for clamtk. That´s a good sign.

I just simulated its installation on my system:

env LANG=en_GB:en apt-get -s install clamtk
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.15.0-138 linux-headers-5.15.0-138-generic
  linux-image-5.15.0-138-generic linux-modules-5.15.0-138-generic
  linux-modules-extra-5.15.0-138-generic
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libencode-perl libjson-perl libtext-csv-perl libtext-csv-xs-perl
Suggested packages:
  clamtk-gnome
The following NEW packages will be installed:
  clamtk libencode-perl libjson-perl libtext-csv-perl libtext-csv-xs-perl
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Inst libtext-csv-perl (2.01-1 Ubuntu:22.04/jammy [all])
Inst libjson-perl (4.04000-1 Ubuntu:22.04/jammy [all])
Inst clamtk (6.07-1 Ubuntu:22.04/jammy [all])
Inst libencode-perl (3.16-1build1 Ubuntu:22.04/jammy [amd64])
Inst libtext-csv-xs-perl (1.47-1build1 Ubuntu:22.04/jammy [amd64])
Conf libtext-csv-perl (2.01-1 Ubuntu:22.04/jammy [all])
Conf libjson-perl (4.04000-1 Ubuntu:22.04/jammy [all])
Conf clamtk (6.07-1 Ubuntu:22.04/jammy [all])
Conf libencode-perl (3.16-1build1 Ubuntu:22.04/jammy [amd64])
Conf libtext-csv-xs-perl (1.47-1build1 Ubuntu:22.04/jammy [amd64])

Seems O.K. so far.
I´d say: if you´re interested in clamtk just go for it.

Many greetings from Rosika :slightly_smiling_face:

4 Likes