ImageMagick annotate first page

Viewed 37

This function annotates pdf pages. Is it possible to annotate only first page?

public void AnnotateImage(FileInfo file, string annText, int fontSize = 40)
        {
            try
            {
                using (MagickImage image = new MagickImage())
                {
                    image.Read(file.FullName);
                    image.Settings.FontPointsize = fontSize;
                    image.BackgroundColor = new MagickColor(Color.Black);
                    image.BackgroundColor = new MagickColor(Color.White);
                    image.Annotate(annText, Gravity.Southwest);
                    image.Write(file.FullName);
                }
            }
            catch(Exception ex)
            {
                throw ex;
            }
        }
0 Answers
Related