• 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
Help with displaying encrypted PDF image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with displaying encrypted PDF image


  • Subject: Help with displaying encrypted PDF image
  • From: Mario Gajardo Tassara <email@hidden>
  • Date: Sun, 17 Feb 2008 10:52:32 -0300

Hi, im trying to displaying encrypted pdf formated images in cocoa. this is my code to load these images, but nothing is displayed, however non encrypted pdf displayed with zero problems. All my encrypted images seems to be decrypted because the printf statement "unlocked" is reached always. Any help will be appreciated, thanks.

		NSImage *pix2;

		NSData *pdfData=[[NSData alloc]initWithContentsOfFile:image_path_];
		PDFDocument *pdfImage=[[PDFDocument alloc]initWithData:pdfData];

		if([pdfImage isLocked]) {
			if([pdfImage unlockWithPassword:@"xxxx"]) {
				printf("unlocked");
			}
			else {
				printf("error");
			}
		}

		pix2=[[NSImage alloc]initWithData:[pdfImage dataRepresentation]];

		[pix2 drawInRect:[spritesGCObjectsArray_ returnSpriteRect_]
		 fromRect:NSZeroRect
		 operation:NSCompositeCopy
		 fraction:1];


Mario Gajardo Tassara




_______________________________________________

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: Help with displaying encrypted PDF image
      • From: John Calhoun <email@hidden>
    • Re: Help with displaying encrypted PDF image
      • From: Antonio Nunes <email@hidden>
  • Prev by Date: Re: [Foo new] vs [[Foo alloc] init]:
  • Next by Date: Re: Enabled Binding bound to NSArrayController won't disable view.
  • Previous by thread: Re: TableView & KeyDown
  • Next by thread: Re: Help with displaying encrypted PDF image
  • Index(es):
    • Date
    • Thread