ArcGIS Server » Web Applications » .Net ADF
 
 

Code Gallery

Print Layout Task / Server Object Extension for .NET Web ADF (manual install)

Updated: The previous version produced unexpected output results when using a user-specified scale.
This update uses the PageLayout object to scale the view, producing result images closer to the supplied scale.


This demo adds printing capabilities to the .Net WebADF framework. The custom task allows you to generate high-quality maps from a web browser and export maps to pdf, jpeg, ai, and other formats. Using the task, you can select the configuration of your final map product by selecting from several ArcMap preconfigured layouts; you can also change the content of text elements on the fly.
Originally developed by Ismael Chivite. Updated to support ArcGIS Server 9.3 and to accept a user-defined map scale for the output.

This is the manual-installation version of this project. Instructions are in the top-level directory as "Readme" and "Manual Installation" documents. Use this version if you are installing on a 64-bit operating system or if you otherwise have problems using the installer version.
Author markdeaton
Date Submitted 09-29-2008
Date Last Updated 01-15-2009
Language C#
Product/Version ArcGIS Server 9.3
Views 3936
Downloads 1607
License Type ESRI Attribution and License Agreement
(4 ratings)

Report Inappropriate Content: This Code Gallery is intended for the free exchange of code related to ESRI software products. Let us know if this entry is inappropriate (e.g., a download for a commercial product).

 

UpdateManager Error   posted by Tink0519 on Oct 02, 2008 9:08 AM

Is it required for wwwroot to be located at c:\inetpub\wwwroot? Or can you have it located on another drive? I recieved the following error: Finding IIS Root Folder... OK Configuring Tasks.xml file in ArcGIS Manager... Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Inetpub\wwwroot'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalGetFileDirectoryNames(String path, String user PathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, S earchOption searchOption) at System.IO.Directory.GetDirectories(String path, String searchPattern, Sear chOption searchOption) at System.IO.Directory.GetDirectories(String path) at UpdateManager.Program.findArcGISServerRoot(String IISRoot) at UpdateManager.Program.Main(String[] args)

cannot see LayoutSOE as an option when publishing mxd   posted by eklundjb on Oct 13, 2008 1:10 PM

My desktop is serving as a test machine so it is the SOM,SOC and webserver. I followed your installation instructions but don't see the checkbox for "LayoutSOE" when publishing an MXD as a service in ArcCatalog. I have 9.3 installed.

UpdateManagerError   posted by markdeaton on Oct 24, 2008 9:49 AM

Tink: That routine in UpdateManager does assume that IIS is installed on the C: drive. You can change it to look in the directory of your choice. In the UpdateManager project, open Program.cs. Find the "findIIS()" method and change the path strings there.

cannot see LayoutSOE as an option when publishing mxd   posted by markdeaton on Oct 24, 2008 9:52 AM

eklundjb: How are you publishing your service? If you're right-clicking the MXD and choosing Publish, the list of capabilities won't include server extensions such as the Print Layout Task. You need to go to your ArcGIS Server's node in ArcCatalog, then right-click and choose "Add new service...". Doing this should show a larger list of capabilities, including extensions.

Task doesn't honour the scale entered.   posted by gamreddy on Nov 11, 2008 10:56 AM

When I input 19146 as map scale in the task input window the output print has "1 inch = 5186 feet" (1:62232) as scale. I was expecting "1 inch = 1596 feet" (1:19146) as scale in the output print. Is there a way to make the scale in web form and output print same?

Installing on 2 machine setup   posted by wilsonm@apsu.edu on Nov 22, 2008 6:25 PM

I had some issues installing manually and made some notes. I have posted my notes here: http://tinyurl.com/6jmpro

Task doesn't honour the scale entered   posted by markdeaton on Nov 26, 2008 3:05 PM

In my experience, the exported image is at a slightly different scale than specified, usually within 10%. I think it may have to do with calculating the scale's extent from the map and then applying that extent to a Page Layout that has a different shape. In this case, exporting at the given scale would produce output that's missing some of the extent visible in the browser map. If you resize your browser and then export the same map at the same scale, do you get a different output?

unknown server tag 'apl:layoutsoetask'   posted by jbewley on Dec 12, 2008 1:36 PM

I was using the task succesfully until today. Any application I create without LayoutSOE enabled will not work. I am using the latest version which you mentioned addresses this issue. I did install service pack 1 for 9.3 recently. could this be the iissue? here is the error: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Unknown server tag 'apl:layoutsoetask'. Source Error: Line 132:TitleBarBackgroundImage="~/App_Themes/Blue_Bridge/images/blue-gradient-24x1.gif" /> Line 133: Line 134:

Task doesn't honour the scale entered   posted by gamreddy on Dec 18, 2008 6:34 AM

Scaling problem is occuring only with a particular template. For all other templates scaling is working perfectly fine. Thank you

Task doesn't honour the scale entered   posted by drawjim on Dec 24, 2008 6:49 AM

Gamreddy, can you elaborate on your problem with print scale being fixed by utilizing a different template? I still cannot get the scale to work. I have tried a few different templates, all the same problem. Example, enter a scale of 1200 for a 1”=100’ map output, I get a pdf map that is not even close. The scale text reads 1 inch = 155.482456 feet, which is actually correct on the map, but not the scale I desired. All the mxd’s used for the layout templates have corresponding projection and units settings (NAD 83 State Plane feet). Is there a secret to this? Otherwise, this is a great tool if I can overcome this scale obstacle.

Map Scale Issue..   posted by jvickrey79 on Apr 17, 2009 1:01 PM

Has anyone had any luck with the scaling issue?? I have seen a few people post above about this issue but haven't found anything in the forums nor here to help fix this. Please help.. Regards,

Scale issue   posted by drawjim on May 06, 2009 7:58 AM

Anyone having problems w/ scale, download the latest version. Apparently scale has been corrected. I really like this task! I do have an issue w/ pdf's coming up blank on occasion, not sure why. Restarting the affected map service helps. I wonder if it may be that I am using the same layout template mxd's across several map services. I suspect that since the first one I created seems to work quite reliably.

PDF blank issue   posted by gamreddy on May 18, 2009 10:43 AM

drawjim, This happened to me with ArcGIS 9.2. Re-installing the ArcGIS solved the problem.

Text too small in the output   posted by gamreddy on May 26, 2009 1:07 PM

If I add text(as TextElement) programatically to the map (not to the layout view) the exported output is showing the text but the size is very small. I am setting the size of the text equal to the size of the labels on a layer. The output is showing different size for the created text element when compared to the layer's labels. Does anyone has any idea what the problem is?

Slow performance   posted by tchapin on Jun 26, 2009 1:27 PM

I've implemented this server object extension successfully on one server, but on another server, it slow the entire application down to unusable speeds. Not just making the print pdf, but the initial load and map navigation are very slow. Simply removing the task from the application causes it to perform normally. So it seems the presence of the task in the task manager causes the entire application to bog down. As I've said, one server gave us no such problems. Has anyone experienced performance problems using the LayoutSOE? Ted Chapin