Skip to content

Commit b97c4a9

Browse files
authored
Merge pull request #3479 from syncfusion-content/Base64StringURL
916584 - Detect native PDF renderer issues by the DocumentLoadFailed event
2 parents 2e6faf5 + 455ba2d commit b97c4a9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

MAUI/PDF-Viewer/DocumentLoadNotifications.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ private void PdfViewer_DocumentLoaded(object sender, EventArgs e)
4848

4949
## Document load failures
5050

51-
When a document fails to load in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html), the users will be notified with a default message prompt by the [DocumentLoadFailed](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoadFailed) event.
51+
When a document fails to load in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html), users are notified with a context-specific error message via the [DocumentLoadFailed](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoadFailed) event. This event helps developers identify the cause of the failure and implement custom error handling for a smoother user experience.
5252

5353
### Document load failed event
5454

55-
The [DocumentLoadFailed](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoadFailed) event triggers when the document loading fails in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html). That is,
56-
* When any corrupted document is loaded.
57-
* When any password-protected document is loaded with an invalid or empty password.
58-
* When any non-PDF document is loaded.
59-
* When a PDF containing an XFA form is loaded.
55+
The [DocumentLoadFailed](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoadFailed) event alerts users when a document fails to load in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) due to one of the following conditions:
56+
* A corrupted document is loaded.
57+
* A password-protected document is provided with an invalid or empty password.
58+
* A non-PDF file is attempted to be loaded.
59+
* The document contains an XFA form, which is currently unsupported.
60+
* Exceptions occur during PDF loading or page rendering due to limitations or issues in platform-specific native PDF renderers.
6061

6162
The [DocumentLoadFailedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.DocumentLoadFailedEventArgs.html) will return the error [Message](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.DocumentLoadFailedEventArgs.html#Syncfusion_Maui_PdfViewer_DocumentLoadFailedEventArgs_Message) and [Exception](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.DocumentLoadFailedEventArgs.html#Syncfusion_Maui_PdfViewer_DocumentLoadFailedEventArgs_Exception) details for the failure. The following code example explains the same.
6263

@@ -105,4 +106,4 @@ private void PdfDocumentLoadFailed(object sender, DocumentLoadFailedEventArgs e)
105106
}
106107

107108
{% endhighlight %}
108-
{% endtabs %}
109+
{% endtabs %}

0 commit comments

Comments
 (0)