cairo/surface.go
func CreatePDFSurface(fileName string, width float64, height float64) (*Surface, error) {
	cstr := C.CString(fileName)
	defer C.free(unsafe.Pointer(cstr))

	surfaceNative := C.cairo_pdf_surface_create(cstr, C.double(width), C.double(height))

	status := Status(C.cairo_surface_status(surfaceNative))
	if status != STATUS_SUCCESS {
		return nil, ErrorStatus(status)
	}

	s := wrapSurface(surfaceNative)

	runtime.SetFinalizer(s, (*Surface).destroy)

	return s, nil
}
func CreatePDFSurface(fileName string, width float64, height float64) (*Surface, error) {
	cstr := C.CString(fileName)
	defer C.free(unsafe.Pointer(cstr))

	surfaceNative := C.cairo_pdf_surface_create(cstr, C.double(width), C.double(height))

	status := Status(C.cairo_surface_status(surfaceNative))
	if status != STATUS_SUCCESS {
		return nil, ErrorStatus(status)
	}

	s := wrapSurface(surfaceNative)

	runtime.SetFinalizer(s, (*Surface).destroy)

	return s, nil
}
/// Create a new PDF surface.