We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
whizpool t.
10 years agoNew member | Level 1
how to get all files in pdf format can dropbox convert before i download it through the API
I have doc file on my dropbox when i access these files from my app i want them to be in pdf techincally i want them to be downloaded in pdf
whizpool t.
10 years agoNew member | Level 1
NSString * authorizToken = @"Bearer <Acess Token>";
NSURL *url = [NSURL URLWithString:[[NSString stringWithFormat:@"https://content.dropboxapi.com/1/previews/auto/%@",dropboxPath ] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ];
NSMutableURLRequest *request =
[NSMutableURLRequest requestWithURL:url
cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
timeoutInterval:10
];
[request setValue:authorizToken forHTTPHeaderField:@"Authorization"];
[request setHTTPMethod: @"GET"];
NSError *requestError = nil;
NSURLResponse *urlResponse = nil;
NSData *response1 =
[NSURLConnection sendSynchronousRequest:request
returningResponse:&urlResponse error:&requestError];
[response1 writeToFile:pdfPath atomically:YES];
Error fie not found
when i do this
[pMainDelegate.restClient searchPath:@" forKeyword:dropboxData.fileName];
it returns that file exits and in the rest client there is no method which helps me in call the https://content.dropboxapi.com/1/previews/auto
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!