+ Reply to Thread
Results 1 to 7 of 7

Thread: Print/Export map

  1. #1
    Miri Revivo
    Join Date
    Nov 2009
    Posts
    37
    Points
    14
    Answers Provided
    3


    0

    Default Print/Export map

    Hi,

    Is there any way to print or export the contents of a map in ArcGIS Runtime?

    Thanks,
    Miri Revivo.

  2. #2
    Mike Branscomb

    Join Date
    Feb 2010
    Posts
    882
    Points
    359
    Answers Provided
    59


    0

    Default Re: Print/Export map

    Hi,

    We're currently working on a print capability and hope to have this ready by the next beta later in the year.

    Cheers

    Mike
    ArcGIS Runtime Product Engineer

  3. #3
    Miri Revivo
    Join Date
    Nov 2009
    Posts
    37
    Points
    14
    Answers Provided
    3


    0

    Default Re: Print/Export map

    Hi Mike,

    Thank you for your reply. this is good news.

  4. #4
    Art Ullman
    Join Date
    Mar 2010
    Posts
    54
    Points
    1
    Answers Provided
    0


    0

    Default Re: Print/Export map

    Could we use the ArcPY in a geoprocessing service to create a PDF?

  5. #5
    Bjorn Kuiper
    Join Date
    Oct 2010
    Posts
    270
    Points
    25
    Answers Provided
    6


    0

    Default Re: Print/Export map

    Hi,

    while you are waiting for Esri you can use the Telerik controls.

    I use the Telerik controls to print ArcGIS maps.

    I convert them to an Image using WriteableBitmap and then print them with the PdfFormatProvider.

    here is a code example:

    Code:
                // convert to image because of problems with graphicslayers not showing up
                // correctly (in lefttop corner instead on the correct location of the map) when writing to pdf
                WriteableBitmap wb = new WriteableBitmap(this.yourUIElement, new ScaleTransform() { ScaleX = 1, ScaleY = 1 });
    
                Image image = new Image();
                image.Height = 64;
                image.Margin = new Thickness(10);
                image.Source = wb;
    
                // make raddocument
                Section section = new Section();
                Paragraph paragraph = new Paragraph();
                InlineUIContainer container = new InlineUIContainer();
                container.UiElement = image;
                container.Width = 750;
                container.Height = 1000;
    
                paragraph.Inlines.Add(container);
                section.Blocks.Add(paragraph);
    
                RadDocument document = new RadDocument();
                document.DefaultPageLayoutSettings = new PageLayoutSettings(PaperTypes.Letter);
                document.PageViewMargin = new SizeF(0.0f, 0.0f);
                document.ParagraphDefaultSpacingBefore = 0;
                document.ParagraphDefaultSpacingAfter = 0;
    
                // use padding to center, perhaps find a more appropriate way to do this in the future.
                document.SectionDefaultPageMargin = new Telerik.Windows.Documents.Layout.Padding(32, 25, 0, 0);
                document.Children.Add(section);
    
                PdfFormatProvider provider = new PdfFormatProvider();
    
                string extension = "pdf";
    
                SaveFileDialog dialog = new SaveFileDialog()
                {
                    DefaultExt = extension,
                    Filter = String.Format("{1} file (*.{0})|*.{0}|All files (*.*)|*.*", extension, "PDF"),
                    FilterIndex = 1
                };
    
                bool? dialogResult = dialog.ShowDialog();
                if (dialogResult == true)
                {
                    using (Stream output = dialog.OpenFile())
                    {
                        provider.Export(document, output);
                        provider.ExportSettings = new PdfExportSettings() { InlineUIContainersExportMode = 0 };
                    }
                }

  6. #6
    Tom Sanderson
    Join Date
    Jul 2010
    Posts
    2
    Points
    0
    Answers Provided
    0


    0

    Default Re: Print/Export map

    G'Day Mike

    I haven't found the print capacity in Beta 2 of runtime. Will this be available earlier next year? and will it be able to print to A1 in size?

    Cheers

    Tom

  7. #7
    Mike Branscomb

    Join Date
    Feb 2010
    Posts
    882
    Points
    359
    Answers Provided
    59


    0

    Default Re: Print/Export map

    Hi,

    Unfortunately, we didn't manage to include any specific printing support in the API in Beta 2. You might want to take a look at this SL/WPF sample from Dominique Broux: http://www.arcgis.com/home/item.html...4358d0458f66e3.

    Cheers

    Mike
    ArcGIS Runtime Product Engineer

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts