diff --git a/doc/pdfio.3 b/doc/pdfio.3 index 152acf9..4a175c4 100644 --- a/doc/pdfio.3 +++ b/doc/pdfio.3 @@ -228,9 +228,9 @@ where the three arguments to the function are the filename ("myinputfile.pdf"), error_cb(pdfio_file_t *pdf, const char *message, void *data) { (void)data; // This callback does not use the data pointer - + fprintf(stderr, "%s: %s\\n", pdfioFileGetName(pdf), message); - + // Return false to treat warnings as errors return (false); } @@ -245,7 +245,7 @@ Each PDF file contains one or more pages. The pdfioFileGetNumPages function retu size_t i; // Looping var size_t count; // Number of pages pdfio_obj_t *page; // Current page - + // Iterate the pages in the PDF file for (i = 0, count = pdfioFileGetNumPages(pdf); i < count; i ++) { @@ -268,7 +268,7 @@ You create a new PDF file using the pdfioFileCreate function: pdfio_rect_t media_box = { 0.0, 0.0, 612.0, 792.0 }; // US Letter pdfio_rect_t crop_box = { 36.0, 36.0, 576.0, 756.0 }; // w/0.5" margins - + pdfio_file_t *pdf = pdfioFileCreate("myoutputfile.pdf", "2.0", &media_box, &crop_box, error_cb, error_data); .fi .PP @@ -279,7 +279,7 @@ Alternately you can stream a PDF file using the pdfioFileCreateOutput function: pdfio_rect_t media_box = { 0.0, 0.0, 612.0, 792.0 }; // US Letter pdfio_rect_t crop_box = { 36.0, 36.0, 576.0, 756.0 }; // w/0.5" margins - + pdfio_file_t *pdf = pdfioFileCreateOutput(output_cb, output_ctx, "2.0", &media_box, &crop_box, error_cb, error_data); .fi .PP @@ -444,13 +444,13 @@ PDFio also includes predefined constants for creating a few standard color space .nf pdfio_file_t *pdf = pdfioFileCreate(...); - + // Create an AdobeRGB color array pdfio_array_t *adobe_rgb = pdfioArrayCreateColorFromStandard(pdf, 3, PDFIO_CS_ADOBE); - + // Create an Display P3 color array pdfio_array_t *display_p3 = pdfioArrayCreateColorFromStandard(pdf, 3, PDFIO_CS_P3_D65); - + // Create an sRGB color array pdfio_array_t *srgb = pdfioArrayCreateColorFromStandard(pdf, 3, PDFIO_CS_SRGB); .fi @@ -550,10 +550,10 @@ will create an object for a 1024x1024 RGBA image in memory, using the default co .nf pdfio_file_t *pdf = pdfioFileCreate(...); - + // Create an AdobeRGB color array pdfio_array_t *adobe_rgb = pdfioArrayCreateColorFromMatrix(pdf, 3, pdfioAdobeRGBGamma, pdfioAdobeRGBMatrix, pdfioAdobeRGBWhitePoint); - + // Create a 1024x1024 RGBA image using AdobeRGB unsigned char data[1024 * 1024 * 4]; // 1024x1024 RGBA image data pdfio_obj_t *img = pdfioFileCreateImageObjFromData(pdf, data, /*width*/1024, /*height*/1024, /*num_colors*/3, /*color_data*/adobe_rgb, /*alpha*/true, /*interpolate*/false); diff --git a/doc/pdfio.html b/doc/pdfio.html index 7cf94de..475df1a 100644 --- a/doc/pdfio.html +++ b/doc/pdfio.html @@ -1,13 +1,13 @@ -PDFio Programming Manual v1.0.0 +PDFio Programming Manual v1.0rc1 - +