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:
https://we.tl/t-lN67GpATU7
^ also the drop-shadow in this image isn’t transferred to the PDF.