1
0
mirror of synced 2026-01-12 00:02:50 +00:00

moved pdf_new_XObject() from pdf_g4.c to pdf_prim.c.

This commit is contained in:
Eric Smith 2003-03-12 07:43:56 +00:00
parent 181e12efc9
commit 69e1ef7d46
3 changed files with 26 additions and 21 deletions

View File

@ -4,7 +4,7 @@
* will be compressed using ITU-T T.6 (G4) fax encoding.
*
* PDF routines
* $Id: pdf_g4.c,v 1.10 2003/03/11 23:38:57 eric Exp $
* $Id: pdf_g4.c,v 1.11 2003/03/11 23:43:56 eric Exp $
* Copyright 2003 Eric Smith <eric@brouhaha.com>
*
* This program is free software; you can redistribute it and/or modify
@ -52,24 +52,6 @@ struct pdf_g4_image
};
char pdf_new_XObject (pdf_page_handle pdf_page, struct pdf_obj *ind_ref)
{
char XObject_name [4] = "Im ";
XObject_name [2] = ++pdf_page->last_XObject_name;
if (! pdf_page->XObject_dict)
{
pdf_page->XObject_dict = pdf_new_obj (PT_DICTIONARY);
pdf_set_dict_entry (pdf_page->resources, "XObject", pdf_page->XObject_dict);
}
pdf_set_dict_entry (pdf_page->XObject_dict, & XObject_name [0], ind_ref);
return (pdf_page->last_XObject_name);
}
void pdf_write_g4_content_callback (pdf_file_handle pdf_file,
struct pdf_obj *stream,
void *app_data)

View File

@ -4,7 +4,7 @@
* will be compressed using ITU-T T.6 (G4) fax encoding.
*
* PDF routines
* $Id: pdf_prim.c,v 1.8 2003/03/10 01:49:50 eric Exp $
* $Id: pdf_prim.c,v 1.9 2003/03/11 23:43:56 eric Exp $
* Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
*
* This program is free software; you can redistribute it and/or modify
@ -597,3 +597,22 @@ unsigned long pdf_write_xref (pdf_file_handle pdf_file)
}
/* this isn't really a PDF primitive data type */
char pdf_new_XObject (pdf_page_handle pdf_page, struct pdf_obj *ind_ref)
{
char XObject_name [4] = "Im ";
XObject_name [2] = ++pdf_page->last_XObject_name;
if (! pdf_page->XObject_dict)
{
pdf_page->XObject_dict = pdf_new_obj (PT_DICTIONARY);
pdf_set_dict_entry (pdf_page->resources, "XObject", pdf_page->XObject_dict);
}
pdf_set_dict_entry (pdf_page->XObject_dict, & XObject_name [0], ind_ref);
return (pdf_page->last_XObject_name);
}

View File

@ -4,7 +4,7 @@
* will be compressed using ITU-T T.6 (G4) fax encoding.
*
* PDF routines
* $Id: pdf_prim.h,v 1.7 2003/03/10 01:49:50 eric Exp $
* $Id: pdf_prim.h,v 1.8 2003/03/11 23:43:56 eric Exp $
* Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
*
* This program is free software; you can redistribute it and/or modify
@ -137,3 +137,7 @@ void pdf_write_all_ind_obj (pdf_file_handle pdf_file);
/* Write the cross reference table, and return the maximum object number */
unsigned long pdf_write_xref (pdf_file_handle pdf_file);
/* this isn't really a PDF primitive data type */
char pdf_new_XObject (pdf_page_handle pdf_page, struct pdf_obj *ind_ref);