( I asked this same question on ArcGIS forums, with no response...I hope someone here can help!)
I am using ArcView, ArcServer 10.0 and the JS API v3.1 (so no print function) ... I have an app where the user chooses parameters from a few dropdown menus, and a print-friendly map page opens in a new tab. From this page, the user can click a 'print' button, which uses window.print() to open the browser's print dialog. I have a print.css page, which is working well with my 'normal' divs, text and images. I have this tag in my HTML:
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
My problem is that I cannot seem to reset the size of the Dojo map object. The map in my printed page (or PDF, if I choose CutePDF) is the same size as whatever the size was in the print-friendly page. I would like my print.css to hard define the printed version / PDF as an exact height and width, regardless of the window size in the print-friendly page. I cannot define the size of page to be printed in the print-friendly page, b/c for one, my client would like to pan and zoom the map after the print-friendly page is generated. I have no problem setting the size of the other elements in my print.css rules (text box, hard coded legend with images)...but any rules I try to set for the map itself in my print.css page are ignored.
I tried using 'exportMapImage', thinking that maybe I could make an image of the map and its contents, but this loses the basemap which I need, and also I do not want the user to open yet another page or tab. (I am having the same problem with my scalebar, but I this isn't so important for this project).
My goal is to create a PDF or printed page that is the same size no matter what the screen size or current window size., and I have it working except for the map itself.
Any ideas? I hope I explained my problem clearly. Thanks , J
Also, I am hoping to find a client-side solution; I don't have much experience with server-side programming. If this can't happen, please let me know any server-side ideas, thanks!)