Solution:
Mainly on PageElementsLoaded event of the PDF Viewer you have to check for tilings and if the tiling has an image as a content, remove the tiling:
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
Func<CancellationToken, Task<Stream>> streamFunc = ct => Task.Run(() =>
{
Assembly assembly = typeof(MainPage).Assembly;
string fileName = assembly.GetManifestResourceNames().FirstOrDefault(n => n.Contains("yourdocument.pdf"));
Stream stream = assembly.GetManifestResourceStream(fileName);
return stream;
});
this.pdfViewer.Source = streamFunc;
this.pdfViewer.PageElementsLoaded += (s, args) => ReplaceTilingImages(args.Page);
}
private static void ReplaceTilingImages(RadFixedPage fixedPage)
{
for (int i = 0; i < fixedPage.Content.Count; i++)
{
if (fixedPage.Content[i] is Telerik.Windows.Documents.Fixed.Model.Graphics.Path path &&
path.Fill is Tiling tiling &&
tiling.Content.Count == 1 &&
tiling.Content[0] is Telerik.Windows.Documents.Fixed.Model.Objects.Image image)
{
var imageCopy = new Telerik.Windows.Documents.Fixed.Model.Objects.Image();
imageCopy.ImageSource = image.ImageSource;
imageCopy.Position = tiling.Position;
fixedPage.Content[i] = imageCopy;
}
}
}
}
Regards,
Didi
Progress Telerik