Controlling PDFViewCtrl page border display


Considering the option to add a border around the page:
I’ve experienced successfully with SetPageBorderVisibility but was wondering whether there’s an option to further control this border’s color and margin. What i need is a border only between pages in a single page view, but not on page sides, as illustrated in the attached image.
Is there an available API for me to control this border? Is there another way to implement this? (i’ve tried putting space between pages and setting the background color of the entire control but this didn’t work out as expected)

Thanks a lot in advance!




Currently the API available to control the border and margins are:

  • SetPageBorderVisibility
  • SetPageSpacing

You can use these with different values when changing between page modes (single → continuous and vice versa). Regarding the picture you attached as an example, in my test using SetPageSpacing(0, 0, 0, 0) with SetPageBorderVisibility(false) removed the gray thin border between the pages. You can also change the background color, as you mentioned, to match the color of the page.

To change the color/size of the border I believe you can disable the border and then draw it by yourself, since the current API does not have a way to control this.