custom image on pdf from print task

1190
6
Jump to solution
06-16-2020 02:50 AM
NadirHussain
Occasional Contributor II

the below image i create from print task and it was in pdf format.Actually my manager want there should be our company logo on center above.where i place the red rectangle.it is possible to place company logo here.please help.i am using arcgis 4.15 java script api. 

0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor

Hi Nadir Hussain‌,

sorry for the delay.

did you happen to have this 'Save Image as part of document' option checked for the picture element you insert in the arcmap layout?

View solution in original post

0 Kudos
6 Replies
TanuHoque
Esri Regular Contributor

you need to publish print service with your own layout templates and you will need to author those templates with your company logo.

here is the help: Share custom layouts for printing from ArcGIS Pro—Documentation (10.7) | Documentation for ArcGIS En... 

NadirHussain
Occasional Contributor II

Dear Tanu,

below is my custom template i  publish the print service as per tuturial instruction.But still i am not getting any image on the exported pdf.

$("#exportButton").click(function () {
$(".loader").show();
var printTask = new PrintTask({
url: "my print service url"
});
printTemplate.attributionVisible = false;
printTemplate.layoutOptions.titleText = $('.file-name').val();
printTemplate.layoutOptions.authorText = $('.author-name').val();
printTemplate.layoutOptions.copyrightText = $('.notes').val();
printTemplate.outScale = $('#scaleInput').val();
var print = printTask.execute(printParams).then(printResult, printError);
print.then(function () {
mapView = {};
$("#secondaryMap").empty().hide();
});
});

the code is also there.

Please help.

0 Kudos
Noah-Sager
Esri Regular Contributor

Three things to try/consider:

1) Check the Console tab of the browser and look for errors. Perhaps the image is 404ing. Also, if you look at the Network requests of the browser, can you find the execute request for the print task? I wonder if something useful is there.

2) Is the print service public? Can you share a link to it for testing?

3) Do you have ArcGIS Pro? I would recommend trying with Pro and see if the same behavior occurs.

0 Kudos
NadirHussain
Occasional Contributor II

Dear Noah,

First of all thanks for your reply.can you give me your email id i can send my url.Actually this url i cant share in the public.so please dont mind and send me your email id in my email id.

nadir.dasti@gmail.com

Bundle of thanks.

0 Kudos
Noah-Sager
Esri Regular Contributor

Hi Nadir, I just sent you an email.

Also, for future reference, there is a way on GeoNet to send private/direct messages. If you are ever conversing with someone and want to share something non-publicly, just click on the person's profile and then click on Actions and select Send direct message, like this:

0 Kudos
TanuHoque
Esri Regular Contributor

Hi Nadir Hussain‌,

sorry for the delay.

did you happen to have this 'Save Image as part of document' option checked for the picture element you insert in the arcmap layout?

0 Kudos