Select to view content in your preferred language

Custom brochure printing Python

7084
26
Jump to solution
06-05-2015 07:03 PM
AicamLaacouri
Deactivated User

Hi everyone- I have an idea and I am just starting to learn Python so I would like to know if my idea can be executed using Python... So I have a polygon shapefile with 1000 polygons. Each polygon is a field/farm, the attribute table has the name of the owner and his/her address. I also happen to have a raster image that cover the same geography (satellite image). I want to print a brochure/newsletter to send it to these clients. In the front page of the brochure I will have texts and the address of the client (for postage). In the back, I want to print the clipped raster using the polygon for each field (each client has one corresponding polygon) as the clipping extent. Can I make a Python script that will my client specific brochures, so that the front of the brochure has the name and address of the client, and the back of the brochure has an image of the field (from the satellite raster image).  I want to spend time and learn about this idea but I thought to ask first if such a task is possible using python/arcmap. Thanks. Esam

0 Kudos
26 Replies
DarrenWiens2
MVP Honored Contributor

Personally, I like Sephe's suggestion of keeping everything in one mxd, but here is an alternative using two mxds and a Python script, that would also suit your needs.

AicamLaacouri
Deactivated User

Yes I have tried the two mxd projects and it worked the best especially after combining the two pdfs...

Thanks

0 Kudos
AicamLaacouri
Deactivated User

Thanks Sephe. Would this apply also to one sheet (face and back) brochure. It is not folded

0 Kudos
SepheFox
Deactivated User

Well that kind of depends how your getting it printed. If at a print shop, I would ask the printer how they prefer your file to be laid out.

AicamLaacouri
Deactivated User

Thanks Sephe for the suggestion. I have tried your method for making a page the size of the entire brochure (back and face). It worked well. However, when I talked to the printing service, they asked for the front and back of the one page brochure to be in separate pdf files...

Thanks

SepheFox
Deactivated User

Great! It's always best to get the exact specs form the printer. Happy designing to you! Do you mind marking your question as answered, if that is the case. Thank you!

DanPatterson_Retired
MVP Emeritus

For future reference

What are data driven pages    6 sections

Creating a map book           19 sections

Exporting data driven pages 

Arcpy general reference        lots of sections

Arcpy's mapping module      a good read

AicamLaacouri
Deactivated User

It was a good read indeed:)

0 Kudos
IanMurray
Honored Contributor

Just adding my own two cents to this. 

I do this sort of work fairly regularly, but instead of using DDP, I just have several map templates which already have the polygon feature, make a feature layer based on each ID number zoom to extent then change text elements based on attribute fields and export to PDF.  It loops through each row with a cursor and exports out each map to pdf.  Haven't tried with DDP, but might look into it in the future.

AicamLaacouri
Deactivated User

Hi guys

This is a related question: so using one of the solutions above (either DDP, layout with guides/dynamic labels or Ian's solution), you will get a PDF for each polygon based on the shapefile. Now, would the PDF display an image background or just the plain polygon?

Ian: Thanks for the explanation. So do you use python at all in doing this task? I have not worked with templates before.

Thanks

0 Kudos