0

I am developing an android songbook app and need help displaying a pdf.

I have an SVG PDF file that I want to display. Everything I've found for rendering a pdf does it by converting to bitmap. Even pdfrenderer which was released in API 21.

My app will have zooming capabilities, and I don't want to convert to bitmap, because zooming in will result in loss of quality.

See the example below.

enter image description here

enter image description here

How can I display my pdf without converting to a bitmap? I do not want to use a third party viewer either.

Thank you

DSallee
  • 61
  • 8
  • Once the file is a PDF, the content is no longer SVG. Do you have the original SVG? If so, you should be able to display that. – joelgeraci Sep 30 '16 at 16:46
  • @JoelGeraci I do not have the original SVG. Someone else generated them using Finale Music Software I"m not sure that the pdf is SVG, but I do know that it is vector based rather than pixel based. – DSallee Sep 30 '16 at 17:21
  • @DSallee - at some point, the image becomes pixel-based.Otherwise, it wouldn't be on the screen. One approach would be to render to a bitmap larger than the screen, simply displaying a portion of this at once. You want 2x zoom? Render to a bitmap 2x the screen size and display a screen's worth of it. – enhzflep Sep 30 '16 at 18:43

0 Answers0