Hi,
I am new to the PDF Editor control. How do I save a new document to a location and name which is defined in a string (filepath="C:\test.pdf") ?
PDFXcontrol.Doc.Save(filepath)
throws error. I am using VB.net and Visual Studio 2013
Thank you
Charu
save document to a location
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
Stefan - PDF-XChange
- Site Admin
- Posts: 19961
- Joined: Mon Jan 12, 2009 8:07 am
Re: save document to a location
Hello Charu,
Please take a look here:
https://sdkhelp.pdf-xchange.com/vie ... ument_Save
The Save method takes a bit more parameters than just the save path, and that's probably why you are getting the errors.
Regards,
Stefan
Please take a look here:
https://sdkhelp.pdf-xchange.com/vie ... ument_Save
The Save method takes a bit more parameters than just the save path, and that's probably why you are getting the errors.
Regards,
Stefan
-
Sasha - PDF-XChange
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: save document to a location
The thing is, that the IString or IAFS_Name should be used as destination parameters. You give string as the first parameter thus the error occur. You can use
if you want to pass the string parameter without any conversions.
HTH,
Alex
Code: Select all
PDFXcontrol.Doc.CoreDoc.WriteToFile("C:\test.pdf")HTH,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
chavas
- User
- Posts: 141
- Joined: Tue Mar 15, 2016 12:21 pm
Re: save document to a location
thanks that did it...
-
Sasha - PDF-XChange
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: save document to a location
Glad to hear that chavas.
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