PrintTask with PNG and SVG

1573
5
08-29-2014 11:06 AM
WesleyAntal2
New Contributor III

I have a app in javascript API that use the printtask and service "Export Web Map". In app I'm try print out, the service work normally, but in PDF not show images in SVG, just PNG. Do I have any configuration?

Thanks.

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Wesley,

   Are you saying that you are receiving the SVG output back for the print task and it is rendered by the browser as blank?

0 Kudos
WesleyAntal2
New Contributor III

I put a attachment the screen of app and the result in PDF now to e.g.

You can see in image 2, I've the pins that symbology points. But in image 1 (PDF) not show the pins.

IMAGE 1

Screen Shot 08-29-14 at 04.14 PM.PNG

IMAGE 2

test.png

0 Kudos
by Anonymous User
Not applicable

Did you try creatign a picture marker symbol and include a full path URL to the SVG image?  Or are you creating your SVG images using CSS having set the styling and surfacetype properties?

0 Kudos
WesleyAntal2
New Contributor III

SVG image was created in instance of SimpleMarkerSymbol this screen. I too try a test with SVG images using CSS, but give me identical problem

0 Kudos
by Anonymous User
Not applicable

Hi Wesley, SimpleMarkerSymbol SVG images should print.

To keep things easy I recommend using a full URL to your SVG image (not a relative path).  Relative paths actually will draw on the map, but will not print.  Also since printing is what you are trying to accomplish, make sure that the URL to your SVG is publicly accessible.  This is important because your print service will need to fetch the image.

I imagine your print service is trying to resolve your SVG image, but cannot.

I've posted some code here to help.

  SVG Map Symbol Print

Let me know if this solves your issue.

-Doug

0 Kudos