iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Tags
shrink html

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2009, 02:13 AM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default How to display an html page within another html page, but "shrunk"?

Hi, all...

I have a client with a C# utility web page which lists TIF documents for a customer. Upon click of a document, they would like the actual TIF document displayed on the corner of the page, but via an external TIF viewer--which is html-based. Their content services system is proprietary and so is the TIF image viewer.

I've implemented an iFrame within the utility page, but the 2x2 area shows the external TIF viewer in full-size mode. Basically, the upper-left of a normal sized web page is displayed. I tried using the "style=zoom:25%" attribute but the iframe window is shrunk to 25% of the original 2x2 area.

How can I display the external page within a window, but "shrunk"?

They don't have the capability of snagging each TIF image and creating physical thumbnails.

Hope you can help.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 08-20-2009, 04:21 AM
DaveSawers's Avatar
WebProWorld Veteran
 
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 492
DaveSawers RepRank 3DaveSawers RepRank 3
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by getmea View Post
They don't have the capability of snagging each TIF image and creating physical thumbnails.
What does this mean?

Surely, if you can view the picture, you can get hold of it and create a thumbnail. Save the thumbnail as .jpg and display it in the browser any size you want. No proprietary image viewer required.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #3 (permalink)  
Old 08-20-2009, 06:17 AM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: How to display an html page within another html page, but "shrunk"?

Let me get this clear. You're not displaying tifs (directly), you're trying to just display a (shrunken) html page, which is the tif image viewer, in an iFrame? Is this correct?
Reply With Quote
  #4 (permalink)  
Old 08-20-2009, 12:30 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Dave, Uncle Dog:

Let me try to explain...

Web page #1 is a (home grown) C# program which administers customer information. It lists customer information as well as a list of all documents (in TIF format) which were faxed-in by the customer or scanned-in via snail mail by the mail room clerks. If a user clicks on any one document name, web page #2 opens up in a new window.

Web page #2 is a Java program which grabs the TIF document from the oracle content services repository and displays it in full page mode. This program displays and allows editing of the TIF image.

Instead of opening a new window, the client would like program #2 displayed within program #1 in the lower right-hand corner as a pseudo-thumbnail. Program #2 is configurable; it allows tool bars, menu bars, etc., to be turned off.

The reason why we are attempting this is because #2 contains proprietary code tied to the Oracle Content system. The images cannot (and should not) be replicated into thumbnail files due to PII (personal and Identifiable Information)--this came from the Legal department. This program also contains the code necessary to achieve the retrieval, security checks, etc...stuff which I wouldn't want to replicate efforts. On the other hand, we have the .jar files but no program documentation.

So, in my attempt to accomplish this, I inserted an Iframe into program #1 and set the src as the original, fully qualified url to #2. It works, but the 220x270 frame displays the web page in its normal size. We'd like it to be displayed as a pseudo-thumbnail (shrunk). I attempted the "style=zoom:25%" iframe property but it shrinks the window from 220x270 to 55x65 -- keeping the window contents same (full) size.

Phew!

Any thoughts?
Reply With Quote
  #5 (permalink)  
Old 08-20-2009, 12:31 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by Uncle Dog View Post
Let me get this clear. You're not displaying tifs (directly), you're trying to just display a (shrunken) html page, which is the tif image viewer, in an iFrame? Is this correct?
Correct...please see my other post.

John
Reply With Quote
  #6 (permalink)  
Old 08-20-2009, 12:32 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by DaveSawers View Post
What does this mean?

Surely, if you can view the picture, you can get hold of it and create a thumbnail. Save the thumbnail as .jpg and display it in the browser any size you want. No proprietary image viewer required.

As per the client's Legal department we cannot replicate any image whatsoever...even if we delete it after use.

Please see my other post.

John
Reply With Quote
  #7 (permalink)  
Old 08-20-2009, 12:53 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: How to display an html page within another html page, but "shrunk"?

The problem you've got, and a common misconception of iFrames, is along the lines of - if you look at an elephant through a keyhole it doesn't make the elephant any smaller. An iframe is a window (or keyhole) and not a picture frame.

