Dear Michel,
Asking chatgpt:
you can utilize a C library that provides PDF parsing capabilities. One such library is Poppler, which is widely used for working with PDF files in C
You can download the pre-built Poppler library for Windows from the Poppler website:
https://poppler.freedesktop.org/.
Here is the code to check for the signature:
#include <stdio.h>
#include <poppler-document.h>
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <input_pdf>\n", argv[0]);
    return 1;
  }
  const char *input_pdf = argv[1];
  GError *error = NULL;
  // Open the PDF document
  PopplerDocument *document = poppler_document_new_from_file(input_pdf, NULL, &error);
  if (error != NULL) {
    fprintf(stderr, "Error opening PDF: %s\n", error->message);
    g_error_free(error);
    return 1;
  }
  // Check if the document is encrypted
  if (poppler_document_get_n_pages(document) == 0) {
    printf("The PDF is encrypted.\n");
  } else {
    printf("The PDF is not encrypted.\n");
  }
  // Check if the document is signed
  if (poppler_document_get_metadata(document, "signature") != NULL) {
    printf("The PDF is signed.\n");
  } else {
    printf("The PDF is not signed.\n");
  }
  // Free the document object
  g_object_unref(document);
  return 0;
}
We can easily adap that code to Harbour or simply build an EXE from it and run it