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

Free Support Forum - aspose.com

Aspose Save is failing with small sized documents

This happens in ASP.net Core
AsposeConsole.zip (1.4 MB)
docpfd.Save was never returning goes to infinite loop,

Added sample documents where we face the issue.

        var basePath = AppDomain.CurrentDomain.BaseDirectory;
        var docPdf = new Document(basePath + "\\" + "Related.pdf");
        var stampPdf = new Document(basePath + "\\" + "cover-landscape.pdf");
        var cover = docPdf.Pages.Insert(1);
        PdfPageStamp pageStamp = new PdfPageStamp(stampPdf.Pages[1]);
        pageStamp.Background = true;
        pageStamp.XIndent = 0;
        pageStamp.YIndent = 0;
        cover.AddStamp(pageStamp);
        TextFragment title = new TextFragment("Page Title");
        title.Margin = new MarginInfo(70, 10, 70, 280);
        title.TextState.HorizontalAlignment = HorizontalAlignment.Center;
        title.TextState.FontSize = 32;
        cover.Paragraphs.Add(title);

        var pageCollection = docPdf.Pages;
        Page pdfPage = pageCollection[1];
        pdfPage.SetPageSize(Math.Round(docPdf.Pages[2].GetPageRect(true).Width), Math.Round(docPdf.Pages[2].GetPageRect(true).Height));
        docPdf.Save(basePath + "\\" + "Result.pdf");

@richachauhan,

I have observed issue you mentioned and have logged it as PDFNET-47967 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.