Questions tagged [cgpdfcontext]

32 questions
1
vote
3 answers

Fit Polygons Together

How to eliminate the boundary between triangles? I'm implementing export-to-pdf in my triangle drawing app. The image above shows what the pdf output looks like. There are white boundaries everywhere, less than 1 pixel wide. The triangles can have…
neoneye
  • 50,398
  • 25
  • 166
  • 151
1
vote
1 answer

How can i draw NSView correctly to PDF context?

I've got NSView and to this NSViewI added some subviews which are subclass of NSView (named: Square). Squares are 50x50 on different positions. I want to render this NSViews with background color Red or Blue with this white background like on…
Tomasz Szulc
  • 4,217
  • 4
  • 43
  • 79
1
vote
2 answers

EDIT CGPDFObject of the pdf

i try long time to parse a pdf file with quartz cgpdf api, but my question is true that CGPDF API can't edit the object saved in the pdf? it mean the api used just only for reading file?
0
votes
1 answer

open pdf in to another pdfviewer application from my application

I have one pdf in my application and I want to open that pdf but not in my applicaton. When ever i'll click or open that pdf it will ask me to open that pdf in another application of pdf viewer availbale on my device i wnt to know that is it…
Aakil Ladhani
  • 984
  • 9
  • 32
0
votes
1 answer

Drawing a layer shadow to a PDF context

I have a bunch of UIViews to which I add shadows via their layers, in their drawRect method: self.layer.shadowPath = path; self.layer.shadowColor = [[UIColor blackColor] CGColor]; self.layer.shadowOpacity = .6; self.layer.shadowOffset =…
0
votes
2 answers

How to send PDF data to a printer programmatically?

In MacOS, I'm using python to write PDF Service Workflows, and after processing the incoming PDF (manipulating it with PyObjC Quartz APIs), I want to send it back to the print queue and get it printed without any user effort. Is it possible to send…
benwiggy
  • 1,440
  • 17
  • 35
0
votes
2 answers

How do I create transformed image in PDF from a UIView?

I'm using below code to create PDF from a UIView which already has subviews. I'm getting all subviews and redrawing in pdf context. But I'm not able to transform UIImageView. Below is my code NSMutableData *pdfData = [NSMutableData data]; CGRect…
Hiren Prajapati
  • 717
  • 3
  • 10
  • 25
0
votes
1 answer

Trying to append a string to another string from a NSTextField for printing on a PDF file

I have a method that saves the customer data entered in on the form that calls a method to createPDFFile. I have the PDF file created and I have some filler strings in there currently so that I could lay out the PDF file and I now want to take the…
Beanno1116
  • 239
  • 2
  • 3
  • 10
0
votes
1 answer

PDF merge is increasing up file size

I merge several single pdf pages in to a single file. The merge itself works good. All pages are in the right place and they look right. The merge code looks like this: CGContextRef writeContext = CGPDFContextCreateWithURL((CFURLRef)originalURL,…
MatzeLoCal
  • 392
  • 3
  • 14
0
votes
1 answer

PDF is blank page when using CGPDFContextCreateWithURL

I'm trying to create a simple pdf with CGPDFContextCreateWithURL, but when I show the pdf it's blank. My code: override func viewDidLoad() { super.viewDidLoad() drawSuperPDF("test4.pdf") showPDFFile() } My drawSuperPDF() function func…
Tom
  • 790
  • 2
  • 9
  • 32
0
votes
1 answer

Problem with ebook reader application

I am working on a ebook reader application... i can able to work exactly as iBooks application does. I have used : CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("paper.pdf"), NULL, NULL); pdf =…
Tariq
  • 9,861
  • 12
  • 62
  • 103
0
votes
3 answers

What size a CGPDFContext has to have?

I have to write a CGPDFContext. This PDF contains just one image. The image has 2100 x 3000 pixels. Suppose I open this image on Photoshop and print it at 300 dpi. Photoshop will use 300 pixels to build every inch of printed material, so this image…
Duck
  • 34,902
  • 47
  • 248
  • 470
0
votes
0 answers

iOS CGPdf highlight text using CGrect

I am trying to highlight text using rect but the code below: CGRect originalSize = CGPDFPageGetBoxRect(pagePDFRef, kCGPDFMediaBox); return me rect less then I expected or maybe less then I see. Is there any already made method that highlight text…
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
0
votes
2 answers

Drawing geometry (circle or rect) on zoomable CGPDF document using QuartzCore

    I am trying to draw on touches (mouse tap) on the pdf document generated by CGContextRef from my resource bundle. I have started from Apple zoomingpdfviewer where I have a UIScrollView and Pdf is generated by CGContextDrawPDFPage(context,…
Vacca
  • 1,219
  • 16
  • 26
0
votes
1 answer

Parse PDF content stream as a string in xCode?

I am trying to get the contents stream out of a PDFs internal structure using xCode. I have managed to get to the array of contents using: CGPDFDictionaryGetArray(str, "Contents", &val) Then counting the amount of objects within the array, its…
Jacob Hughes
  • 115
  • 1
  • 1
  • 5