Thanks for inquiring Aspose.Slides.
I have observed your requirements and like to share that there is no direct option available to export the presentation to PDF with specified number of slides. The right way is to use the presentation cloning feature in this regard. By using presentation cloning feature, you can select and clone the slides of your choice and also in order you like. Then finally, export the cloned presentation to PDF. This way you will be able to achieve the desired results. For more about presentation cloning, please visit this documentation link.
Please share, if I may help you further in this regard.
Thanks, Mudassir! That was helpful.
I like to share that we have also introduced the support for generating the PDF for specific slides in presentation. Please try using Aspose.Slides for .NET 14.9.0 on your end by following the sample code shared over this documentation link.
I hope this will be helpful.