If you are using a Mac OS, you may come across a situation where you are not able to see the collection in the Pivot viewer, while you will be able to see the same collection in Windows/Linux. And this can happen in the case of both when the cxml comes from a file or it is generated dynamically using the PivotServerTools JIT collection. There can be multiple reasons for this:

  1. The website that hosts the cxml doesn’t have anonymous access on. If this is case, just switch on the anonymous access and you should see the collection now.
  2. This case is usually found to be obstacle. It comes because of an incompatibility between Mac and PivotViewer’s DeepZoom. The DeepZoom bug is reproduced on all the Mac browsers if the “source” attribute for your items in the collection’s dzc file is empty. To see if you are the victim of this, do the following:

    1. Try to navigate to your .cxml from a browser on the mac. Make sure it comes back i.e. if the URL of your collection is http://www.abc.com/collection.cxml, visit this URL and see if the cxml is populated in your browser. In case of chrome, you’ll have to right click on the page and click on “View Page Source” to see if the collection is coming back.
    2. b. If the cxml is returned, find out the dzc from it. You can find it in the “ImgBase” attribute of the “Items” tag; it’ll look something like “collection-5f7c6a376516425598d3d822d2bd3cbf.dzc”.
    3. c. Then try to navigate to your .dzc file from the same browser, the URL will now be http://www.abc.com/collection-5f7c6a376516425598d3d822d2bd3cbf.dzc and see if the dzc is sent back. Again in chrome, check the Page’s source to see the result. The collection returned will now be something like this:

	<?xml version="1.0" encoding="utf-8" ?>
	<Collection MaxLevel="8" TileSize="256" Format="jpg" NextItemId="183" xmlns="http://schemas.microsoft.com/deepzoom/2008">
	  <Items>
		<I Id="0" N="0" IsPath="1" Source="items-5f7c6a376516425598d3d822d2bd3cbf/dzi/0.dzi">
		  <Size Width="256" Height="256" />
		</I>
		<I Id="1" N="1" IsPath="1" Source="items-5f7c6a376516425598d3d822d2bd3cbf/dzi/1.dzi">
		  <Size Width="256" Height="256" />
		</I>
		<I Id="2" N="2" IsPath="1" Source="items-5f7c6a376516425598d3d822d2bd3cbf/dzi/2.dzi">
		  <Size Width="256" Height="256" />
		</I>
		<I Id="3" N="3" IsPath="1" Source="items-5f7c6a376516425598d3d822d2bd3cbf/dzi/3.dzi">
		  <Size Width="256" Height="256" />
		</I>
		<I Id="4" N="4" IsPath="1" Source="items-5f7c6a376516425598d3d822d2bd3cbf/dzi/4.dzi">
		  <Size Width="256" Height="256" />
		</I>
		<I Id="5" N="5" IsPath="1" Source="items-5f7c6a376516425598d3d822d2bd3cbf/dzi/5.dzi">
		  <Size Width="256" Height="256" />
		</I>
	  </Items>
	</Collection>

This dzc file contains the information about the DeepZoom for the collection items. Here what you have to check is that for an item you have the value in the Source attribute. If there’s no value in the Source attribute i.e. Source=””, then we have a problem. And this is what brings us to the DeepZoom bug on the Mac OS. So if you can be put a value to this Source attribute even though a fake one (Yes, I said fake), you will start seeing the collection. It’s funny how an attribute whose value doesn’t matter can be so problematic (FYI, the source attribute is used for getting the DZI). If you are doing a JIT collection, the reason for this could be that the size of your images used for the collection items is 256 by 256. You can check this by debugging the “PivotServerTools” project, go to PivotServerTools à Internal à MakeItemContent


	string source = string.Empty;
	if ((null != item.ImageProvider) && (null != item.ImageProvider.DziPath))
	{
		source = item.ImageProvider.DziPath;
	}
	else if (IsAutoGenerateDzi)
	{
		//Only provide an auto-DZI if the image is larger than a collection tile
		if (null != item.ImageProvider)
		{
			Size size = item.ImageProvider.Size;
			if ((size.Width >= TileDimension) || (size.Height >= TileDimension))
			{
				source = DziSerializer.MakeDziPath(m_collection.CollectionKey, id);
			}
		}
	}

	yield return new XAttribute("Source", source);


Check here what the exact reason is and correct it else you can use a fake URL to get it working. Enjoy!

Advertisements