Is it possible to open a document by transferring directly the binary string, e.g. using doVerb( ' ','OpenDocument',data,...)?
Thanks.
Thomas
Open Document from binary string without local download
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 35
- Joined: Tue Oct 06, 2015 1:09 pm
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Open Document from binary string without local download
Hello Thomas,
You need to specify the "UseStreamsDirectly" flag:
Regards,
Stefan
You need to specify the "UseStreamsDirectly" flag:
Code: Select all
SetProperty("Documents.UseStreamsDirectly", 0, 0)
Stefan
-
- User
- Posts: 35
- Joined: Tue Oct 06, 2015 1:09 pm
Re: Open Document from binary string without local download
Thank you. How do I supply the variant Parameter? Is it a BSTR?
Thank you.
T.
Thank you.
T.
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Open Document from binary string without local download
Hi Thomas.
1. path to file on the disk
2. URL to remote file
3. IStream-based object (good alternative for your case, look to our SDK examples to see how to pass stream)
Also, as mentioned above - you may set the special property that forces viewer activeX to keep strong relation between input-stream and opened document. This relation is required for regular end-user's 'Save Doc to Source' feature. Otherwise, when user clicked 'Save' button for document that was loaded from stream - it will show the 'Save As..' dialog instead of simple and silent saving to the source-stream.
In C++:
In C#:
HTH
No, the document source can be:Is it possible to open a document by transferring directly the binary string, e.g. using doVerb( ' ','OpenDocument',data,...)?
1. path to file on the disk
2. URL to remote file
3. IStream-based object (good alternative for your case, look to our SDK examples to see how to pass stream)
Also, as mentioned above - you may set the special property that forces viewer activeX to keep strong relation between input-stream and opened document. This relation is required for regular end-user's 'Save Doc to Source' feature. Otherwise, when user clicked 'Save' button for document that was loaded from stream - it will show the 'Save As..' dialog instead of simple and silent saving to the source-stream.
In C++:
Code: Select all
ATL::CComBSTR propName("Documents.UseStreamsDirectly");
ATL::CComVariant propVal(true); // == ATL::CComVariant propVal(1); == ATL::CComVariant propVal("true");
pdfViewer.SetProperty(propName, propVal, 0);
Code: Select all
pdfViewer.SetProperty("Documents.UseStreamsDirectly", true, 0);
// == pdfViewer.SetProperty("Documents.UseStreamsDirectly", 1, 0);
// == pdfViewer.SetProperty("Documents.UseStreamsDirectly", "true", 0);
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.
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.