The way to get the document to appear smaller is to alter its style, but it won't compress neatly. However, if the squished document still shows the tif (squished up by the browser attempting to render the style applied) you'd still be able to access the image and view it full size.
Reply With Quote
  #8 (permalink)  
Old 08-20-2009, 02:40 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,657
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: How to display an html page within another html page, but "shrunk"?

Why not simply embed the TIFF-viewer into page#1 instead of having an Iframe to the page that currently embeds the viewer, and pass it a size parameter to have it display the TIFF file at reduced size?
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #9 (permalink)  
Old 08-20-2009, 03:10 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by Uncle Dog View Post
The problem you've got, and a common misconception of iFrames, is along the lines of - if you look at an elephant through a keyhole it doesn't make the elephant any smaller. An iframe is a window (or keyhole) and not a picture frame.

The way to get the document to appear smaller is to alter its style, but it won't compress neatly. However, if the squished document still shows the tif (squished up by the browser attempting to render the style applied) you'd still be able to access the image and view it full size.
Thanks, U.D....I will look into this
Reply With Quote
  #10 (permalink)  
Old 08-20-2009, 03:15 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by wige View Post
Why not simply embed the TIFF-viewer into page#1 instead of having an Iframe to the page that currently embeds the viewer, and pass it a size parameter to have it display the TIFF file at reduced size?
Thanks, Dave:

I'm not exactly sure if one can embed JSP/html code into a ASP/html file. But we'll give it a try.

