* and [Portable Document Format (PDF)](https://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf).
_cairo_array_init (&surface->alpha_linear_functions, sizeof (cairo_pdf_alpha_linear_function_t));
* cairo_pdf_surface_set_metadata (surface, CAIRO_PDF_METADATA_CREATE_DATE, "2015-12-31T23:59+02:00");
src_surface = (cairo_pdf_source_surface_t *) _cairo_array_index (&surface->page_surfaces, i);
* @source_pattern: [in] A #cairo_pattern_t of type SURFACE or RASTER_SOURCE to use as the source
_cairo_pdf_surface_release_source_image_from_pattern (surface, source_pattern, image, image_extra);
_cairo_pdf_surface_release_source_image_from_pattern (surface, source_pattern, image, image_extra);
_cairo_pdf_surface_release_source_image_from_pattern (surface, source_pattern, image, image_extra);
object->u.compressed_obj.index = _cairo_array_num_elements (&surface->object_stream.objects) - 1;
status = _cairo_pdf_surface_open_content_stream (surface, &bbox, NULL, has_fallbacks, has_fallbacks, -1);
if (transparency == CAIRO_IMAGE_HAS_BILEVEL_ALPHA || transparency == CAIRO_IMAGE_IS_OPAQUE) {
* @surface_entry: Contains image resource, smask resource, interpolate and stencil mask parameters.
status = _cairo_pdf_surface_emit_smask (surface, image, FALSE, surface_entry->interpolate, &smask);
status = _cairo_pdf_surface_lookup_jbig2_global (surface, global_id, global_id_length, &global_entry);
* If @test is TRUE, don't emit anything. Set @is_image based on the output that would be emitted.
_cairo_matrix_transform_bounding_box (&pdf_pattern->pattern->matrix, &x1, &y1, &x2, &y2, NULL);
_cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pdf_pattern_t *pdf_pattern)
_cairo_output_stream_printf (surface->object_stream.stream, "%d 0 R ", page_info->page_res.id);
/* Find the minimum number of bytes required to represent offsets in the generated file (up to this point). */
for (; pattern_index < _cairo_array_num_elements (&surface->page_patterns); pattern_index++) {
for (; surface_index < _cairo_array_num_elements (&surface->page_surfaces); surface_index++) {
for (; doc_surface_index < _cairo_array_num_elements (&surface->doc_surfaces); doc_surface_index++) {
return _cairo_pdf_surface_analyze_operation (surface, op, pattern, extents) != CAIRO_INT_STATUS_UNSUPPORTED;
if (!((source->type == CAIRO_PATTERN_TYPE_SURFACE || source->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE) &&