Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Open the PDF using NSData instead the path ? 7 years 9 months ago #10778

  • Shades
  • Shades's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 37
  • Thank you received: 0
Hello,

is there a way to open the PDF passing data instead of the path ?
Actually I am using this :
-(int)PDFOpen:(NSString *)path : (NSString *)pwd{
But I am wondering if there is another method to preview the PDF without the path.It would be very helpful for me.

Thank you

Please Log in or Create an account to join the conversation.

Open the PDF using NSData instead the path ? 7 years 9 months ago #10779

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,
you could try to use PDFopenMem instead of PDFOpen

Please Log in or Create an account to join the conversation.

Open the PDF using NSData instead the path ? 7 years 9 months ago #10780

  • Shades
  • Shades's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 37
  • Thank you received: 0
Thank you,

Could you please tell me more how should I pass the data (it's a void not NSDATA ) ?
-(int)PDFopenMem : (void *)data : (int)data_size :(NSString *)pwd
NSUInteger len = [originalData length];
    int size = (int) len;
    void *typedData = malloc(len);
   int r= [self PDFopenMem:typedData :size :NULL];
    int pageno =1;
    if ( r>0) {
        [self PDFThumbNailinit:pageno];
    }
and the result is 0 ?
With the PDFOpenMem is it possible to addBitmap and get the path and the data ?

Please Log in or Create an account to join the conversation.

Last edit: by Shades. Reason: More detail
  • Page:
  • 1
Powered by Kunena Forum