syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.43k stars 661 forks source link

IOS: showing blur pdf. #1792

Open vishalJoshiBrainvire opened 3 weeks ago

vishalJoshiBrainvire commented 3 weeks ago

Hello,

I am using this package to show the pdf in my application. it's working great with the Android platform but in IOS devices it's showing blurred PDF at the initial level but after zooming it, it clearly shows the pdf for that zoomed view.

Please help me out.

immankumarsync commented 3 weeks ago

Hi @vishalJoshiBrainvire, In syncfusion_flutter_pdfviewer, we render the PDF pages as images that we obtain from the native platform PDF APIs (PdfRenderer for Android, CGPDFDocument for iOS and macOS, etc.). Additionally, the pages fitted to the width of the SfPdfViewer widget.

On the Android platform, the image size is calculated based on the screen size of the device. Hence, the image size of the page will be different from that of the original page width. (Say the page width is 792 and the screen width is 1080; then the image width will be 1080.) Due to this, the image is rendered in high quality.

On the iOS platform, when following the same approach as on Android, the initial PDF page's image quality is lower than the quality of the image, which is rendered with the original page size. Hence, we render the PDF page images with the original size on the iOS platform. Also, rendering the whole page with a higher quality increases the page rendering time.