I'm developing an application where i need to create pdf file based on user input and the save it to server so that i can again show in my application.
i have successfully created the pdf file at document folder but how to save it in server location? i have two thoughts
- should i have to create a network connection and the just give the url at path
or just set tha path which will server url in path
enter code here
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *saveDirectory = [paths objectAtIndex:0]; NSString *saveFileName = @"mypdffiel1.pdf"; NSString *newFilePath = [saveDirectory stringByAppendingPathComponent:saveFileName]; CreatePDFFile(CGRectMake(0, 0, 612, 792),filename,text1 ,text2);
what should change in path variable so that it can save in server url