hello,
I have a couple of questions regarding saving PDF into Image and saving PDF pages into a File.
1. When I 'Export to image' via API with PXCVA_NoUI flag, I set the file name which can contain Macros with Export.Image.FileName. However, before saving I would like to verify that that file doesn't already exist. So how can I get the destination file name after its macros has been replaced but before saving it without using your UI for Image export? can I just use your prompt window for file replace?
2. When I want to save PDF pages, I use ExtractPages and it works great. Again Operations.ExtractPages.DestFileName can contain Macros. Is there a way to verify that that file doesn't already exist after macros have been replaced.
3. After I call ExtractPages, I see that new exported file will be loaded into the Activex. Is there a way to specify not to load it?
Thanks,
-Tatiana
exporting PDF to File
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: exporting PDF to File
Hi Tatiana.
You may use Export2Images/ExtractPages without NoUI flag BUT handle the event: type=PXCVA_OnDisplayPrompt,name="Prompts.ConfirmFileReplace" to replace skip "Conform File Replace" dialog and replace by your action. Example:
HTH.
You may use Export2Images/ExtractPages without NoUI flag BUT handle the event: type=PXCVA_OnDisplayPrompt,name="Prompts.ConfirmFileReplace" to replace skip "Conform File Replace" dialog and replace by your action. Example:
Code: Select all
youreventhandler OnEvent(type, name)
{
if ((type==PXCVA_OnDisplayPrompt) AND (name=="Prompts.ConfirmFileReplace"))
{
SetProperty("Prompts.ConfirmFileReplace.UserChoice", "Yes"); // replace without dialog
// SetProperty("Prompts.ConfirmFileReplace.UserChoice", "No"); // to skip this file saving
// SetProperty("Prompts.ConfirmFileReplace.FileName", myCustomFileName); // to specify the custom destination file name
}
}
You are right but currently is no way to forbid loading of new file inro ActiveX... As workaround - you may close the opened doc immediately.3. After I call ExtractPages, I see that new exported file will be loaded into the Activex. Is there a way to specify not to load it?
HTH.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
Re: exporting PDF to File
Hello,
I tried this, but unsuccessful...
First I export an document with:
DoDocumentVerb(activeDocumentID, '', 'ExportDocument', dataIn, dataOut, PXCVA_NoUI);
on Event I do this:
if (Type_ = PXCVA_OnDisplayPrompt) and (name ='Prompts.ConfirmFileReplace') then begn
.......
end;
but this prompt is not triggered, even though the same file already exist.
What do I do wrong?
I tried this, but unsuccessful...
First I export an document with:
DoDocumentVerb(activeDocumentID, '', 'ExportDocument', dataIn, dataOut, PXCVA_NoUI);
on Event I do this:
if (Type_ = PXCVA_OnDisplayPrompt) and (name ='Prompts.ConfirmFileReplace') then begn
.......
end;
but this prompt is not triggered, even though the same file already exist.
What do I do wrong?
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: exporting PDF to File
Hi, Tatiana.
You may use:
DoDocumentVerb(activeDocumentID, '', 'ExportDocument', dataIn, dataOut, 0);
- without PXCVA_NoUI flag. Only in this case the "ConfirmFileReplace" event can be fired..
Then, in the OnEvent() to skip the dialog displaying you may change "UserChoice" from zero(show dialog) to any other supported value.
HTH
You may use:
DoDocumentVerb(activeDocumentID, '', 'ExportDocument', dataIn, dataOut, 0);
- without PXCVA_NoUI flag. Only in this case the "ConfirmFileReplace" event can be fired..
Then, in the OnEvent() to skip the dialog displaying you may change "UserChoice" from zero(show dialog) to any other supported value.
HTH
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
Re: exporting PDF to File
When I use DoDocumentVerb(activeDocumentID, '', 'ExportDocument', dataIn, dataOut, 0);
the 'Export to Image' dialog is popping up, which I do not want because I have my own. Is there a way to bypass it?
Thanks
the 'Export to Image' dialog is popping up, which I do not want because I have my own. Is there a way to bypass it?
Thanks
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: exporting PDF to File
Here is conflict... You may pass it only by using of PXCVA_NoUI flag.
In new build we will change code slightly - the "Prompts.ConfirmFileReplace" event will be fired always even if NoUI is specified (but in this case our ReplaceFile-dialog not be shown).
In new build we will change code slightly - the "Prompts.ConfirmFileReplace" event will be fired always even if NoUI is specified (but in this case our ReplaceFile-dialog not be shown).
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.