• 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
Re: TIFF from PDF
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TIFF from PDF


  • Subject: Re: TIFF from PDF
  • From: Gideon King <email@hidden>
  • Date: Tue, 28 May 2002 22:05:15 +0800

I do a very similar thing in my app, except I create a PDFImageRep explicitly like this:

imageRep = [[NSPDFImageRep alloc] initWithData:pdfData];
image = [[NSImage alloc] initWithSize:theRect];
[image addRepresentation:imageRep];

This works for me. Hope it helps in your situation.

Gideon.

Hi all. Sorry if this seems simplistic to most, I'm still quite a newbie

I'm trying to take some RTFD content in an NSTExtView and getting a TIFF representation out if it... so I can paste in a carbon app. I don't want the text, I just want to click on an image which was pasted there (say from a screenshot) and Copy and Paste.

So... what I'm doing at this point is the following.

In my subclass of NSTextView, I'm doing the following:


pdfData = [self dataWithPDFInsideRect:theRect];
myImage = [[NSImage alloc] initWithData:pdfData];
[pb setData:[myImage TIFFRepresentation] forType:NSTIFFPboardType];

where pdfData is an NSData, myImage is an NSImage and pb is the pasteboard

All I get is a black shape of the right size...

I'm sure this is obvious to you all, but I need some guidance...

thanks for your help!

Renaud
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >TIFF from PDF (From: Renaud Boisjoly <email@hidden>)

  • Prev by Date: Re: "Pressed" toolbar Items
  • Next by Date: Re: "Pressed" toolbar Items
  • Previous by thread: TIFF from PDF
  • Next by thread: NSOutlineView: multi-line entries (i.e. soft wrapped)
  • Index(es):
    • Date
    • Thread