When creating many instances of RadPdfViewer:
static void Main(string[] args)
{
int i = 1;
try
{
Stopwatch stopwatch = Stopwatch.StartNew();
while (true)
{
using (RadPdfViewer pdfViewer = new RadPdfViewer())
{
}
Console.WriteLine($"iteration {i}, elapsed seconds: {stopwatch.Elapsed.TotalSeconds}");
i++;
}
}
catch (Exception e)
{
Console.WriteLine($"Exception occurred at iteration {i}");
Console.WriteLine(e);
Console.ReadLine();
}
}
the following error occurs:
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+. at System.Drawing.Bitmap.GetHicon() at Telerik.WinControls.PdfViewer.MouseHandlers.PanHandler..ctor(MouseHandlersController controller, IFixedDocumentPresenter presenter) at Telerik.WinControls.PdfViewer.MouseHandlers.MouseHandlersController.BuildHandlers(IFixedDocumentPresenter presenter) at Telerik.WinControls.PdfViewer.MouseHandlers.MouseHandlersController..ctor(IFixedDocumentPresenter presenter) at Telerik.WinControls.UI.RadPdfViewerElement..ctor() at Telerik.WinControls.UI.RadPdfViewer.CreateViewerElement() at Telerik.WinControls.UI.RadPdfViewer.CreateChildItems(RadElement parent) at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CreateChildItems(RadElement parent) at Telerik.WinControls.RadElementTree.InitializeRootElement() at Telerik.WinControls.RadControl.Construct() at Telerik.WinControls.RadControl..ctor() at Telerik.WinControls.UI.RadPdfViewer..ctor()
Add functionality for a PDF form filler that supports text auto-sizing/shrinking like Adobe:
It seems that this is a regression in R1 2023 SP1 after addressing this item:
public TestRadForm()
{
InitializeComponent();
this.radPdfViewer1.LoadDocument(@"..\..\..\SampleDocument.pdf");
}
private void radButton1_Click(object sender, EventArgs e)
{
this.radPdfViewer1.Document.AcroForm.FlattenFormFields();
this.radPdfViewer1.SaveDocument(@"..\..\saved.pdf");
}
Open the Demo application >> Interactive Forms example and apply the Office2019Dark theme. You will notice that if the text field enters edit mode, it is difficult to read the input due to black fore color and black backcolor:
Hi,
Is there a way to get version and producer metadata from imported PDF files?
Here is how it looks in AdobeReader
Thanks in advance,
Run the project and load a document with bookmarks. Try to click the two buttons in order to switch between thumbnails/bookmarks.
private void radButton1_Click(object sender, EventArgs e)
{
this.radPdfViewer1.ShowThumbnails();
}
private void radButton2_Click(object sender, EventArgs e)
{
this.radPdfViewer1.ShowBookmarks();
}
Expected: clicking the two buttons should switch between bookmarks/thumbnails
Actual: the user is stuck to bookmarks