how to add content to a pdfPage?

Discussion in 'Mac Programming' started by schoeringhumer, Sep 2, 2009.

  1. schoeringhumer macrumors newbie

    Joined:
    Sep 2, 2009
    #1
    hiho,

    i would like to add some content to my PDFPage.... it would just be an NSString, but i seem to be too silly for that ...

    my code now looks like this:

    myPDF = [[PDFDocument alloc] init];

    PDFPage *page;

    page = [[PDFPage alloc]init];

    // here i want to add strings or whatever to my page ... but i don't know the name of the function(s) ... can anybody help me ?


    [myPDF insertPage:page atIndex:0];

    [page release];

    [myPdfView setDocument:myPDF];
     
  2. `lowell` macrumors newbie

    Joined:
    Aug 20, 2009
    Location:
    San Diego
    #2
    did you check the developer documentation either on ADC or in Xcode? the list of methods and what they do is right there.

    i googled your request and found this: http://www.cocoadev.com/index.pl?InsertingPagesInPDFDocumentForPDFViewDisplay among the results. it seems relevant (based on your code, but not your description); maybe it can help.
     
  3. schoeringhumer thread starter macrumors newbie

    Joined:
    Sep 2, 2009
    #3
    the link you gave me couldn't help me, but thx ...

    is anybody out there who can give me the code to e.g. set the label of a pdf-page ...

    there is a function which returns the label of a pdfpage as an NSString, but i don't know how to add an normal NSString to the left top side of a page .... could somebody help me ?
     
  4. `lowell` macrumors newbie

    Joined:
    Aug 20, 2009
    Location:
    San Diego
    #4
    ha oops

    for some reason i thought you were asking how add pages to a doc.. my bad!
     
  5. schoeringhumer thread starter macrumors newbie

    Joined:
    Sep 2, 2009
    #5
    nobody out there, who has any kind of knowledge about pdfkit ... ?
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #6
    PDFKit doesn't create or modify PDF pages. It lets you view PDF documents, access content of the document, add annotations, etc.

    http://developer.apple.com/mac/libr...tGuide/PDFKit_Prog_Conc/PDFKit_Prog_Conc.html

    From the summary for PDFPage:

    Note that in the bold text, there is no mention of "add content to the page".

    If you want to add content to a PDF document, you need a PDF renderer or PDF painter. This will often be coupled with a PDF parser.

    http://developer.apple.com/mac/libr...eptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
     

Share This Page