Not sure if you can get the warning from code, but you may be interested in printing Word document on a custom paper size.
using Spire.Doc;
using System.Drawing.Printing;
namespace PrintWord
{
class Program
{
static void Main(string[] args)
{
//Instantiate a Document object.
Document doc = new Document();
//Load the document
doc.LoadFromFile(@"Sample.docx");
//Get the PrintDocument object
PrintDocument printDoc = doc.PrintDocument;
//Customize the paper size
printDoc.DefaultPageSettings.PaperSize = new PaperSize("custom", 900, 800);
//Print the document
printDoc.Print();
}
}
More information can be found: https://www.e-iceblue.com/Tutorials/NET/Spire.Doc/Program-Guide/Print/C-/VB.NET-How-to-Print-Word-on-a-Custom-Paper-Size.html