In our application we generate pdf file with the help of aspose. We want to edit the pdf file but we are not able to do so. So kindly help me out how to edit pdf with the help of aspose.
Would you please explain how you want to edit the PDF and which code snippet are you using to do it? Please share sample input and expected output PDF documents with sample code snippet that you have tried so far. We will test the scenario in our environment and address it accordingly.
Hi, We cant share the code snippet and pdf document. We would like to explain the issue what we are facing. We have aspose license and we use aspose.word dl. We convert the word document to pdf by just replacing .docx to .pdf extension. While we are converting we are getting blank pages in the pdf, we need to edit the pdf and delete those blank pages. We are not able to edit the pdf file in the code. So need your help on this
In order to delete pages from PDF or edit PDF in any manner, you need to use Aspose.PDF API. Please check below code example to delete the pages from PDF:
Furthermore, if input Word document already has empty/blank pages, you can also delete them before converting to PDF. Please check below post:;
In case there are no blank pages in the input Word document and still you are noticing them in the generated PDF, this issue may be related to Aspose.Words and we request you create an inquiry in Aspose.Words Support Forum where you will be assisted accordingly.
Thank you for the information. Can you help us how can we get Aspose.pdf dl
You can download and install Aspose.PDF using NuGet Package Manager. Please note that you need license to use Aspose.PDF as well. In case you have Aspose.Total subscription, you can use same license and set it before using Aspose.PDF methods and calls. Also, you can obtain a 30-days free temporary license in order to evaluate the API without any limitations. In order to purchase the API subscription (in case you do not have Aspose.Total subscription), please contact our sales team.
Hi we have downloaded aspose.pdf and we tried the below code for deleting the blank page but we are getting error
foreach (var page in pdfDocument.Pages)
// Delete a particular page
// Save updated PDF pdfDocument.Save();
error: cannot access a closed file in c#
Can you help on this
Are you saving the document before deleting the empty/blank pages? Please try to re-initialize the document object before performing this operation and in case you still face any issues, please share a sample PDF with us so that we can further test it in our environment and address accordingly.