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

Free Support Forum - aspose.com

Problems with your API

I am trying to use your API for .NET cells. Every time I try to enter that part of your webpage I get the following error: 502 - Web server received an invalid response while acting as a gateway or proxy server.

Hi Lars,

Thank you for considering Aspose APIs.

Could you please provide the URL that is giving you the 502 error? Below provided are a few links that may interest you.

Please feel free to write back in case you have any ambiguity.

Has this issue been resolved? I am experiencing a similar type of error with AsposePDF.


Could you please explain the issue by sharing the page links which are raising these issues? Better to share the links on the respective product forum for proper management.

We have created a tool to generate printable PDFs. Yet, when if we try to produce a large file, we get a
502 error.

If files are selected and user goes through the process to generate a PDF, we are getting:

502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

Example Site

Can you share what the limitations of the file size used with the plugin?


I am unable to reproduce the issue. Could you please share exact steps to reproduce it along with a sample application which can be used to observe the problem here. I will be able to share feedback with you after analysis.

Test Site

Go to test site

  • Click Create New Guide
    -Click Corn
    -Select All Crops
    -Save Solution
    -Review Seed Selection
    -Confirm Seed Selection
    -Click Approve The Guid
    -Compile Guide

the result is the application times out. I have read that 2GB size files can be created, how do users get around timeout error?

I have tried to reproduce this issue but after following the above-mentioned steps the creation process does not finish and the process continues for long.

As you are providing frontend for this application to the API, it is requested that you may separate the Aspose related issue and create a simple application containing Aspose related code and share with us along with the template files. Please ensure that it is runnable project and all the references are resolved. We need to reproduce this issue here using sample runnable application from code for our analysis and providing further assistance. I am afraid that reproducing the issue using your test site is not sufficient for identifying the problem.

I am having the same issue. Aspose.PDF when merging PDFs larger than 3 MB. Error appears after 20 sec. Modified web.config to executionTimeout=“2400” maxRequestLength=“102400” still the error.


Would you please share your sample PDF document along with code snippet that you are using. We will test the scenario in our environment and address it accordingly. Please also make sure that your application is targeting to x64 mode of debugging.

The web app has 1000s of PDFs to select from and merge. The majority are AODA compliant. The issue is with these ones because are bigger I think.When select only one in a console app : a 26 MB takes 37 sec, 3 MB takes 5 sec, 600 KB takes 1 sec. When multiple selected is even worse.

Using version 20.1.0
The code is :
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Net;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Reflection;
using System.Configuration;
using System.Collections.Specialized;
using Aspose.Pdf;
using System.Net.Mail;

    public partial class PreviewPDF_FinRep : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            string logFile = "~/ErrorLog.txt";
            logFile = HttpContext.Current.Server.MapPath(logFile);

            string licPath = Server.MapPath("~/lic/Aspose.Pdf.lic");
            Aspose.Pdf.License lic = new Aspose.Pdf.License();

                catch(Exception exLic)

                List<string> doclistsource = new List<string>();
                string PDFList = Request.Form["chkbox"];

                string QS = PDFList;
                string[] initial = QS.Split(',');

                if (initial.Length > 0)
                    Response.Write("No Documents Selected");

                foreach (string pdfFileName in initial)
                    if (pdfFileName.ToString().Trim() != "" && !doclistsource.Contains(pdfFileName))
                        doclistsource.Add(pdfFileName.Substring(8, pdfFileName.Length - 8));

                string pathIn = Server.MapPath("~/files/Library/");
                List<Aspose.Pdf.Document> doclist = new List<Aspose.Pdf.Document>();
                Aspose.Pdf.Document[] PDFSList = null;

                string outfile = "";
                string outpath = "..\\files\\Output\\" + outfile;
                string name = "";

                int count = doclistsource.Count;
                PDFSList = new Aspose.Pdf.Document[count];
                Aspose.Pdf.Facades.PdfFileInfo fileInfo = new Aspose.Pdf.Facades.PdfFileInfo();

                for (var i = 0; i < count; i++)
                    if (File.Exists(pathIn + doclistsource[i] + ".pdf"))
                        PDFSList[i] = new Aspose.Pdf.Document(pathIn + doclistsource[i] + ".pdf");
                        PDFSList[i].OpenAction = null;

                    if (!File.Exists(pathIn + doclistsource[i] + ".pdf"))

                        foreach (string fileN in System.IO.Directory.GetFiles(pathIn))
                            if (fileN.Contains(doclistsource[i].ToString()))

                                File.Move(fileN, fileN.Substring(0, fileN.LastIndexOf("\\") + 1) + doclistsource[i] + ".pdf");
                                PDFSList[i] = new Aspose.Pdf.Document(pathIn + doclistsource[i] + ".pdf");
                                PDFSList[i].OpenAction = null;


                string fileName = Guid.NewGuid().ToString() + ".pdf";
                outfile = outpath + fileName;

                string pathOut = Server.MapPath("~/files/Output/");
                string FilePath = Server.MapPath("~/files/Output/" + fileName);
                Aspose.Pdf.Document docOut = new Aspose.Pdf.Document();
                docOut.OpenAction = null;

                Aspose.Pdf.Facades.PdfFileEditor fileEditor = new Aspose.Pdf.Facades.PdfFileEditor();
                fileEditor.CopyLogicalStructure = true;
                fileEditor.CopyOutlines = true;
                fileEditor.Concatenate(PDFSList, docOut);

                docOut.Save(Server.MapPath("~/Files/Output/" + fileName));
                Response.AddHeader("content-disposition","inline; filename="+fileName);
                Response.Redirect("~/Files/Output/" + fileName,false);

            catch (Exception ex)

                if (Page.IsPostBack == false)


Would you please make sure that the Dropbox Link is accessible for downloading. We tried to open it and it gave “Folder Botez does not exist” error.

Please try
The file is 508 compliant.
The request from the client: merge all selected PDFs (most are 508 compliant).
Have I used the correct Aspose code for this task?

The server team increased some timeout settings in Azure Application Gateway.
The error disappeared but the process of displaying even one 20+MB(508 compliant) trough Aspose.PDF is very very slow. Around 1minute 30sec for 20MB. What can I do to improve the performance? Thank you.


The performance of the API depends upon the complexity and structure of the PDF documents being processed. It also depends upon the Application Type where you are using the API. However, we always recommend you use the latest version of the API because it contains more improvements in terms of performance.

Yes, you are using the correct code snippet. However, the recommended code snippet to merge/concatenate files is the DOM approach as mentioned in the following article.

We tested using this approach and noticed that the resultant PDF did not have any bookmarks. API did not export the bookmarks and other structures in concatenated resultant PDF.

We have logged an issue as PDFNET-48708 in our issue tracking system and mentioned all the details in this ticket regarding the issue. We will further investigate it and check how can the performance of the API be improved further. We will inform you as soon as the ticket is fully investigated and resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.


Can you please give me the status of my ticket? Thank you.


We are afraid that earlier logged ticket is not yet resolved. Please note that it was logged under normal support model and will be investigated/resolved on first come first serve basis. We will inform you as soon as we have some definite updates in this regard. Please give us some time.

We are sorry for the inconvenience.

Thank you for your reply.

I am having another issue.
Could you please look at

from “carmenpdf”. Please reply ASAP. If we have to pay to get it fix please let me know.
This is urgent.


We have responded to your inquiry in respective forum thread where you can please provide your feedback.