resize print image
Hello
Our user want to print a image and insert into document. I have to set the size in the print settings so the image can be fit in the document
?_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IRO&feoid=Body&refid=0EM600000004XrR"_/_img_
The problem is:
When user print the map, if user choose to use current extent, the scale of the printed map will change. If user choose to use current scale, the printed map only display part of the map.
Example:
current map
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IRO&feoid=Body&refid=0EM600000004XrW"_/_img_
Print image (current extent)
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IRO&feoid=Body&refid=0EM600000004Xrb"_/_img_
print image (current scale)
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906600000004IRO&feoid=Body&refid=0EM600000004Xrg"_/_img_
How to sove the problem?
Is that possible to print map in current scale and show full extension and resize the image?
Thanks
Long
0
-
Long,
You may set the output image width/height based on your report's image control size along with the map DPI which is usually 96.
For example, considiering that your .rpt (your report) has a Picture control whose size is 7 inch by 2 inch, and map_dpi - 96 to be exported, the image width and height on the 'Export Map', or 'Extract FeatureMap' activity on your workflow SHOULD set as 7 * 96 and 2 * 96.
So I recomment you can set thw three configuration values: outWidthInch, outHeightInch and DPI, which are constant values, and then use them to set Image Width and Image Height to be exported for the report's data source.
wish this helps you out.
Munhwan0 -
Thanks Munhwan,
I configured out by using C# script in workflow.
cheers
Long0 -
Long, would you be willing to share your C# script, please? I'm trying to resolve a scale issue in a report, and am thinking your code might help to lead me in the right direction.
Thanks,
Justin0 -
Hi Justin
What I do is to resize the image file. Here are the steps
1. DownloadImage
2. GetBytesFromImage
3. Use C# script to save into web site
System.Drawing.Size size = new System.Drawing.Size(450,300);
System.Drawing.Bitmap oldImage = (System.Drawing.Bitmap)System.Drawing.Bitmap.FromStream(new System.IO.MemoryStream(tempByte));
System.Drawing.Bitmap newImage = new System.Drawing.Bitmap(oldImage, size);
newImage.Save("C:\\inetpub\\wwwroot\\TempFile\\NotificationImage.jpg");
Hope it will be helpful
cheers
Long0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare