Aspose.Words.Examples.CSharp.Rendering_and_Printing.ReceiveNotificationsOfFont.ReceiveWarningNotification C# (CSharp) Метод

ReceiveWarningNotification() приватный статический Метод

private static ReceiveWarningNotification ( Document doc, string dataDir ) : void
doc Document
dataDir string
Результат void
        private static void ReceiveWarningNotification(Document doc, string dataDir)
        {
            // ExStart:ReceiveWarningNotification 
            // When you call UpdatePageLayout the document is rendered in memory. Any warnings that occured during rendering
            // Are stored until the document save and then sent to the appropriate WarningCallback.
            doc.UpdatePageLayout();

            // Create a new class implementing IWarningCallback and assign it to the PdfSaveOptions class.
            HandleDocumentWarnings callback = new HandleDocumentWarnings();

            doc.WarningCallback = callback;
            dataDir = dataDir + "Rendering.FontsNotificationUpdatePageLayout_out.pdf";
            // Even though the document was rendered previously, any save warnings are notified to the user during document save.
            doc.Save(dataDir);
            // ExEnd:ReceiveWarningNotification  
        }
        // ExStart:HandleDocumentWarnings
ReceiveNotificationsOfFont