challenge Hello, world! PDF版

Hello, world!シリーズの続編です。 「Hello, world!」となるべく大きく書かれた1ページのPDFを出力してください。

Posted feedbacks - C

panda(http://www.stillhq.com/panda/)を使いました。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <stdlib.h>
#include <panda/functions.h>
#include <panda/constants.h>

int main(int argc, char *argv[])
{
    panda_pdf *pdf;
    panda_page *page;
    panda_init();
    pdf = panda_open ("hello.pdf", "w");
    if(!pdf) panda_error(panda_true, "error");
    page = panda_newpage(pdf, panda_pagesize_a4);
    panda_setfontsize(pdf, 72);
    panda_textbox(pdf, page, 10, 10, 100, 500, "Hello World!");
    panda_close(pdf);
    return EXIT_SUCCESS;
}

Index

Feed

Other

Link

Pathtraq

loading...