PDF file produced by scripts/pdf-report.gmp can not be opened successly

gvm-script -c ./gvm-tools.conf tls --hostname 127.0.0.1 --port 9390 pdf-report.gmp f06bdf89-c29c-4565-923a-d64908012067
PDF file produced command above can not be opened.

GVM versions

**gsad:8.0.1 (‘gsad --version’)
**gvmd: 8.0.1 (‘gvmd --version’)
**openvas:6.0.1 (‘openvassd --version’)
**gvm-libs:10.0.1
gvm-tools:2.0.0 release version
python-gvm:1.0.0 release version

Environment

**Operating system:linux fedora x86_64
**Kernel:Linux 2.6.35.14-106.fc14.x86_64 (‘uname -a’)
**Installation method / source:source code installation

Please ensure you have installed the required packages e.g. xsltproc and xmlstarlet. There are a lot of topics regarding the missing packages for different distributions in this forum. E.g.

1 Like

Thank you very much for your suggestion.

I have installed xsltproc,xmlstarlet and pdflatex, pdf doc produced by scripts/pdf-report.gmp can be display successly now.

1 Like

Hi, I have the same problem. I obtain a corrupted or ureadable PDF file by running pdf-report.gmp.
Sometimes I have also these errors:

  • binascii.Error: Invalid base64-encoded string: number of data characters (521125) cannot be 1 more than a multiple of 4
  • binascii.Error: Incorrect padding

I installed xsltproc, xmlstarlet, texlive*

GVM versions
gsad:8.0.1 (‘gsad --version’)
gvmd: 8.0.1 (‘gvmd --version’)
openvas:6.0.1 (‘openvassd --version’)
gvm-libs:10.0.1
gvm-tools:2.0.0 release version
python-gvm:1.0.0 release version

Environment
Operating system: Linux kali-server 5.2.0-kali2-amd64 #1 SMP Debian 5.2.9-2kali1 (2019-08-22) x86_64

No one?
Note that from the dashboard I correctly download the report in pdf format. The problem is to create the pdf using the pdf-report.gmp script. Thanks

pdf-report.gmp is an example script! You have to add some additional exception handling and debug output to get the root cause of the issue.

1 Like

Good job man, it works. It would be interesting to know in which part of the GCE python source code GSA generates pdf from xml…

After changing the mentioned line of code with the new code, i am getting the following error

" ‘NoneType’ object has no attribute ‘encode’ "

Can you please check it?

Maybe it’s the same problem as

1 Like

Thanks for the response.
So, is it there any other possibility to get the report?