PDFWidget for 2.1

1395
19
10-20-2010 10:13 AM
by Anonymous User
Not applicable
Original User: philipp37

BrianO had created a PDFWidget for 1.3 (http://forums.arcgis.com/threads/12142-FSV-1.3-My-version-of-PDF-Widget-using-AlivePDF?highlight=pri...).

I have ported this to 2.1.  I have commented out the portrait orientation option since the map image does not yet scale properly.  That leaves landscape by default and it too is getting cut-off (see attached) on the bottom - so if anyone knows how to scale this properly please respond here!

I was receiving an 'Alpha channel not supported for now' error - you need to replace the logo.jpg (referenced on line 99 of the mxml) with your logo that has no alpha channel (I got mine to work by exporting the logo from photoshop....) - not sure what is going on here exactly.
0 Kudos
19 Replies
SandeepTalasila
New Contributor III
Philipp,

I have downloaded the source code for PDF Widget and incorporated the AlivePDF.swc to libs. The widget is implemented error free, but does not proceed further after I click on the "Generate PDF" button.

Could you post the latest widget source code?

nshaukat


Hey Nadeem,
Did you ever get this to work? I am having the same problem with the widget, it is not doing anything, when i click on Generate PDF. Thanks.
0 Kudos
by Anonymous User
Not applicable
Original User: philipp37

with the addition of this import statement:

import com.esri.viewer.ViewerContainer;

and changing this line (line 296):

landPDF.addImage(map,rsLand,2,35,0,0,0,1,false,ImageFormat.PNG,100,Blend.NORMAL,null);

to this:

landPDF.addImage(ViewerContainer.getInstance(),rsLand,2,35,0,0,0,1,false,ImageFormat.PNG,100,Blend.NORMAL,null);

it is possible to print everything that is visible on your map (ie, open widgets, legend, scalebar, navigation control and header). What I would like to do is to remove the header and navigation widgets from the resulting pdf....anyone have any ideas? Also, while I'm on the topic it would also be nice to see a north arrow in there....I guess that could be done now using the StaticImageWidget.....

Thanks!
0 Kudos
NadeemShaukat
New Contributor II
Hey Nadeem,
Did you ever get this to work? I am having the same problem with the widget, it is not doing anything, when i click on Generate PDF. Thanks.


tsandeep

I have figured out that if you take out the Logo's Image Bindable and ImageStream lines that are there in the mxml to show logo, the widget functionality proceeds and creates a PDF. Try it.

Nadeem
0 Kudos
by Anonymous User
Not applicable
Original User: lissajo64

I am trying to implement this widget for my site. So far it works well. 

I wonder if since there isn't really a way to see a progress bar to show when it is done generating the pdf, would there possibly be a way to make it open when it is finished?  Any ideas would be greatly appreciated.
Thanks!
Melissa
0 Kudos
philippschnetzer
Occasional Contributor III
I think I have asked this before - but will try again....

I have this PDFwidget working so that all open widgets, navigation controls, scalebar and header get inserted on the map.  I had to do this so that you could have the Dynamic Legend widget open and have it appear on the map.  The drawback is that all other open widgets get included as well - including the actual PDFwidget! 

It would be ideal to be able to remove the header and navigation widget and be able to choose which widgets to include.  This is probably a tall order....and I am not sure how to go about this...

Thanks for any input!
0 Kudos
by Anonymous User
Not applicable
Original User: lallen4585

Ahhh, seeing a dynamic legend printed on the map, now that would be good!  Takes me back to the good ol' days.
0 Kudos
MelonyBarrett
New Contributor III
This is a print sample that Mark H put together. I find it to be a very nice utility for trimming the map to get the print size correct. There are a few different pieces to get this to work but I would recommend downloading it and looking at the code to see how he trims the map. I use some of this code on my site and it has been very helpful for sizing the map correctly. Technically you don't need all of the pieces and you can just call his PrintMapUtil.as to return your map as a bitmap.


http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=16778


thejones23,

Could you elaborate on how to use the PrintMapUtil.as in conjunction with AlivePDF?  I'm already using the print sample you're talking about, but using it for the PDF is a bit beyond my understanding, especially since I'm really new to AlivePDF.
0 Kudos
by Anonymous User
Not applicable
Original User: nathanenge

I'm having sandbox violations when I attempt to export if I have WMS in my operational layers that have skipgetcapabilities="true"

does this export to pdf support WMS?
0 Kudos
DasaPaddock
Esri Regular Contributor
I'm having sandbox violations when I attempt to export if I have WMS in my operational layers that have skipgetcapabilities="true"

does this export to pdf support WMS?


The general problem is that Flash does not let you take a snapshot of a image (access its bitmap data) if it's loaded from another domain and the domain doesn't have a permissive crossdomain.xml file. You can work around this by using a proxy.
0 Kudos
by Anonymous User
Not applicable
Original User: nathanenge

dasa
I am not entirely sure how to deal with proxy pages. this is not my area of expertise.
I have IIS on win7 and .net framework vers 2.0
I have downloaded the proxy pages for .net from here: http://help.arcgis.com/en/webapi/flex/help/index.html#/Using_the_proxy_page/017p0000000v000000/

and am trying to follow the instructions there. but is a bit convoluted. I need to create a new directory in IIS to put my proxy pages in, then convert to app? or does it mean the web app for flex viewer that I have running, that is referencing WMS from another server?
0 Kudos