I have a control on a form that is working fine most of the time. But I'm finding that if I want to print a PDF file from elsewhere in the form (with the PDF Viewer on another tab that is not visible) then the LoadDocument is not working. Is this by design please?
Kind regards,
Simon



請幫忙測試 RadPdfViewer 在讀取 PDF 檔案時是否有問題。
作業系統:Windows 11 25H2 26200.8655
請確認ucrtbase.dll版本是否為 10.0.26100.8521。
路徑:C:\Windows\System32\ucrtbase.dll
在此資料夾中找到檔案【鼎新Picture.exe】並雙擊執行。
畫面會打開並載入【NG.pdf】。
測試檔案已附上
視訊連結路徑
I tested these four versions of ucrtbase.dll, and only version 10.0.26100.1591 can be enabled.
Disable right-click menu in PdfViewer?
PdfViewerLocalizationProvider.CurrentProvider = new MyLocalizationProvider();} 自定義radPdfViewerNavigator1中文化選項
public class MyLocalizationProvider : PdfViewerLocalizationProvider
{
public override string GetLocalizedString(string id)
{
switch (id)
{
case PdfViewerStringId.ContextMenuCopy:
return "複製(&C)";
case PdfViewerStringId.ContextMenuSelectAll:
return "全選(&A)";
case PdfViewerStringId.ContextMenuDeselectAll:
return "取消全選(&D)";
case PdfViewerStringId.ContextMenuHand:
return "手形工具(&H)";
case PdfViewerStringId.ContextMenuSelection:
return "選取工具(&S)";
case PdfViewerStringId.ContextMenuPreviousPage:
return "上一頁(&P)";
case PdfViewerStringId.ContextMenuNextPage:
return "下一頁(&N)";
case PdfViewerStringId.ContextMenuPrint:
return "列印(&R)...";
case PdfViewerStringId.ContextMenuFind:
return "尋找下一個(&F)";
case PdfViewerStringId.NavigatorOpenButton:
return "打開";
case PdfViewerStringId.NavigatorPrintButton:
return "列印";
case PdfViewerStringId.RotateCounterclockwiseButton:
return "逆時針旋轉";
case PdfViewerStringId.RotateClockwiseButton:
return "順時針旋轉";
case PdfViewerStringId.NavigatorPreviousPageButton:
return "上一頁";
case PdfViewerStringId.NavigatorNextPageButton:
return "下一頁";
case PdfViewerStringId.NavigatorCurrentPageTextBox:
return "目前頁面";
case PdfViewerStringId.NavigatorTotalPagesLabel:
return "總頁數";
case PdfViewerStringId.NavigatorZoomInButton:
return "放大";
case PdfViewerStringId.NavigatorZoomOutButton:
return "縮小";
case PdfViewerStringId.NavigatorZoomDropDown:
return "縮放下拉選單";
case PdfViewerStringId.NavigatorHandToolButton:
return "移動工具";
case PdfViewerStringId.NavigatorSelectToolButton:
return "選取工具";
case PdfViewerStringId.NavigatorFindNextButton:
return "尋找下一個";
case PdfViewerStringId.NavigatorFindPreviousButton:
return "尋找上一個";
case PdfViewerStringId.NavigatorSearchTextBox:
return "搜尋";
case PdfViewerStringId.NavigatorNoResultMessage:
return "根據指定的條件找不到結果。";
case PdfViewerStringId.NavigatorNoResultMessageHeader:
return "資訊";
case PdfViewerStringId.NavigatorDefaultStrip:
return "預設工具列";
case PdfViewerStringId.PrintPreviewGroupBoxPreview:
return "預覽";
case PdfViewerStringId.PrintPreviewGroupBoxOrientation:
return "方向";
case PdfViewerStringId.PrintPreviewGroupBoxSettings:
return "設定";
case PdfViewerStringId.PrintPreviewButtonPrint:
return "列印";
case PdfViewerStringId.PrintPreviewButtonCancel:
return "取消";
case PdfViewerStringId.PrintPreviewButtonWatermark:
return "浮水印";
case PdfViewerStringId.PrintPreviewButtonSettings:
return "列印設定";
case PdfViewerStringId.PrintPreviewLabelPageSizeInches:
return "{0:F2} x {1:F2} 英吋";
case PdfViewerStringId.PrintPreviewLabelPageSizeCm:
return "{0:F2}公分 x {1:F2}公分";
case PdfViewerStringId.PrintPreviewLabelScale:
return "縮放: {0}%";
case PdfViewerStringId.PrintPreviewLabelCurrentPage:
return "第 {0} 頁,共 {1} 頁";
case PdfViewerStringId.PrintPreviewFormTitle:
return "列印預覽";
case PdfViewerStringId.PrintPreviewPrintError:
return "列印文件時發生錯誤!";
case PdfViewerStringId.PrintPreviewRadioPortrait:
return "直向";
case PdfViewerStringId.PrintPreviewRadioLandscape:
return "橫向";
case PdfViewerStringId.PrintPreviewRadioAuto:
return "自動";
case PdfViewerStringId.NavigatorFitToWidthButton:
return "符合寬度";
case PdfViewerStringId.NavigatorFitToPageButton:
return "符合頁面";
case PdfViewerStringId.PageThumbnailsLabel:
return "頁面縮圖";
case PdfViewerStringId.SaveButton:
return "另存新檔";
case PdfViewerStringId.CloseButton:
return "關閉";
case PdfViewerStringId.NavigatorShowSignatureButton:
return "簽章面板";
case PdfViewerStringId.SignatureDialogTitle:
return "簽章驗證狀態";
case PdfViewerStringId.SignaturePanel_Invalid:
return "至少有一個簽章無效。";
case PdfViewerStringId.SignaturePanel_Unknown:
return "至少有一個簽章有問題。";
case PdfViewerStringId.SignaturePanel_Valid:
return "已簽署且所有簽章都有效。";
case PdfViewerStringId.SignaturePropertiesDialogHeader:
return "簽章驗證狀態";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_IsDocumentModified_False:
return "自此簽章套用後,文件未被修改。";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_IsDocumentModified_True:
return "自簽章套用後,文件已被更改或損壞。";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_SignatureIsInvalid:
return "簽章無效。";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_SignatureIsUnknown:
return "簽章有效性未知。";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_SignatureIsValid:
return "簽章有效,簽署者:";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_SignerValidity_Unknown:
return "簽署者身份未知。";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_SignerValidity_UntrustedRoot:
return "簽署者身份未知,因為它未包含在您的信任憑證清單中,且其父憑證均不受信任。";
case PdfViewerStringId.SignaturePropertiesDialogViewModel_SignerValidity_Valid:
return "簽署者身份有效。";
case PdfViewerStringId.SelectCertButton:
return "選取";
case PdfViewerStringId.SignButton:
return "簽署";
case PdfViewerStringId.EnterAPassTextBox:
return "輸入密碼";
case PdfViewerStringId.SelectCertTextBox:
return "選取憑證";
}
return base.GetLocalizedString(id);
}
}
We are experiencing a critical issue with the RadPdfViewer control after upgrading to version 2024.4.1113. Previously, we were using version 2017.X and everything worked correctly.
After the upgrade, when some users try to load PDFs in the viewer, the documents are either:
Completely blank,
Filled with black squares,
Or displayed in a distorted/incorrect format.
The issue is inconsistent — the same PDF files that display incorrectly for some users render just fine for others. All users are accessing the same application via a Windows RDS (Remote Desktop Services) environment.
What makes this even more confusing is that:
The issue only affects certain users on the RDS server.
The exact same PDF can be opened successfully by one user but fails for another.
The application and environment are otherwise identical between users.
We’ve confirmed that the issue started only after upgrading the Telerik controls to the latest version.
Can you please assist us in identifying the cause and provide any recommendations or patches that could resolve this issue?
Environment:
Telerik UI for WinForms v2024.4.1113
Windows Server with RDS
.NET Framework version: 4.7.1
Application in VB.NET (WinForms)
Please let us know if any logs, test files, or further information is required.
Best regards,
André Borges,
F3M

