mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-29 15:22:06 +02:00
Initial working pdfioFileOpen, test program.
This commit is contained in:
16
testpdfio.c
16
testpdfio.c
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user