Code Monkey home page Code Monkey logo

Comments (2)

kerektamas avatar kerektamas commented on September 3, 2024

I have same problem.

When I open a large and long (>250 pages) PDF, maximize the window, set zoom to fit width or bigger, grab the scroll bar and start to pull it down, not too slow nor too fast, I will get this error: "An unhandled exception of type 'System.OutOfMemoryException' occurred in PresentationCore.dll" at line 36 of BitmapExtensionMethods.cs (constructor of WriteableBitmap class).
When the application is running, the memory usage extremely increase.

I put these lines after "var img = new PdfImage { ImageSource = bms, Margin = margin };" in PdfImageProvider.cs in your source, but not worked:

bms = null;
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

I use the library in .Net 4.5, Windows 8 (x86!) with 4GB memory.

Can You help me, please?

Thanks

from moonpdf.

NaughtyCatRun avatar NaughtyCatRun commented on September 3, 2024

Hi, guys. You can set MaxZoomFactor property of MoonPdfPanel based on your situation. For example, set 2.8 to MaxZoomFactor is OK when I using one file contains 906 pages while setting 3.0 to MaxZoomFactor will out of memory.

from moonpdf.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.