最多可以在评估模式下查看4个元素(对于任何集合)。 [英] At most 4 elements (for any collection) can be viewed in evaluation mode.

查看:1038
本文介绍了最多可以在评估模式下查看4个元素(对于任何集合)。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用aspose pdf根据页码用户给出的输入拆分文件

我写的这段代码在前四页工作正常但是当我尝试拆分时第5页或如果我尝试拆分页码> 4然后显示错误

在评估模式下最多可以查看4个元素(对于任何集合)。



我尝试过:



im using aspose pdf for splitting the file as per input given by the user of page numbers
This code which i have written is working fine for the first four pages but when i try to split the 5th page or if i try to split page number > 4 then it shows an error
"At most 4 elements (for any collection) can be viewed in evaluation mode."

What I have tried:

string sourcePdfPath = @"F:\SplitPDF\SplitPDF\Main File\pdffile.pdf";
            string outputPdfPath = @"F:\SplitPDF\SplitPDF\Main File\";
            string pages = txtpagenumbers.Text;
            int[] extractThesePages = pages.Split(',').Select(n => Convert.ToInt32(n)).ToArray();
            Document pdfDocument = new Document(sourcePdfPath);
           int pageCount =  pdfDocument.Pages.Count;
            Document newDocument = new Document();
            foreach (int i in extractThesePages)
            {
                Page pdfPage = pdfDocument.Pages[i];
                newDocument.Pages.Add(pdfPage);
            }
            generatepassword();
            string fname =    "page_"+randfilenu+"_"+DateTime.Now.ToShortDateString()+".pdf";
            newDocument.Save(outputPdfPath + fname );
            MessageBox.Show("Splitted File has been Created and saved to folder: \n" + outputPdfPath + fname);

推荐答案

这是一个商业工具,你有一份评估版。评估副本几乎总是在可用性方面有某种限制,在这里你会遇到它。因此要么处理它,要么购买许可副本或寻找替代(可能是免费的)解决方案。
It's a commercial tool and you have an evaluation copy of it. Evaluation copies almost always have some sort of restriction in usability and here you're hitting it. So either deal with it or buy a licensed copy or look for alternative (potentially free) solutions.


这篇关于最多可以在评估模式下查看4个元素(对于任何集合)。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