Our last option would be a total rewrite (convert java code to C# or vice verse). We're avoiding this like the plague.

John
Reply With Quote
  #11 (permalink)  
Old 08-20-2009, 03:42 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,657
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: How to display an html page within another html page, but "shrunk"?

You should be able to embed the code - The inclusion of the viewer app is done by the browser, so you would just add the html code to accomplish that. The issue I see is the same thing as what Uncle Dog mentioned above - even if it were possible to "zoom out" the contents of the Iframe, your viewing app, which operates in a sandbox, is not going to honor that, and still show the file at normal size. The change needs to be made in the viewer itself (or the parameters you pass to the viewer) not the Iframe or the calling page.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #12 (permalink)  
Old 08-20-2009, 06:09 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: How to display an html page within another html page, but "shrunk"?

If the fact that #2 contains proprietary code tied to the Oracle Content system is the only reason you want to include it in #1 then go ahead and include it... just don't bother to display it.
Reply With Quote
  #13 (permalink)  
Old 08-20-2009, 06:39 PM
WebProWorld Member
 
Join Date: Feb 2005
Location: Albuquerque, NM
Posts: 48
wpriley RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

I'd suggest contacting the developer of the Showcase Firefox browser add-on (https://addons.mozilla.org/en-US/firefox/addon/1810). The Showcase add-on handles multiple real-time web page-to-thumbnail conversions at lightning speed. Thumbnails are rendered in a number of sizes and are very clear and crisp. Perhaps they would share or license the technology they used or developed for this add-on. The Firefox site reports the developer to be Josep del Rio who can be E-mailed at josep.rio@uworks.net.

I hope this helps.
__________________
Pat Riley
Reply With Quote
  #14 (permalink)  
Old 08-20-2009, 06:53 PM
WebProWorld New Member
 
Join Date: Sep 2003
Location: Florida
Posts: 20
Kevnn RepRank 0
Default Re: How to display an html page within another html page, but "shrunk"?

If your tiff viewer program allows edits, then why would you want to use that to display a thumbnail sized image. I'd bypass that altogether and display the actual image and adjust it's size using code for the display. If the size of the doc is 800x600 and you only want 300x200 max then divide the height and width by 3 and display that doc at 267x67. Or something to that efffect. Your doc would be downloadable which may be a security thing for you, but it would not be editable that way. With some simple javascipt you can keep them from clicking on it at least. It would look to the end user like a thumbnail. But I'm not sure if it would download as a thumbnail to your temp internet files. If it does, then that is likely ok for your security because making it that much smaller will make it unreadable for the most part. But it will look like a small copy anyway.
Reply With Quote
  #15 (permalink)  
Old 08-20-2009, 08:21 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by wpriley View Post
I'd suggest contacting the developer of the Showcase Firefox browser add-on (https://addons.mozilla.org/en-US/firefox/addon/1810). The Showcase add-on handles multiple real-time web page-to-thumbnail conversions at lightning speed. Thumbnails are rendered in a number of sizes and are very clear and crisp. Perhaps they would share or license the technology they used or developed for this add-on. The Firefox site reports the developer to be Josep del Rio who can be E-mailed at josep.rio@uworks.net.

I hope this helps.

Hi. Pat:

Thanks for the tip...

Unfortunately FF is not Enterprise "approved" software at my client's office. It's IE or nothing. We are talking about a Fortune 100 company here...

Thanks again...
John
Reply With Quote
  #16 (permalink)  
Old 08-20-2009, 08:25 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: How to display an html page within another html page, but "shrunk"?

getmea - why does your client need to see the thumbnailed doc?
Reply With Quote
  #17 (permalink)  
Old 08-20-2009, 08:30 PM
WebProWorld Member
 
Join Date: Feb 2005
Location: Albuquerque, NM
Posts: 48
wpriley RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

John, I wasn't suggesting that you use this add-on itself but contact the developer to see what underlying technology was utilized and, if appropriate, incorporate that technology into your ultimate solution. There is likely no techniques used in the Showcase add-on that would preclude it from running in IE or other major browsers.

If nothing else, I'd suggest you look at Showcase as a reference point as it performs very well.

As an alternative suggestion, install ImageMagick (http://www.imagemagick.org/) on your server. ImageMagick is a multifunction graphic processing utility that, among many other options, could convert and resize your TIFFs into appropriately sized JPEG or PNG thumbnails that could display without a tiff viewer. ImageMagick is free open source code with multiple programming interfaces available to allow it's integration into most Web based applications. These interfaces include: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), NMagick (Neko/haXe), MagickNet (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK).

I hope this helps.
__________________
Pat Riley

Last edited by wpriley; 08-20-2009 at 08:43 PM.
Reply With Quote
  #18 (permalink)  
Old 08-20-2009, 09:51 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by Uncle Dog View Post
If the fact that #2 contains proprietary code tied to the Oracle Content system is the only reason you want to include it in #1 then go ahead and include it... just don't bother to display it.
UD:

A little more background...

The client recently switched CS vendors and are now trying to retrofit new applications into existing admin systems. Program #1 worked well with the old viewer (old viewer relied on rendering into an applet frame; new one is not built for it.) Because it is existing functionality, the Client and users want the old functionality.

RE: proprietary code: the viewer contains all the logic to check authorized users, the logic to retrieve the image/document from repository; editing logic, etc.

see more below.

John
Reply With Quote
  #19 (permalink)  
Old 08-20-2009, 09:54 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by wige View Post
You should be able to embed the code - The inclusion of the viewer app is done by the browser, so you would just add the html code to accomplish that. The issue I see is the same thing as what Uncle Dog mentioned above - even if it were possible to "zoom out" the contents of the Iframe, your viewing app, which operates in a sandbox, is not going to honor that, and still show the file at normal size. The change needs to be made in the viewer itself (or the parameters you pass to the viewer) not the Iframe or the calling page.
We have a conference call with the vendor on Friday to gain more insight into its capabilities or, at the very least, custom code possibilities.
Reply With Quote
  #20 (permalink)  
Old 08-20-2009, 10:01 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by Uncle Dog View Post
getmea - why does your client need to see the thumbnailed doc?
UD: the existing admin system's main functionality is to prepare trailing documents for printing (to the customer). Some of the user's responsibilities are to ensure each document is in portrait mode, have the ability to reorder pages if necessary, ensure quality control (not include blank pages), etc. A thumbnail provides a quick snapshot of the image; if they need to correct any image, only then will they launch the viewer in full-size mode.

John
Reply With Quote
  #21 (permalink)  
Old 08-20-2009, 10:01 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by wpriley View Post
John, I wasn't suggesting that you use this add-on itself but contact the developer to see what underlying technology was utilized and, if appropriate, incorporate that technology into your ultimate solution. There is likely no techniques used in the Showcase add-on that would preclude it from running in IE or other major browsers.

If nothing else, I'd suggest you look at Showcase as a reference point as it performs very well.

As an alternative suggestion, install ImageMagick (http://www.imagemagick.org/) on your server. ImageMagick is a multifunction graphic processing utility that, among many other options, could convert and resize your TIFFs into appropriately sized JPEG or PNG thumbnails that could display without a tiff viewer. ImageMagick is free open source code with multiple programming interfaces available to allow it's integration into most Web based applications. These interfaces include: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), NMagick (Neko/haXe), MagickNet (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK).

I hope this helps.
Sorry, I misunderstood.
Reply With Quote
  #22 (permalink)  
Old 08-20-2009, 10:06 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Quote:
Originally Posted by Kevnn View Post
If your tiff viewer program allows edits, then why would you want to use that to display a thumbnail sized image. I'd bypass that altogether and display the actual image and adjust it's size using code for the display.
Kevnn:

We thought about writing our own viewer, but the original programming costs (provided by team systems analysts) included replacing the viewer, not embedding business and technical requirements into the programming task.

John
Reply With Quote
  #23 (permalink)  
Old 08-23-2009, 04:59 PM
WebProWorld Pro
 
Join Date: Aug 2006
Location: Cary, Illinois
Posts: 265
getmea RepRank 1
Default Re: How to display an html page within another html page, but "shrunk"?

Thanks all for your helpful tips. Here is the status of our issue:

1) Met with the vendor; they want big bucks to make changes
2) Will meet with the business and give them 3 options:
a) Instead of the thumbnail, give the users a full blown page. This was already tested.
b) Invest a lot of time/effort to give the users a thumbnail; dates will be pushed back one month.
c) No thumbnail; no full blown page.

