Hey All,
I'm not sure if i'm in the right place but i'll start here and move on if needed. What I have developed for my company is a way to go into their SharePoint document library, hover over a link to a document, and have a preview pop up. This is simple enough to do using JQuery and I have it working for PDF's, however it only works if Adobe Viewer is the default PDF Viewer. As soon as I make PDF Xchange the default viewer, my hover over window is just blank with a little icon in the top left corner. This code also works for images, dwg files, dwf files and image files. The environment i am working in is Windows Server 2003, VS 2008, MOSS 2007, and the only software installed is DWG Trueview, Design Review (for DWF's), Adobe X, PDF Xchange 4.0197, and MS Office 2010 Pro Plus. Attached is a clip of what i see when i hover over the href with PDF Xchange as the default viewer, whereas other programs preview the document in this window. Can anyone offer some advice as to why PDF Xchange isn't viewing the document? Thanks in advance!
Here is the Javascript / JQuery for performing this action inside of Sharepoint:
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script><script type="text/javascript">
function imagePreview(){
arrOfImageTypes = ['jpg','jpeg','gif'];
arrOfDocTypes = ['pdf','dwf','dwg'];
$("table.ms-listviewtable td.ms-vb2 a").hover(function(e){
var href = this.href;
var img = href.substring(href.lastIndexOf('.')+1).toLowerCase();
if(href.indexOf('http')==0 && $.inArray(img,arrOfImageTypes)>-1){
$("body").append("<img id='preview' src='"+ this.href +"' alt='Preview Img' />");
}
if(href.indexOf('http')==0 && $.inArray(img,arrOfDocTypes)>-1){
$("body").append("<object id='preview' data='"+ this.href +"' width='500' height='500'></object>");
}
var obj = $("#preview");
var offset = $(this).offset();
var winHeight = $(window).height();
var winWidth = $(window).width();
var scrollLeft = $(window).scrollLeft();
var scrollTop = $(window).scrollTop();
var objHeight = obj.outerHeight();
var objWidth = obj.width()+15;
if(((winWidth+scrollLeft)-offset.left)<objWidth){
offset.left=((winWidth+scrollLeft)-objWidth);
}
var maxHeight = (winHeight+scrollTop)-offset.top;
if(objHeight>maxHeight){
if(offset.top-scrollTop>objHeight){
offset.top=offset.top-objHeight-20;
}
height = (objHeight<winHeight)?objHeight:winHeight;
}
obj.css({"position":"absolute","top":(offset.top+20)+"px","left":offset.left+20})
.fadeIn("slow");
},
function(){
$("#preview").remove();
});
};
// Call the script on page load
$(document).ready(function(){
imagePreview();
});</script>
PDF Document Preview Pop-up
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: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: PDF Document Preview Pop-up
Hello gwidmeyer,
I've asked our devs to take a look at your case, and we should have a reply for you soon.
We will update this topic with any advise we have.
Best,
Stefan
I've asked our devs to take a look at your case, and we should have a reply for you soon.
We will update this topic with any advise we have.
Best,
Stefan
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: PDF Document Preview Pop-up
How is the viewer used here? Is it embedded in browser or like in Windows Explorer to preview files ?
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: 4
- Joined: Fri Aug 07, 2009 5:35 pm
Re: PDF Document Preview Pop-up
With PDF Xchange as my default viewer, i can open a PDF document and view it in my browser, such as from a webpage. When i use the hover over feature i have created, the hover over is opening the file in it's default program and displaying it in the browser (except when PDF Xchange is the default PDF viewer). This means it is being used as embedded in browser. There is much more detail in the original post for this.
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: PDF Document Preview Pop-up
I'm afraid nothing is attached in your original post. Can you attach you clip again (please note you have to zip it before), or send it to Ivan@tracker-software.com ?Attached is a clip of what i see when i hover over the href with PDF Xchange as the default viewer, whereas other programs preview the document in this window.
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: 4
- Joined: Fri Aug 07, 2009 5:35 pm
Re: PDF Document Preview Pop-up
My apologies, here is the .zip with a screenshot. In the screenshot you can't see my mouse but i am hovering over the link. If Adobe is my default pdf reader, that frame that you see would show the document.
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: PDF Document Preview Pop-up
I'm afraid I will need to try to reproduce the issue on my side to find what may cause the problem.
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: 4
- Joined: Fri Aug 07, 2009 5:35 pm
Re: PDF Document Preview Pop-up
The exact conditions i have this problem in are as follows:
Create a webpart page on MOSS2007 (or any Sharepoint page that supports webparts) and create a content editor webpart. Insert the above Java into the source code for the webpart and save it. Now put a list webpart on that page, any list will do as long as you have a field where you can see the entire path. Hovering over that path with the mouse should show the document pop-up.
Create a webpart page on MOSS2007 (or any Sharepoint page that supports webparts) and create a content editor webpart. Insert the above Java into the source code for the webpart and save it. Now put a list webpart on that page, any list will do as long as you have a field where you can see the entire path. Hovering over that path with the mouse should show the document pop-up.
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: PDF Document Preview Pop-up
Hi,
Thanks for the additional info - however I am afraid the only way we are going to be able to commit the time to investigate this fully at this moment is of you provide us with a link to a suitable test page with instructions on use.
Every day we receive reports and requests for help that require some degree of project creation on our part and if we invested the time to recreate every example our entire development team would be working on such matters - rather than progressing the development of our products and supporting clients generally - this is especially critical at the moment as we are fully committed to preparing our new V3/V5 products and are under considerable pressure from all quarters to get this completed.
So if you could help us to help you - by providing the test example - we will set some time aside as soon as possible to investigate and try and resolve.
Thank you in anticipation of your cooperation ...
Thanks for the additional info - however I am afraid the only way we are going to be able to commit the time to investigate this fully at this moment is of you provide us with a link to a suitable test page with instructions on use.
Every day we receive reports and requests for help that require some degree of project creation on our part and if we invested the time to recreate every example our entire development team would be working on such matters - rather than progressing the development of our products and supporting clients generally - this is especially critical at the moment as we are fully committed to preparing our new V3/V5 products and are under considerable pressure from all quarters to get this completed.
So if you could help us to help you - by providing the test example - we will set some time aside as soon as possible to investigate and try and resolve.
Thank you in anticipation of your cooperation ...
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