Hi,
I've been struggling to work out how to export the current pdf page as shown in the pdfViewer after it has been rotated using controls in the pdfViewerNavigator. I'm trying to save the image in png format but it seems to export the page in the original orientation ignoring the applied rotation.
Also whilst searching the forum for a solution, I came across the code
this.radPdfViewer1.PdfViewerElement.CurrentPage.PageNo
but it appears that PageNo no longer exists in 2020.3.1020.
Currently i'm using
pdfViewer.ExportPage ( 0, _tempImageFileName, 1.0, true, ImageFormat.Png );
which exports the first page as a png, which works, I just need to save the currently selected page that may or may not have been rotated.
Is this possible, if so how ?
¡Hi everyone! I have this issue loading a pdf with the RadPdfViewer.
On the RadPdfViewer DataError event i got an InvalidOperationException with only the "Stack empty" messsage,
This is the stacktrace of the exception thown by the PdfExceptionEventArgs
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.Stack`1.Pop() at Telerik.Windows.Pdf.Documents.Fixed.FormatProviders.Old.Pdf.DocumentModel.PdfContext.RestoreGraphicState() at Telerik.Windows.Pdf.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.ContentStreamParser.InvokeGeneralGraphicsStateOperator(String op, Object[] pars) at Telerik.Windows.Pdf.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.ContentStreamParser.InvokeOperator(String op, Object[] pars)
Can you please tell me what could be the possible reason of this issue ? Thanks
PS. The file is on the zip attached

I have this code, and I just want to export all pages or a specific page from the loaded PDF in the RadPdfViewer, without saving the file to the computer.
The function RadPdfViewer.ExportPage returns a Bitmap, but when I assign the result of this function to a new variable of type Bitmap, an error occurs.
'1º Option - Work
For i As Integer = 1 To RadPdfViewer1.Document.Pages.Count
Dim guid As Guid = Guid.NewGuid
RadPdfViewer1.ExportPage(i, "C:\temp\" & guid.ToString() & ".pdf", 1, True, ImageFormat.Png)
Dim bitmap As Bitmap = New Bitmap("C:\temp\" & guid.ToString() & ".pdf")
Dim reader As BarcodeReader = New BarcodeReader With {
.AutoRotate = True,
.TryInverted = True
}
Dim result As Result = reader.Decode(bitmap)
If result Is Nothing Then Continue For
Dim decoded As String = result.ToString().Trim()
If decoded Is Nothing Then Continue For
If decoded <> TextBox1.Text Then TextBox1.Text = TextBox1.Text & vbNewLine & vbNewLine & decoded
bitmap.Dispose()
My.Computer.FileSystem.DeleteFile("C:\temp\" & guid.ToString() & ".pdf")
Next
'2 Option - Dont Work
Dim bitmap As Bitmap = RadPdfViewer1.ExportPage(1, 1, False, ImageFormat.Png)
'3º Option - Dont Work
For Each bitmap As Bitmap In RadPdfViewer1.ExportPages(1, False, ImageFormat.Bmp)
Dim reader As BarcodeReader = New BarcodeReader With {
.AutoRotate = True,
.TryInverted = True
}
Dim result As Result = reader.Decode(bitmap)
If result Is Nothing Then Continue For
Dim decoded As String = result.ToString().Trim()
If decoded Is Nothing Then Continue For
If decoded <> TextBox1.Text Then TextBox1.Text = TextBox1.Text & vbNewLine & vbNewLine & decoded
Next