Skip to content

PDFiumBitmap.Save - Resulting file is kind of corrupted #27

Description

@Harti177

The file when saved in .bmp format can be opened in windows.

  • But the size of the file is unnecessarily huge.
  • I used this wrapper in Unity and the resulting file cannot be imported in Unity. Also the file cannot be opened in few viewers.

Example resulting file,
https://drive.google.com/file/d/1m2uUGsMVcH6DDb9J30v82EVIY4szu-Mn/view?usp=share_link

        var pdfDocument = new PdfDocument(url);       
        var page = pdfDocument.Pages[pgNo];
        var pageBitmap = new PDFiumBitmap(2000, 2800, true);
        page.Render(pageBitmap, PageOrientations.Normal);
        pageBitmap.Save(Application.persistentDataPath + @"\Test.bmp", 300, 300);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions