File tree 1 file changed +3
-26
lines changed
1 file changed +3
-26
lines changed Original file line number Diff line number Diff line change @@ -1412,36 +1412,13 @@ get_info_string(pdfio_file_t *pdf, // I - PDF file
1412
1412
const char * key ) // I - Dictionary key
1413
1413
{
1414
1414
pdfio_dict_t * dict ; // Info dictionary
1415
- _pdfio_value_t * value ; // Value
1415
+
1416
1416
1417
1417
// Range check input...
1418
- if (!pdf || !pdf -> info_obj || (dict = pdfioObjGetDict (pdf -> info_obj )) == NULL || ( value = _pdfioDictGetValue ( dict , key )) == NULL )
1418
+ if (!pdf || !pdf -> info_obj || (dict = pdfioObjGetDict (pdf -> info_obj )) == NULL )
1419
1419
return (NULL );
1420
-
1421
- // If we already have a value, return it...
1422
- if (value -> type == PDFIO_VALTYPE_NAME || value -> type == PDFIO_VALTYPE_STRING )
1423
- {
1424
- return (value -> value .string );
1425
- }
1426
- else if (value -> type == PDFIO_VALTYPE_BINARY && value -> value .binary .datalen < 4096 )
1427
- {
1428
- // Convert binary string to regular string...
1429
- char temp [4096 ]; // Temporary string
1430
-
1431
- memcpy (temp , value -> value .binary .data , value -> value .binary .datalen );
1432
- temp [value -> value .binary .datalen ] = '\0' ;
1433
-
1434
- free (value -> value .binary .data );
1435
- value -> type = PDFIO_VALTYPE_STRING ;
1436
- value -> value .string = pdfioStringCreate (pdf , temp );
1437
-
1438
- return (value -> value .string );
1439
- }
1440
1420
else
1441
- {
1442
- // Something else that is not a string...
1443
- return (NULL );
1444
- }
1421
+ return (pdfioDictGetString (dict , key ));
1445
1422
}
1446
1423
1447
1424
You can’t perform that action at this time.
0 commit comments