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

Free Support Forum - aspose.com

Generate file to download and refresh content

Hi !
i’m in vb.net / Asp.net website.
using Telerik and aspose total.

I’ve got telerik component : multiple RadComboBox for selection and a RadGrid for result.
i’ve go as button “generate cover Pages”

In the grid user can select multiple asp checkboxes and click the button to generate covers for selected elements.
when i’ve clicked on button i’ve got set in database selected indentifiant for an OCR waiting for this covers. and i need generate from a DocxTemplate to 1 PDF cover file. send to browser download.

doc.Save(Me.Response, "Numerisation.pdf", ContentDisposition.Attachment, SaveOptions.CreateSaveOptions(SaveFormat.Pdf)) 

and problem is i need to update my grid to remove checkboxes by reload content from database, because is waiting user scan cover with is document (cover is for classification, QRCode etc…) to OCR.

i’ve tested many “technics” to deffers the pdf render by a javascript postback but in this case telerik content doesn’t work because response.end was send. i’cant call window.open to call a page to generate document because Chrome 92, block “popup” and wait a user action to approved opening.

i can’t just call another page from click button, because i need loop selected checkbox from code behind to save in database and generate the document.

What solution ?
thanks for your help.

@conan76

Please add Response.End() after sending document to client browser. Hope this helps you.

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please create a standalone console application (Aspose.Words source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.