Questions tagged [cgcontextdrawpdfpage]

15 questions
6
votes
2 answers

IOS, how to clear context graphics

In my app I have a method that draws a pdf into a context: CGPDFPageRef page = CGPDFDocumentGetPage(pdf, index + 1); CGAffineTransform transform = aspectFit(CGPDFPageGetBoxRect(page, kCGPDFTrimBox), …
lopes710
  • 315
  • 1
  • 3
  • 19
5
votes
2 answers

Exception releasing context after CGContextDrawPDFPage only for some pages

I've inherited some iOS code which opens a source PDF and creates a CGContextRef to which we draw a single page from the source document. The problem is that there are certain pages with one document, our help document unfortunately, which causes…
Robert Gowland
  • 7,677
  • 6
  • 40
  • 58
2
votes
2 answers

Draw PDF for multi page in zendframwork

I am using function draw PDF in zendFreamwork but now i meet problem with many data many page but my pdf can draw only one page, for more data will lose. so have any solution can draw multi page ? thanks in advance for helping. I am looking to see…
koe
  • 736
  • 1
  • 12
  • 33
1
vote
2 answers

Gamut / Color space problems when using CGContextDrawPDFPage

I'm rendering a PDF file on iPad using core graphics. The colors however look different to the PDF when opening it using OS X preview or acrobat. Here is a picture with the left being from Acrobat, the right being in iOS simulator: Does anyone have…
guruz
  • 1,604
  • 14
  • 21
1
vote
0 answers

rotationAngle data is lost when creating a CGPDFPage

I have this PDF file with me. I use following code to render the first page of this PDF file. let page = self.pdfDocument.page(at: 0 )! // get first page let rotationAngle = page.rotation // this value is 90 let renderedPdfData = renderPDF(page:…
S.Basnagoda
  • 671
  • 2
  • 8
  • 21
1
vote
0 answers

Coregraphics shows Error while Creating Multipage PDF In ios10

I am having a problem in creating the multi page PDF. I am using NSData for storing the PDF data. It takes more than 2 minutes to generate the PdfData. It shows following error in ios 10 : replacing +/-infinity with -2147483647. :…
1
vote
2 answers

Rotate all pages in a PDF graphics context

I'm creating a PDF file containige multiple pages: NSMutableData *pdfData = [NSMutableData new]; CGRect rect = CGRectMake(0, 0, 300, 100); UIGraphicsBeginPDFContextToData(pdfData, rect, nil); for (NSInteger page = 0; page < 10; page++) { …
Norbert
  • 4,239
  • 7
  • 37
  • 59
1
vote
1 answer

Objective-C: Sharpen images created with CGContextdrawPDFPage

I create UIImages from pdf with CGContextDrawPDFPage. The quality wasn´t satisfying so I tried CGContextSetInterpolationQuality(context,kCGRenderingIntentDefault); and it worked out. But the quality of the resulting images is still not good enough.…
Philipp Otto
  • 4,061
  • 2
  • 32
  • 49
1
vote
1 answer

How to limit auto break line for draw PDF

I am using Zend-pdf to draw data that get from database. but when i get a long data it's make me draw duplicate data like: For my own idea I want limit length of data, if it's long than length I want it break line
,but I can't know how to do…
koe
  • 736
  • 1
  • 12
  • 33
1
vote
2 answers

iOS leak instrument CGContextDrawPDFPage

I know this question has been asked several times, but I couldn't solve it for my particular case. CGContextDrawPDFPage is indicated as a leak in the leak instrument. Also when this segment of code is run the app crashes which I'm really sure is due…
user1120008
  • 1,005
  • 4
  • 13
  • 27
0
votes
0 answers

How to fix the translation problem when drawing a Label with Rotation

I have a View with some subviews on it like Labels and ImageViews. The subviews can have any transformation. I have to convert the View into PDF using CGContext. The PDF is created but there is issue in label positions in final PDF file when I…
Mudassir
  • 71
  • 11
0
votes
0 answers

Nil is not compatible with expected argument type 'CGPDFPage'

How do I fix this? //Nil is not compatible with expected argument type 'CGPDFPage' CGContextDrawPDFPage(obContext, nil) Using Xcode 8 and have not converted to swift3 syntax yet.
George Asda
  • 2,119
  • 2
  • 28
  • 54
0
votes
1 answer

WPD Service api implimentation (Status Service) to get free space on WPD device

I want to get the free space on the WPD device. I am trying to implement the WPDServiceApi. I am currently implementing the status service of WPD services. i picked up the the code samples from Windows7DEK. There are lots of type mismatches coming…
Ahsan
  • 87
  • 1
  • 10
0
votes
0 answers

In iOS, can I use offsets in CGContextDrawPDFPage to show only half of a PDF page?

I have PDF pages that are saved as spreads. This works out for me in one view where the user can zoom, highlight text and click on hyperlinks. However, I want to use the same PDF files in another view that requires individual pages instead of…
user2844331
  • 109
  • 6
0
votes
1 answer

UITableViewController with UIPageViewController in UIViewController

What I m Thinking to do is ? there is one MainViewController in which there are two UIViews one loaded UITableViewController and other UIPageViewController. In TableViewController, there are list of pdf's names. But when i click of the pdf list,…