Getting page count for pdfs
See original GitHub issueHi,
First of all, thanks for creating and maintaining this awesome framework!
I’m working on a project where we are using this framework to work with images and pdfs. The pdf operations in it self seems pretty easy, following your documentation:
https://github.com/dlemstra/Magick.NET/blob/master/Documentation/ConvertPDF.md
The problem or question I have to this, is that for pdfs with alot of pages in it, this operation takes forever.
So if I use the following code:
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new Density(300);
using (MagickImageCollection i = new MagickImageCollection())
{
i.Read(file, settings);
}
The read operation takes forever. 60 pages takes around 50 seconds.
What I am really interested in is actually just the page count and not so much all the extra information that I get for each page in the pdf.
If I run a similar query on the Imagemagick exe:
magick.exe indentify -verbose -ping file.pdf
then it takes only 5-6 seconds, which is a significant difference.
Is there a way or a trick with which I can speed this up?
Thanks in advance!
/Magnus
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:14 (5 by maintainers)
Top GitHub Comments
I used iTextSharp to get the number of pages.
Could you open a new issue to request support for that? And feel free to include an suggestion of how the API should look like.