Is there a way to overwrite the file after the conversion with ConvertTo(path) ?
The new version doesn’t overwrite the file as the previous one.
The only setting i found in the documentation is for a FTP server :
Ftp.EnsureUniqueFilenames Bool : If true, files with the same name will not be overwritten on the server. A counter will be appended instead (i.e. document_2.pdf).
Is there another COM property setting for a local file ( for example “PdfSettings.EnsureUniqueFilenames” ) ?
Thank you for your answer,
Can you comfirm me if it is possible or not with the COM Interface 2.4.0 to overwrite a file with the same name ?
Thank you for your help,
it seems it is possible to do it, but not to change the setting via COM.
The COM interface will use the setting of the profile used for the conversion, e.g. if you change this setting once (profile settings->auto-save->ensure unique filenames) through the GUI and save it, the files will get overwritten afterwards.
Thanks for your answer.
That work good through the GUI but we have to enable the auto saving and set a defaulft folder (V2.4.0).
As I use a script using the COM Interface 2.4.0 in a VBA application used by many people in my compagny , that means I have to set up all users GUI and be sure that they don’t modify this configuration !
Do you know if in a future release it will be possible to change the overwriting through the COM interface ? (like for the FTP server property : Ftp.EnsureUniqueFilenames Bool
Thank you again for your support and all the job done with PDFCreator,
I think it would be only consequent to make this setting available through COM, it was most likely overlooked because it is a sub-setting of the auto-save section and the auto-save setting (enabled or disabled) itself isn’t needed when working through COM. Until it has been implemented, you could in theory set this directly in the users registry so that you can do it from the script (HKEY_CURRENT_USER\SOFTWARE\pdfforge\PDFCreator\Settings\ConversionProfiles\0\AutoSave “Ensure unique filenames”).
You are right : my script is now working fine when i set the users registry as per your recommandation.
Thank your for your guidance. It is really appreciated,
If GUI it has an option to do this, so, it will be a very useful property in COM object, too.
To modify system registry is not so clearly programmatically, while Windows 7 or greater disable this option for a user, we have to run script modification with admin rights.
So, I will wait for that property directly in COM object!
a ticket for this has been created but I can’t promise it will make it to the next update which will be released shortly.
Did anything ever happen with this? My workaround is to delete the file first using kill if it already exists.
Sorry, the ticket originally got rejected due to a misunderstanding.
ConvertTo should always overwrite the file (which would make a setting for this more or less obsolete), but it actually doesn’t. We are now looking into it again.
I'm sorry to revive this old post, but I was wondering if there is any update on this topic. I'm using PDFCreator 5.1.1 via the COM interface and files are not overwritten but appended to an existing one with the same name.
I tried setting
false in my script but I had no luck.