• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PDFPage Creation query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PDFPage Creation query


  • Subject: PDFPage Creation query
  • From: "Amrit Majumdar" <email@hidden>
  • Date: Thu, 22 May 2008 13:50:28 +0530

Hi All,
I am playing around with the PDFKit.

I was planning to create a new PDFDocument, with my own PDF Page that I
generate after subclassing  PDFPage
Accordingly  I subclassed PDFPage and have over-riden the following
menthods.


- (id)initWithImage:(NSImage *)image;


Steps I followed to create a new PDFPage from the data in another PDFPage.


 NSData *myData = [[ pdfDoc pageAtIndex:0 ]dataRepresentation ];
 //retreiving data from pdfDoc, a pre existing PDF.



 NSImage *img = [[NSImage alloc]initWithData:myData];



 MyPDFPageClass *myPDFPage = [[ MyPDFPageClass alloc ]initWithImage:img];



 PDFDocumebnt  *myNewPDFDoc = [[PDFDocument alloc]init];



 [ myNewPDFDoc insertPage:myPDFpage atIndex: 0 ];


 [myPDFView setDocument:myNewPDFDoc];




The "pdfDoc" in the above code snippet was initialised to an Apple
Documentation PDF.

On the first page it has the title of the doc and an apple logo at the
bottom left hand side.

When the new page is displayed in the PDFView it displays a gray colored
page.

The Apple logo at the bottom of this new page is visible but it is very
faint.No other data present in the original page is visible in this new
page.



Why does this happen?

I am sure I have messed up somewhere....but not sure where and how to
proceed to create a new PDFPage in a proper fashion.


How do I proceed?


Best Regards,

Amrit.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: PDFPage Creation query
      • From: John Calhoun <email@hidden>
    • Re: PDFPage Creation query
      • From: Antonio Nunes <email@hidden>
  • Prev by Date: Re: docset for 10.4?
  • Next by Date: Re: PDFPage Creation query
  • Previous by thread: Re: NSPasteboard Delegate
  • Next by thread: Re: PDFPage Creation query
  • Index(es):
    • Date
    • Thread