Initial working pdfioFileOpen, test program.

This commit is contained in:
Michael R Sweet
2021-05-01 11:50:17 -04:00
parent d13364a4fd
commit f5f0e190b5
3 changed files with 21 additions and 6 deletions

View File

@@ -22,8 +22,20 @@ int // O - Exit status
main(int argc, // I - Number of command-line arguments
char *argv[]) // I - Command-line arguments
{
(void)argc;
(void)argv;
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);
}