I am displaying a pdf page on the CGContext using the code
- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context { CGContextSetRGBFillColor(
Cursory reading of your code suggests the use of kCGPDFBleedBox should be replaced by another setting, perhaps kCGPDFMediaBox. See here for more information.
kCGPDFBleedBox
kCGPDFMediaBox