/// <summary>
 /// Gets the last section's <see cref="PageSize" /> element.
 /// </summary>
 /// <param name="document">The document</param>
 /// <returns>The <see cref="PageSize" /> element</returns>
 public static PageSize GetPageSize(this WordprocessingDocument document)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
     return(document.GetSectionProperties().GetFirstChild <PageSize>());
 }