Recent file list pdf

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

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.
Post Reply
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Recent file list pdf

Post by Audros »

Hello,
we have a problem with how to add pdf filepath  to recentfiles list without opening it?
How we can do that.
Thanks
Best regard
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

The only way of doing that from the SDK (aside from the direct file opening) would be loading the User Settings that hold the needed history items. You can prepare these setting beforehand and use them to your needs.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello

thank you, but how to do that in c#

i use this code to savehistory

IString s1 = pdfCtl.Inst.CreateString(@"HKEY_CURRENT_USER\Software\Audros\AudrosPDfEditor\PDFEditorRecents");
IString s2 = pdfCtl.Inst.CreateString(Path.GetDirectoryName(pdfCtl.Doc.CoreDoc.SrcInfo.ActualFileName) + "\\hist\\" + Path.GetFileNameWithoutExtension(pdfCtl.Doc.CoreDoc.SrcInfo.ActualFileName) + "_" + numFile + ".pdf");
// pdfCtl.Inst.ClearHistory();
pdfCtl.Inst.SaveHistory(s1,s2,0);



but how to load it?
my menu is personalized.

best regard
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

There is a sample on that matter in FullDemo applcation. These methods should be used: https://sdkhelp.pdf-xchange.com/vi ... erSettings and https://sdkhelp.pdf-xchange.com/vi ... erSettings

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
it doesn't work cause my menu is personalized it looks like in pictures bellow!

Before and after loadusersetting
Attachments
1.png
2.png
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

That's because you should only save and then load the History settings and not all of them.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

hello
thanks for your answers

i get that point, but loadhistory function does'nt exist!!!

best regard
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros ,
image.png
When exporting settings - check only the history checkbox - then import those settings into your Control.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
thank you, i want to do this by code
  • i use to save history this code:

IString s1 = pdfCtl.Inst.CreateString(@"HKEY_CURRENT_USER\Software\Audros\AudrosPDfEditor\PDFEditorRecents");
IString s2 = pdfCtl.Inst.CreateString(Path.GetDirectoryName(pdfCtl.Doc.CoreDoc.SrcInfo.ActualFileName) + "\\hist\\" + Path.GetFileNameWithoutExtension(pdfCtl.Doc.CoreDoc.SrcInfo.ActualFileName) + "_" + numFile + ".pdf");

pdfCtl.Inst.SaveHistory(s1,s2,0);

i see that it save history yes,

  • But when i load setting using


pdfCtl.Inst.LoadUserSettings(s1, 0);

  • i lose my menu like in picture 2 bellow
Attachments
before.png
2.png
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

Forwarded this one to the appropriate developer - he'll take a look when he has time.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
Thank you,
Could you send it to the appropriate one,
I don t know who to contact

Best regard
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

Already did.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello,
thank you for your exchange, I ask on the other hand if you have news about it. Thank you.
Best regards
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

From what I see, he did not have time to look at this one yet, though I asked him about this again, so hopefully he can tend to this soon.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
Ok thank you
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Recent file list pdf

Post by Vasyl-Tracker Dev Team »

Hi Audros,

Sorry for delay with answer. Unfortunately but currently you have no simple way to load the custom History data.
As workaround you may use the ExportSettings/ImportSettings operations:

Code: Select all

// EXPORT HISTORY ONLY
IOperation op = Inst.CreateOp(Inst.Str2ID("op.settings.export");
ICabNode opts = op.Params["Options"];

op.Params["Input"].v =  destFile; // IString with full file name of destination file or IAFS_Name or IAFS_File 

opts["History"].v = true;

opts["Settings"].v = false;
opts["Presets"].v = false;
opts["TrustedList"].v = false;
opts["Prompts"].v = false;
opts["UILang"].v = false;

op.Do();

....
....

// IMPORT HISTORY ONLY
IOperation op = Inst.CreateOp(Inst.Str2ID("op.settings.import");
ICabNode opts = op.Params["Options"];

op.Params["Input"].v =  srcFile; // IString with full file name of source file or IAFS_Name or IAFS_File 

opts["History"].v = true;
// opts["MergeHistory"].v = true; // otherwise the existing history will be replaces by new one

opts["Settings"].v = false;
opts["Presets"].v = false;
opts["TrustedList"].v = false;
opts["Prompts"].v = false;
opts["UILang"].v = false;

op.Do();
HTH
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello,
thank you
Best regards
Last edited by Audros on Fri Nov 29, 2019 9:03 am, edited 2 times in total.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello,
thank you
otherwise this does not answer to my concerns, in fact, I would like to know how to add a pdf file to the list of recent files without opening it in pdf editor .
Best regards
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

The only way of doing that is either opening the document, or saving the needed settings with history only from other place and loading it in your control - Vasyl did give a sample on how to do that.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
Thank you for your responsiveness, unfortunately, our concern is to be able to perform backup of the open file in the background and added to a list of recent files.
By cons, otherwise, is there a way to add a menu similar to that of recent files editable via the API, with a file opening event to click.
Best regard
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Audros wrote: Fri Nov 29, 2019 10:14 am to be able to perform backup of the open file in the background and added to a list of recent files.
Can you describe what you are trying to achieve more clearly - probably there is another way of doing this.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
Our goal is to be able to perform automatic backups after a specified time, and we want these backups to be in the background and do not block the work on the current file.
Then be able to find these backups in a menu similar to that of recent files for simulated undo;
see attached picture
Kind regards
Attachments
Sans titre.png
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Recent file list pdf

Post by Vasyl-Tracker Dev Team »

Hi Audros.

Seems you need the simple IPXV_Inst::LoadHistory method that we haven't at the moment. We will add such method in the near future..

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
is there a way to create a sumilary menu?
Thank you
Best regard
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

I'm afraid there is no easy way of creating the same dropdown menu. Better wait for the method that Vasyl suggested.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Audros
User
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

Re: Recent file list pdf

Post by Audros »

Hello
Thank you,
Can we know when this function will be integrated(loadhostory)?
Best regards
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team »

Hello Audros,

Not earlier then the next release.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Recent file list pdf

Post by Vasyl-Tracker Dev Team »

Hi Audros.

In the upcoming new 335 build you will be able to use new function

Code: Select all

IPXV_Inst::LoadHistory(IUnknown* pHistorySrc, LONG nFlags = 0);

pHistorySrc - it can be pointer to IString(full path to the file or to the registry key), or pointer to the IAFS_Name|IAFS_File|IStream
nFlags - is zero by default, but you can specify the PXV_LoadHistory_Merge flag to merge existing history and new one.
Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply