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

Free Support Forum - aspose.com

How to ensure dpi is the same when converting from PSD to PDF

I have a PSD file with resolution 300 dpi.

I then convert it to PDF like this:

using var image = Image.Load(input, new PsdLoadOptions()
{
});

Console.WriteLine(image.Width);
Console.WriteLine(image.Height);

image.Save(output, new PdfOptions()
{
ResolutionSettings = new ResolutionSetting()
{
HorizontalResolution = 300,
VerticalResolution = 300
}
});

using var document = new Document(output);

var page = document.Pages[1];

Console.WriteLine(page.GetPageRect(true));

The width and height matches the original.

But when inspecting the images in Adobe Acrobat the dpi of the raster images have been reduced to 72dpi? Seems the ResolutionSettings isn’t doing anything.

image.png (437.4 KB)

Test files:

^ also the dropshadow in this image isn’t transferred to the PDF.

@nielsbosma, I investigated your issue and created the related task.
When it will be fixed, you’ll get a notification.
PSDNET-1379 - ResolutionSettings do not apply on export from PSD to PDF