boolean enabled = booleanValueForBinding("enabled", true, component);
super.appendToResponse(response, context);
if (enabled) {
NSData data = responseAsPdf(response, context);
String filename = stringValueForBinding("filename", "result.pdf", component);
response.setHeader("inline; filename=\"" + filename + "\"", "content-disposition");
response.setHeader("application/pdf", "Content-Type");
response.setHeader(String.valueOf(data.length()), "Content-Length");
response.setContent(data);
}
}