Early indications are the users will accept option a).

Thanks again for your support.

John
Reply With Quote
  #24 (permalink)  
Old 08-23-2009, 07:34 PM
Peopleunit's Avatar
WebProWorld Member
 
Join Date: Jul 2006
Posts: 54
Peopleunit RepRank 0
Default Re: How to display an html page within another html page, but "shrunk"?

I don't know if this will fit the bill for your needs or not. That and I'm not intimately familiar with this company's service (I just happened across their website earlier today) but it looks like it could be useful for some.

Thumbshots.com - "Today's Web users demand more visual information. Thumbshots enhance your site by giving your users the ability to preview links instantly."


Last edited by Peopleunit; 08-23-2009 at 07:40 PM.
Reply With Quote
  #25 (permalink)  
Old 09-01-2009, 01:03 AM
WebProWorld New Member
 
Join Date: Sep 2009
Posts: 1
ddolata RepRank 0
Default Re: How to display an html page within another html page, but "shrunk"?

I have a solution for you but being a new user it will not let me paste the code. You may contact me directly. use style zoom while keeping the original box size intact, works also with pdf pages and html with everything shrunk intact including images although I specifically didn't test tiff images. If I can explain without it seeing commands you just need to include an oversized height and width command just before the style zoom command, which would be just before the src.

I hope this gets through.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you redirect a URL with "%0A" splitting up the .html extension? (.htm%0Al) Clint1 IT Discussion Forum 29 09-08-2009 02:27 AM
How to Redirect the html/index.html page to .com page? tushar123 Search Engine Optimization Forum 6 07-30-2008 06:43 AM
Home page Dynamic Vs Html static page Steven1976a Search Engine Optimization Forum 4 05-27-2007 07:10 PM
html formmail "replyto" .. cronic Graphics & Design Discussion Forum 3 05-24-2005 06:49 PM
Rumour-or-Proof | Naming a page "Links" will " ~0 Google Discussion Forum 6 10-04-2004 06:48 AM


All times are GMT -4. The time now is 10:19 PM.



Search Engine Optimization by vBSEO 3.3.0