Unplanned
Last Updated: 30 Nov 2023 18:51 by Martin Ivanov
Martin Ivanov
Created on: 30 Nov 2023 18:51
Category: PDFViewer
Type: Feature Request
0
PdfViewer: Add API to change the default margins around the document presenter
Currently, there are 10px of margin on each side of the FixedDocumentPresenter element showing the page. This is controlled by the PageMargins property of the PagesLayoutManagerBase class, which is set to a fixed value of 10. To change this, you will need to implement custom PagesLayoutManager and few other page presenter classes from scratch. 

Add a property that allows easily changing of the PageMargins value.

At this moment, you can work this around by setting the PageMargins via reflection.
var pageMarginsPropInfo = typeof(PagesLayoutManagerBase).GetField("pageMargins", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
pageMarginsPropInfo.SetValue(null, new Size(0, 0));

0 comments