Recent file list pdf

PDF-XChange Editor SDK for Developers

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

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 » Fri Nov 22, 2019 10:15 am

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

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Fri Nov 22, 2019 11:12 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Fri Nov 22, 2019 11:18 am

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

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Fri Nov 22, 2019 2:40 pm

Hello Audros,

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

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Fri Nov 22, 2019 2:54 pm

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

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Fri Nov 22, 2019 2:58 pm

Hello Audros,

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

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Fri Nov 22, 2019 3:07 pm

hello
thanks for your answers

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

best regard

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Sat Nov 23, 2019 7:45 am

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

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Sat Nov 23, 2019 10:43 am

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

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Mon Nov 25, 2019 12:43 pm

Hello Audros,

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

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Mon Nov 25, 2019 1:40 pm

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

Best regard

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Mon Nov 25, 2019 3:03 pm

Hello Audros,

Already did.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Wed Nov 27, 2019 3:44 pm

Hello,
thank you for your exchange, I ask on the other hand if you have news about it. Thank you.
Best regards

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Thu Nov 28, 2019 8:26 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Thu Nov 28, 2019 1:16 pm

Hello
Ok thank you

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Thu Nov 28, 2019 3:05 pm

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1962
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Recent file list pdf

Post by Vasyl-Tracker Dev Team » Fri Nov 29, 2019 2:09 am

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 » Fri Nov 29, 2019 8:39 am

Hello,
thank you
Best regards
Last edited by Audros on Fri Nov 29, 2019 9:03 am, edited 2 times in total.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Fri Nov 29, 2019 8:49 am

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Fri Nov 29, 2019 9:02 am

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

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Fri Nov 29, 2019 9:48 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Fri Nov 29, 2019 10:14 am

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

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Fri Nov 29, 2019 10:19 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Fri Nov 29, 2019 10:29 am

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: 1962
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Recent file list pdf

Post by Vasyl-Tracker Dev Team » Fri Nov 29, 2019 5:38 pm

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 » Fri Nov 29, 2019 7:10 pm

Hello
is there a way to create a sumilary menu?
Thank you
Best regard

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Mon Dec 02, 2019 8:25 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Mon Dec 02, 2019 1:26 pm

Hello
Thank you,
Can we know when this function will be integrated(loadhostory)?
Best regards

User avatar
Sasha - Tracker Dev Team
User
Posts: 4639
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Recent file list pdf

Post by Sasha - Tracker Dev Team » Mon Dec 02, 2019 1:28 pm

Hello Audros,

Not earlier then the next release.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1962
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Recent file list pdf

Post by Vasyl-Tracker Dev Team » Wed Dec 11, 2019 3:28 am

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