Más sobre imprimir desde ActiveX

Más sobre imprimir desde ActiveX

Postby Rafael Clemente » Sun Jan 28, 2007 12:19 pm

Estoy utilizando el siguiente código para presentar una página Html en una ventana para ver e imprimir un mapa de Google Maps:
Code: Select all  Expand view
DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"
DEFINE BUTTONBAR oBar OF oWnd
DEFINE BUTTON OF oBar ACTION oActivex:Do( "ExecWB", 6,1 ) // Gracias, Biel!!!)
oActiveX = TActiveX():New( oWnd, "Shell.Explorer.2" )
oWnd:oClient = oActiveX // To fill the entire window surface
oActiveX:Do("Navigate2",(CurDrive() + ":\"+CurDir()+"\MiHtml.htm"))
ACTIVATE WINDOW oWnd

Y MiHtml.html es:
Code: Select all  Expand view
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <script src="http://maps.google.com/maps?file=api&amp;v=2"
            type="text/javascript"></script>
    <script type="text/javascript">
    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(42.0, 1.0), 13);
    }
    }
    </script>
  </head>
  <body onload="load()" onunload="GUnload()">
    <div id="map" style="width: 2000px; height: 750px"></div>
  </body>
</html>


Como veis, defino la ventana de Google Maps con 2000 pixels de ancho pero, claro, no cabe en la pantalla, así que aparece una barra de scroll horizontal que permite desplazar la imagen a izquierda y derecha. Pero al imprimir, sólo se imprime la porción izquierda de la imagen (lo que cabía originalmente en pantalla).
Mi pregunta es: ¿Hay forma de imprimir la imagen COMPLETA, es decir, sus 2000 pixels de ancho aunque no se vea completa en pantalla?
Gracias

Rafael
User avatar
Rafael Clemente
 
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests