Select to view content in your preferred language

Printing map using PrintAndExport not working in SOE

1679
3
08-31-2012 09:04 AM
by Anonymous User
Not applicable
Hi,

It works fine when I use it in ArcEngine standalone application. But it didn't work in SOE using the same code.

1. Creating a IPaper (PaperClass()) takes more than 2 minutes!
2. Enumerating IPaper.Forms takes minutes!
3. IPrintAndExport.Print() throws an exception:
System.Runtime.InteropServices.COMException (0x8004030E): Exception from HRESULT: 0x8004030E
   at ESRI.ArcGIS.Carto.PrintAndExportClass.Print(IActiveView pActiveView, IPrinter pPrinter, IPage pPage, Int32 PageID, Int32 resRatio, ITrackCancel pTrackCancel)

I using IPrintAndExport for exporting PDF file in SOE works great.

Any suggestions or comments are welcome and greatly appreciated.

Thanks!
Tags (2)
0 Kudos
3 Replies
by Anonymous User
Not applicable
I was thinking it might be some problem of accessing the printer. Then I tried to publish a GPService using arcpy.mapping.PrintMap. This time I got print driver error:

AttributeError: Driver based print functionality not supported on ArcGIS Server. Failed to execute (PrintMap). Failed to execute (PrintMap).

I searched and found the reason here: http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000037000000.

Then, how i can print a map in SOE? Using ActiveView.Output instead of PrintAndExport?

Thanks
0 Kudos
TanuHoque
Esri Regular Contributor
did you consider the Printing Service, new at 10.1, to get your map in PDF format?
http://resources.arcgis.com/en/help/main/10.1/index.html#/Printing_in_web_applications/0154000004w50...
0 Kudos
by Anonymous User
Not applicable
did you consider the Printing Service, new at 10.1, to get your map in PDF format?
http://resources.arcgis.com/en/help/main/10.1/index.html#/Printing_in_web_applications/0154000004w50...


Thanks for your reply.

Actually, I don't think I can use the printing service because I will create a new mxd in my SOE and print it. Printing service needs a web map to print.

Another thing is I found the export functionality only exports the map frame instead of the whole page of the layout. Thus the result is in correct, it even doesn't export the map frame boundary. Is there any solution for this?

Thanks,
0 Kudos