|
@@ -113,16 +113,16 @@ namespace QuestPDF.Drawing
|
|
|
|
|
|
|
|
void ThrowLayoutException()
|
|
void ThrowLayoutException()
|
|
|
{
|
|
{
|
|
|
- throw new DocumentLayoutException("Composed layout generates infinite document.")
|
|
|
|
|
|
|
+ var message = $"Composed layout generates infinite document. This may happen in two cases. " +
|
|
|
|
|
+ $"1) Your document and its layout configuration is correct but the content takes more than {documentMetadata.DocumentLayoutExceptionThreshold} pages. " +
|
|
|
|
|
+ $"In this case, please increase the value {nameof(DocumentMetadata)}.{nameof(DocumentMetadata.DocumentLayoutExceptionThreshold)} property configured in the {nameof(IDocument.GetMetadata)} method. " +
|
|
|
|
|
+ $"2) The layout configuration of your document is invalid. Some of the elements require more space than is provided." +
|
|
|
|
|
+ $"Please analyze your documents structure to detect this element and fix its size constraints.";
|
|
|
|
|
+
|
|
|
|
|
+ throw new DocumentLayoutException(message)
|
|
|
{
|
|
{
|
|
|
ElementTrace = debuggingState?.BuildTrace() ?? "Debug trace is available only in the DEBUG mode."
|
|
ElementTrace = debuggingState?.BuildTrace() ?? "Debug trace is available only in the DEBUG mode."
|
|
|
};
|
|
};
|
|
|
- throw new DocumentLayoutException(
|
|
|
|
|
- $"Composed layout generates infinite document. This may happen in two cases. " +
|
|
|
|
|
- $"1) Your document and its layout configuration is correct but the content takes more than {documentMetadata.DocumentLayoutExceptionThreshold} pages. " +
|
|
|
|
|
- $"In this case, please increase the value {nameof(DocumentMetadata)}.{nameof(DocumentMetadata.DocumentLayoutExceptionThreshold)} property configured in the {nameof(IDocument.GetMetadata)} method. " +
|
|
|
|
|
- $"2) The layout configuration of your document is invalid. Some of the elements require more space than is provided." +
|
|
|
|
|
- $"Please analyze your documents structure to detect this element and fix its size constraints.");
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|