We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Split pdf use C++ failed

I has try to split pages with C++ but it always crashed

qDebug()<<“files temp:”<<filename+"_Temp";
auto pages = _dsdoc->get_Pages();
int pagecount = pages->get_Count();
for(int i=1;i<=pagecount;++i)
auto tempdoc = MakeObject();
auto pagepdf = pages->idx_get(i);//crash no reason
// tempdoc->get_Pages()->Add(pdfPage.);
SharedPtr options = MakeObject();


Could you please provide some additional details on how application is crashing? Is it throwing some error? We tested with one of our sample files and Aspose.PDF for C++ 20.12. We did not notice any issue. Would you please also confirm if you are using the API with a valid license. Please share your sample PDF document with us so that we can test the scenario in our environment and address it accordingly.

Thanks It is My problem.I typdef same type smart in header ,then get real from cpp
It it easy gone. I have changed include pdfdocument headerfile in my header


We have tested the scenario in our environment while using one of our sample files and we were unable to notice any issue. Furthermore, we are unable to get a complete picture of the problem you are facing. It would be helpful if you could please share a sample console application along with sample PDF document with us. We will test the scenario in our environment and address it accordingly. You can also share your code file in .zip format.