@@ -26,7 +26,6 @@ static bool load_obj_stream(pdfio_obj_t *obj);
26
26
static bool load_pages (pdfio_file_t * pdf , pdfio_obj_t * obj , size_t depth );
27
27
static bool load_xref (pdfio_file_t * pdf , off_t xref_offset , pdfio_password_cb_t password_cb , void * password_data );
28
28
static bool repair_xref (pdfio_file_t * pdf , pdfio_password_cb_t password_cb , void * password_data );
29
- static bool write_obj_streams (pdfio_file_t * pdf );
30
29
static bool write_pages (pdfio_file_t * pdf );
31
30
static bool write_trailer (pdfio_file_t * pdf );
32
31
@@ -122,7 +121,7 @@ pdfioFileClose(pdfio_file_t *pdf) // I - PDF file
122
121
{
123
122
ret = false;
124
123
125
- if (pdfioObjClose (pdf -> info_obj ) && write_pages (pdf ) && write_obj_streams ( pdf ) && pdfioObjClose (pdf -> root_obj ) && write_trailer (pdf ))
124
+ if (pdfioObjClose (pdf -> info_obj ) && write_pages (pdf ) && pdfioObjClose (pdf -> root_obj ) && write_trailer (pdf ))
126
125
ret = _pdfioFileFlush (pdf );
127
126
}
128
127
@@ -2344,37 +2343,6 @@ repair_xref(
2344
2343
}
2345
2344
2346
2345
2347
- //
2348
- // 'write_obj_streams()' - Write object streams...
2349
- //
2350
-
2351
- static bool // O - `true` on success, `false` on error
2352
- write_obj_streams (pdfio_file_t * pdf ) // I - PDF file
2353
- {
2354
- size_t i ; // Looping var
2355
- pdfio_obj_t * obj ; // Current object
2356
-
2357
-
2358
- // Object streams are part of PDF 1.5 and later...
2359
- if (strcmp (pdf -> version , "1.5" ) < 0 )
2360
- return (true);
2361
-
2362
- // Loop through the file objects and write any to an object stream...
2363
- for (i = 0 ; i < pdf -> num_objs ; i ++ )
2364
- {
2365
- obj = pdf -> objs [i ];
2366
-
2367
- if (obj -> offset > 0 )
2368
- continue ;
2369
-
2370
- if (!_pdfioObjWriteHeader (obj ) || !_pdfioFilePuts (pdf , "endobj\n" ))
2371
- return (false);
2372
- }
2373
-
2374
- return (true);
2375
- }
2376
-
2377
-
2378
2346
//
2379
2347
// 'write_pages()' - Write the PDF pages objects.
2380
2348
//
0 commit comments