Skip to content

1024133: Document Handling in Blazor PDF Viewer#2792

Open
SF4524LogeshKumar wants to merge 5 commits into
developmentfrom
1024133-blazorDocumentHandling
Open

1024133: Document Handling in Blazor PDF Viewer#2792
SF4524LogeshKumar wants to merge 5 commits into
developmentfrom
1024133-blazorDocumentHandling

Conversation

@SF4524LogeshKumar
Copy link
Copy Markdown
Collaborator

Description:

Updated Document Handling in Blazor PDF Viewer

  • Load Large PDF
  • Load Password PDF
  • Preprocess PDF
  • Retrieve Loaded Document

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INPROGRESS 🔃
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: 1024133-blazorDocumentHandling
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 4
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INQUEUE 🕒
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INPROGRESS 🔃
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 1024133-blazorDocumentHandling
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INQUEUE 🕒
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INPROGRESS 🔃
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 1024133-blazorDocumentHandling
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

Comment thread Document-Processing/PDF/PDF-Viewer/blazor/document-handling/preprocess-pdf.md Outdated
Comment thread Document-Processing/PDF/PDF-Viewer/blazor/document-handling/load-large-pdf.md Outdated
@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INPROGRESS 🔃
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 1024133-blazorDocumentHandling
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

Build Status: INPROGRESS 🔃
Build Location: 1024133-blazorDocumentHandling

@SyncfusionBuild
Copy link
Copy Markdown
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 1024133-blazorDocumentHandling
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

domainurl: ##DomainURL##
---

# Retrieve the Loaded Document Instance
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change title Retrieve the Blazor PDF Viewer Instance


This page explains how to access the loaded document instance in the Blazor PDF Viewer using Blazor component references, listen for the [DocumentLoaded](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerEvents.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerEvents_DocumentLoaded) event, and retrieve document information, page details, and metadata—so you can safely invoke viewer APIs after the PDF document is loaded.

## Explanation: Why access the loaded document instance?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why access the lPDF Viewer Instance?


# Retrieve the Loaded Document Instance

This page explains how to access the loaded document instance in the Blazor PDF Viewer using Blazor component references, listen for the [DocumentLoaded](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerEvents.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerEvents_DocumentLoaded) event, and retrieve document information, page details, and metadata—so you can safely invoke viewer APIs after the PDF document is loaded.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PDF Viewer instance

@@ -0,0 +1,188 @@
---
layout: post
title: Retrieve Loaded Document Instance Blazor PDF Viewer | syncfusion
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PDF Viewer Instance

---
layout: post
title: Retrieve Loaded Document Instance Blazor PDF Viewer | syncfusion
description: Learn how to access the loaded PDF document instance in the Blazor PDF Viewer using component references and the DocumentLoad event.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Learn how to access the Blazor PDF Viewer instance references and the DocumentLoad, Created event.

- **Call Viewer APIs** (typical examples):
- **Zoom / Fit**: `ZoomTo(125)`; fit to page/width
- **Navigation**: go to a specific page
- **Interactions**: enable/disable features
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the proper API name and its API reference link

- **Interactions**: enable/disable features
- **Export**: `Download()`, `Print()`

N> The **Created event** triggers when the PDF Viewer component is rendered in the DOM. The **DocumentLoaded event** triggers when the document is successfully loaded and parsed. Always invoke viewer APIs after the `DocumentLoaded` event fires to ensure document information is available, or from user actions that occur after load. Guard calls with null checks or readiness flags.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the proper Created, DocumentLoaded API reference link


Below is a focused snippet showing:
1) Creating a **component reference** for the viewer,
2) Wiring the **`Created`** event for viewer initialization and the **`DocumentLoaded`** event for document details, and
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the proper Created, DocumentLoaded API reference link

<strong>Document Info</strong><br />
Name: @Info2.Name <br />
Pages: @Info2.PageCount <br />
Title: @Info1.Title <br />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove title and authos

private async Task OnCreated()
{
// Created event: Fires when the PDF Viewer component is rendered
string filePath = "wwwroot/pdf-succinctly.pdf";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only add await Viewer!.LoadAsync("wwwroot/pdf-succinctly.pdf");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants