@neergupta
Thanks for your patience.
We have tried to resize the PDF content on Dimensions and Margin Ratio basis, by following code snippet, but I am afraid that we did not get much success.
// Source Width = 477.36, Left/Right Margins = 90 <= Margins are 18.85 percent of width
// Source Height = 174.24, Top/Bottom Margins = 72 <= Margins are 41.32 percent of height
PdfFileEditor.ContentsResizeParameters parameters = new PdfFileEditor.ContentsResizeParameters(
PdfFileEditor.ContentsResizeValue.units(44.78), // as per 18.85% of required width
PdfFileEditor.ContentsResizeValue.units(148.04), // sum of margins - required width
PdfFileEditor.ContentsResizeValue.units(44.78), // as per 18.85% of required width
PdfFileEditor.ContentsResizeValue.units(36.3616), // as per 41.32% of required height
PdfFileEditor.ContentsResizeValue.units(15.2768), // sum of margins - required height
PdfFileEditor.ContentsResizeValue.units(36.3616)); // as per 41.32% of required height
Therefore we have logged another investigation ticket as PDFJAVA-37113 in our issue tracking system. Our product team will further look into the details of the issue and we will keep you posted with the status of its correction. Please be patient and spare us little time.
We are sorry for the inconvenience.