Emailing from viewer does not create an attachement
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Emailing from viewer does not create an attachement
Our applications passes PDF documents via stream to the PDF viewer using an ActiveX interface, no file is ever generated by our application. When a user clicks the browser toolbar button to email the document it will launch the email client (Outlook 2013 or 2010) and create a message with the subject "Document from Stream.pdf" but will not attach a file. Does this not work when the document is opened via stream?
Thanks
Chris
Thanks
Chris
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Emailing from viewer does not create an attachement
Hi Chris,
if I understand you correctly - no PDF file exists on the users system other than in memory and if this is so - then your email client will not find a file to attach on the users drive - the file must be saved to disk first for a file to be attached and sent via email.
HTH
if I understand you correctly - no PDF file exists on the users system other than in memory and if this is so - then your email client will not find a file to attach on the users drive - the file must be saved to disk first for a file to be attached and sent via email.
HTH
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Re: Emailing from viewer does not create an attachement
Thanks for the quick response,
In our application the PDF files are generated and stored in the application database. When we view them we pass the data to the viewer using an ISTREAM. It sounds like this is not compatible with the functionality provided by the viewer toolbar email button.
I guess I was expecting the viewer to generate a temp file of whatever was in the viewer, original contents plus any changes, and pass that file to the email client.
Short of abandoning the ISTREAM passing method do you have any suggestions as to how I can make this work?
-Chris
In our application the PDF files are generated and stored in the application database. When we view them we pass the data to the viewer using an ISTREAM. It sounds like this is not compatible with the functionality provided by the viewer toolbar email button.
I guess I was expecting the viewer to generate a temp file of whatever was in the viewer, original contents plus any changes, and pass that file to the email client.
Short of abandoning the ISTREAM passing method do you have any suggestions as to how I can make this work?
-Chris
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Emailing from viewer does not create an attachement
Hi Chris,
By default that's exactly what the Viewer does, and only if you explicitly set up the "UseStreamsDirectly" option - the Viewer will work directly with the stream. So are you forcing the UseStreamsDirectly or not?
Best,
Stefan
By default that's exactly what the Viewer does, and only if you explicitly set up the "UseStreamsDirectly" option - the Viewer will work directly with the stream. So are you forcing the UseStreamsDirectly or not?
Best,
Stefan
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Re: Emailing from viewer does not create an attachement
I am setting the property to 1.
SetProperty("Documents.UseStreamsDirectly", 1, 0);
This has been working for a couple years, we have only recently had someone customize the toolbar and try to use the email function.
-Chris
SetProperty("Documents.UseStreamsDirectly", 1, 0);
This has been working for a couple years, we have only recently had someone customize the toolbar and try to use the email function.
-Chris
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Emailing from viewer does not create an attachement
Hi Chris,
Yes - with this set to 1, the Viewer will work with the stream directly and no temp files would be created in the file system, and as such the mail client would be unable to include the PDF as attachment. You can either set this flag to 0, which will mean the Viewer will start making temp files from your streams and as soon as the temp file is there - the stream is released, or you can think of other means to intercept and handle the "send by e-mail" button in the toolbar. You can either deactivate this command, or if you want to allow it - you can listen for it, and as soon as the user selects it - save a temp copy of the file locally which can then be attached to an e-mail, and you will then need to make sure to delete that temp copy.
Best,
Stefan
Yes - with this set to 1, the Viewer will work with the stream directly and no temp files would be created in the file system, and as such the mail client would be unable to include the PDF as attachment. You can either set this flag to 0, which will mean the Viewer will start making temp files from your streams and as soon as the temp file is there - the stream is released, or you can think of other means to intercept and handle the "send by e-mail" button in the toolbar. You can either deactivate this command, or if you want to allow it - you can listen for it, and as soon as the user selects it - save a temp copy of the file locally which can then be attached to an e-mail, and you will then need to make sure to delete that temp copy.
Best,
Stefan
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Re: Emailing from viewer does not create an attachement
If I use SetProperty("Documents.UseStreamsDirectly", 0, 0) when the user has a toolbar (the application controls the toolbar) with an email button enabled will that solve the issue? Are their other viewer functions that require this to work properly?
Does the viewer cleanup the temp file after the document is closed?
How does the viewer generate the filename used for the attachment?
-Chris
Does the viewer cleanup the temp file after the document is closed?
How does the viewer generate the filename used for the attachment?
-Chris
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Emailing from viewer does not create an attachement
Hi Chris,
UseStreamsDirectly should be set only once and before opening any PDF documents,.
This is a general setting only related to the way the Viewer handles stream objects and should not have any efect on any other methods, though performing a save operation would now do it on the local copy and not on the database.
I believe the temp files would be placed in the windows temp - so windows will take care of them.
The filename for the attachment should be the filename received by the Viewer when it opened the file initially though I will have to double check this with my colleagues from the dev team.
Best,
Stefan
UseStreamsDirectly should be set only once and before opening any PDF documents,.
This is a general setting only related to the way the Viewer handles stream objects and should not have any efect on any other methods, though performing a save operation would now do it on the local copy and not on the database.
I believe the temp files would be placed in the windows temp - so windows will take care of them.
The filename for the attachment should be the filename received by the Viewer when it opened the file initially though I will have to double check this with my colleagues from the dev team.
Best,
Stefan
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Re: Emailing from viewer does not create an attachement
I apologize if I am beginning to sound a little dense. As I am understanding it the UseStreamsDirectly property only effects the way the viewer handles data fetches and updates to the document. If I set it to 0, I can still pass the document using ISTREAM, but the viewer will read the entire stream to a scratch file to maintain any edits. I am still not passing a filename in this process, how will it create the attachment?
-Chris
-Chris
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Emailing from viewer does not create an attachement
Yes, there is a bug with sending by email a document opened from a stream if the document was not modified.
Bug is fixed now and the fix will be available in the next build of the viewer.
Bug is fixed now and the fix will be available in the next build of the viewer.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Re: Emailing from viewer does not create an attachement
Do you know when the next build version will be released?
-
- Site Admin
- Posts: 7370
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Emailing from viewer does not create an attachement
There will be an Editor release early in June and we hope to have the Viewer and SDK not too long after that. No firm date as yet though.
hth
hth
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 11
- Joined: Tue Aug 30, 2011 8:06 pm
Re: Emailing from viewer does not create an attachement
Was this bug identified in the preceding post ever resolved and released?
-
- User
- Posts: 8
- Joined: Thu Feb 03, 2011 2:22 pm
Re: Emailing from viewer does not create an attachement
Ivan - Tracker Software wrote:Yes, there is a bug with sending by email a document opened from a stream if the document was not modified.
Bug is fixed now and the fix will be available in the next build of the viewer.
Is this fix available, if so what do I need to download to obtain it?
Thanks
-
- Site Admin
- Posts: 7370
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Emailing from viewer does not create an attachement
Hi Chris,
this should be in the current Viewer SDK - Current Version:2.5.212 (Updated on 29 Aug 2013)
hth
this should be in the current Viewer SDK - Current Version:2.5.212 (Updated on 29 Aug 2013)
hth
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com