Select to view content in your preferred language

Parks Finder - Print Functionality?

2406
17
08-15-2012 06:00 AM
CraigMcDade
Deactivated User
Looking to add printing capabilities to the Parks Finder Web application. Specifically, a printout that shows the map as well as the directions and amenities information in the left tab panel.

Looking through the API it looks like the PrintTask is the most likely solution. Am I on the right track? I can't seem to find any samples that show how the PrintTask works together.
0 Kudos
17 Replies
derekswingley1
Deactivated User
Is the print widget being created in your app? Have you confirmed that the code to create the print widget is running? The easiest way to do this is to put a console.log() or alert() after you call startup() on the print widget.
0 Kudos
CraigMcDade
Deactivated User
Well the code I inserted does not seem to run. I placed it at the end just before
}
        dojo.addOnLoad(Init);
0 Kudos
derekswingley1
Deactivated User
Well the code I inserted does not seem to run. I placed it at the end just before
}
        dojo.addOnLoad(Init);


It feels like we're not making much progress. Can you post a complete, simplified page that illustrates what you're trying to do?
0 Kudos
AlanToms
Regular Contributor
Hello Derek,

Thank you for the help, it is appreciated.

We are working to implement the Park and Recreation Finder template provided by Esri.  We would like to extend the functionality to include an option to print a page that shows a map and the driving directions.  Very similar to what Google Maps does.

The first question is, is the advice you have provided so far the correct way to implement the end product?

Thank you
Alan
0 Kudos
derekswingley1
Deactivated User

The first question is, is the advice you have provided so far the correct way to implement the end product?


The print functionality included in the API should be used to generate the map portion of your output. Once you have that, it'll be up to you to embed the image output alongside directions in a page that will print correctly using the browser's print function.
0 Kudos
sumanikunada
Emerging Contributor
Trying to export map to PDF using ArcGIS Server 10.1/Javascript API using the service Utilities/Printing Tools/Export Web Map Task

Is there a way to print query results attributes in a table along with the map using this service?

Thanks.
0 Kudos
VinayBansal
Frequent Contributor
You can add a dynamic text element to map template and fill that with the directions string.

But I would recommend that you go with custom PDF.
1. Generate the image of current map view.
2. Create PDF using iTextSharp.
3. Add image on first page.
4. Add directions on second page.

You can create a multi-page PDF using iTextSharp.


Regards,
Vinay Bansal
0 Kudos
sumanikunada
Emerging Contributor
Thanks for the reply!

I was trying to accomplish the functionality using ESRI printing map service without having to use the third party reporting libraries.
I'll go with the suggested.
Thanks again.
0 Kudos