• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

.pdf embedding

http://www.sadafnazari.com/www.rsp2000.com/cosmophobia_pdf.php

The embedding pdf files are not being viewed. I have installed the plugin. But I can't see the pages.

Is my code correct.
0
sorush
Asked:
sorush
  • 4
  • 2
1 Solution
 
RobOwner (Aidellio)Commented:
I would use javascript, rather than your own markup for this

see here:

http://www.pdfobject.com/

and about half way down the page: http://blogs.adobe.com/pdfdevjunkie/web_designers_guide
<script type="text/javascript" src="scripts/pdfobject.js"></script>
<div id="pdf1" style="width:500px; height:375px;"></div>
<script type='text/javascript'>
var myPDF = new PDFObject({ 
     url: 'ConferenceGuide.pdf', 
     pdfOpenParams: { 
          view: 'Fit', 
          scrollbars: '0', 
          toolbar: '0', 
          statusbar: '0', 
          navpanes: '0' }
      }).embed('pdf1'); 
</script>

Open in new window

0
 
RobOwner (Aidellio)Commented:
in your case, something like this.


<!-- HTML -->
<div style='width: 680px; height: 800px'></div>

<script type='text/javascript'>
$(document).ready( function() {
	$('#folder').fileTree({
		root: 'ConqPDF/', 
		script: 'jqueryFileTree.php', 
		folderEvent: 'click', 
		expandSpeed: 750, 
		collapseSpeed: 750, 
		multiFolder: false 
	}, 
	function(file) { 
		var myPDF = new PDFObject({ 
			url: file, 
			pdfOpenParams: { 
				view: 'Fit', 
				scrollbars: '0', 
				toolbar: '0', 
				statusbar: '0', 
				navpanes: '0' 
			}
		}).embed('download-iframe'); 
		
		//$('#download-iframe').attr('src', file);
	});
});
</script>

Open in new window

0
 
sorushAuthor Commented:
Thanks for your help. I just need to fine tune it to get it working. I'm not sure what I'm doing wrong here at the moment.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
RobOwner (Aidellio)Commented:
you can still use your existing code just add this in
0
 
sorushAuthor Commented:
Sorry, add what in?
0
 
RobOwner (Aidellio)Commented:
I'm looking at your site now...

remove the object and embed tags

add id='download-iframe' to the DIV tag
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now