You need to sign in to do that
Don't have an account?
PDes
pdf from external url
In the response from 3rd party I am getting url, I want to grab that url and save that pdf in a salesforce object.
If I manually use that url and paste in browser it downloads the file. But when I use pagereference method to show in apex it doesnt show the file.
String url1 = 'some external url' //this I get in httpresponse from 3rd party
Pagereference pg = new Pagereference(url1);
Blob b = pg.getContentAsPDF();
How can I grab this url and save pdf file in Salesforce.
If I manually use that url and paste in browser it downloads the file. But when I use pagereference method to show in apex it doesnt show the file.
String url1 = 'some external url' //this I get in httpresponse from 3rd party
Pagereference pg = new Pagereference(url1);
Blob b = pg.getContentAsPDF();
How can I grab this url and save pdf file in Salesforce.
I hope this question is duplicate for the below.
http://https://developer.salesforce.com/forums?dc=Apex_Code_Development#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Apex_Code_Development&criteria=ALLQUESTIONS&id=9062I000000gFPUQA2 (http://https://developer.salesforce.com/forums?dc=Apex_Code_Development#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Apex_Code_Development&criteria=ALLQUESTIONS&id=9062I000000gFPUQA2)
Please allow experts some time to check the issue and answer it. As it is duplicate. Please close the thread by marking it as best answer.
Thanks,