コード例 #1
0
ファイル: p_stream.c プロジェクト: OS2World/LIB-PDFLib
void
pdf_puts(PDF *p, const char *s)
{
#ifdef PDFLIB_EBCDIC

    char buffer[LINEBUFLEN];

    strcpy(buffer, s);
    pdf_make_ascii(buffer);
    pdf_write(p, (void *) buffer, strlen(buffer));

#else

    pdf_write(p, (void *) s, strlen(s));

#endif	/* PDFLIB_EBCDIC */
}
コード例 #2
0
ファイル: p_basic.c プロジェクト: jimmccurdy/ArchiveGit
static void
pdf_write_header(PDF *p)
{
    /* Write the document header */
    /*
     * Although the %PDF-1.3 header also works with older Acrobat viewers,
     * we need a 1.2 header for special applications (controlled by the
     * client).
    */

    if (p->compatibility == PDF_1_4)
	pdf_puts(p, "%PDF-1.4\n");	      	/* PDF 1.4 header */
    else if (p->compatibility == PDF_1_3)
	pdf_puts(p, "%PDF-1.3\n");	      	/* PDF 1.3 header */
    else
	pdf_puts(p, "%PDF-1.2\n");	      	/* PDF 1.2 header */

    /* binary magic number */
    pdf_write(p, PDF_MAGIC_BINARY, sizeof(PDF_MAGIC_BINARY) - 1);
}
コード例 #3
0
ファイル: p_stream.c プロジェクト: OS2World/LIB-PDFLib
void
pdf_putc(PDF *p, char c)
{
    pdf_write(p, (void *) &c, (size_t) 1);
}