pdfio/testpdfio.c
2021-05-01 11:50:17 -04:00

42 lines
777 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Test program for pdfio.
//
// Copyright © 2021 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
//
//
// Include necessary headers...
//
#include "pdfio.h"
//
// 'main()' - Main entry for test program.
//
int // O - Exit status
main(int argc, // I - Number of command-line arguments
char *argv[]) // I - Command-line arguments
{
if (argc > 1)
{
int i; // Looping var
pdfio_file_t *pdf; // PDF file
for (i = 1; i < argc; i ++)
{
if ((pdf = pdfioFileOpen(argv[i], NULL, NULL)) != NULL)
{
printf("%s: PDF %s, %d objects.\n", argv[i], pdfioFileGetVersion(pdf), (int)pdfioFileGetNumObjects(pdf));
pdfioFileClose(pdf);
}
}
}
return (0);
}