PDF resizing issue on cropped PDFs

The PDFEditor.ResizeContent moves the “view” window when resizing the PDF.
Source document:
document.pdf (95.8 KB)
The result document:
document_out.pdf (97.2 KB)

We are trying to resize the doc to have a 0.5-inch border on each side to draw the frame. However, the result PDF has no left border and the view area is moved (blue crosses appears on the page)

Source code:
public static void resizeDocument(Document document, double units)
{
PdfFileEditor.ContentsResizeValue valueUnits = PdfFileEditor.ContentsResizeValue.Units(units);
PdfFileEditor pdfEditor = new Aspose.Pdf.Facades.PdfFileEditor();

        PdfFileEditor.ContentsResizeParameters resizeParameters = new PdfFileEditor.ContentsResizeParameters()
        {
            TopMargin = valueUnits, LeftMargin = valueUnits, RightMargin = valueUnits, BottomMargin = valueUnits
        };

        pdfEditor.ResizeContents(document, resizeParameters);
    }


    static void Main(string[] args)
    {
        Document document = new Document("document.pdf");

        resizeDocument(document, 36);

        document.Save("document_out.pdf");
    }

@mmrusin

We were able to replicate the issue at our end while using Aspose.PDF for .NET 21.1. Hence, have logged it as PDFNET-49266 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello Asad,

Thanks for the extremely quick turn on this! I wish the dev team could be same quick with the fix as you are with the validation :slight_smile:

Best regards,
Maksym

@mmrusin

We will surely investigate and resolve the issue. However, it will be fixed on a first come first serve basis as per normal support policy. We will surely inform you as soon as we make some certain progress towards resolution of the ticket. Please give us some time.

We apologize for the inconvenience.