When i did CGContextCreateWithURl(url)
it created empty context even though i passed url of existing fi开发者_如何学编程le. How to get the context of existing PDF file?
From my experience you can't actually draw directly to an existing pdf:
- Convert pdf to image
- Draw new content to that image
- Convert appended image to pdf
Not the smoothest, but it works.
the URL isn't an input. It's where you want the context to write the resulting PDF to.
From the documentation:
url
A Core Foundation URL that specifies where you want to place the resulting PDF file.
精彩评论