Problems converting a psd


#41

Hello we tried with aspose.imaging 18.4 but it seems nothing is changed.

Again the resulting pdf/png created from psd are of very poor quality and wrong text layers
+
Conversion of psd to pdf and then from generated pdf to a png causes an extra white space issue.
+
the introduction of the option
_PngDeviceP.RenderingOptions = new Aspose.Pdf.RenderingOptions() { ScaleImagesToFitPageWidth = true };
causes a wrong resize in all PDF documents converted into images.

Archive.zip (265.2 KB)

3.9 libraries did not have these problems.
Please let us know as soon as you can.
Thanks


#42

@BooleServer,

Thank you for your feedback. We are looking in to it. We will update you soon.


#43

@BooleServer

Thanks for your inquiry.

We have tested PDF to PNG Conversion while using Aspose.PDF for .NET 18.5 with following code snippet and were unable to notice white space issue in the output PNG file.

Document pdfDocument = new Document(dataDir + "presentazione generale ritaglioLight.psd export.pdf");
for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
{
 string tmpImgToInsert = pageCount + "_" + DateTime.Now.Ticks + ".png";
 using (FileStream imageStream = new FileStream(dataDir + tmpImgToInsert, FileMode.Create))
 {
  // Create Resolution object
  Resolution resolution = new Resolution(120);
  // Create PNG device with specified attributes
  PngDevice pngDevice = new PngDevice(resolution);
  pngDevice.RenderingOptions = new RenderingOptions() { ScaleImagesToFitPageWidth = true };
  // Convert a particular page and save the image to stream
  pngDevice.Process(pdfDocument.Pages[pageCount], imageStream);
  imageStream.Close();
 }
}

1_636625154124415880.jpg (52.7 KB)

For your reference, an output image has also been attached. Could you please try Aspose.PDF for .NET 18.5 in your environment and share with us in case you face any other issue. We will further proceed to assist you accordingly.


#44

With 18.5 seems to be ok with the extra white space problem.
Remain the poor quality problem…original blu layers turned to grey, text layers and so on
We’ll do more test with 18.5 for the extra space in the next days.


#45

@BooleServer

As soon as earlier logged issue i.e. IMAGINGNET-2520 gets resolved, we will definitely update you within this forum thread. Please spare us little time.

Please take your time to further test the scenarios, and let us know in case you face any issue.


#46

Hello again, with aspose.pdf 18.6 our customers experience some problems converting pdf files into images, and we noticed also this bad conversion for example converting some documents (eg PPTX) into pdf and then from generated pdf to image (direct conversion from pptx to png works good) but in any case there is a problem in conversion from som pdf documents into png.
So it seems to be again this problem regarding PDFNET-40901 or something related.
We attach some sample files archive.zip (6.5 MB)
with this kind of problem.

the problem is the same: with this code:

            Aspose.Pdf.Devices.Resolution ResolutionP = new Aspose.Pdf.Devices.Resolution(m_iResolution);
            Aspose.Pdf.Devices.PngDevice PngDeviceP = new Aspose.Pdf.Devices.PngDevice(ResolutionP);
            PngDeviceP.RenderingOptions = new Aspose.Pdf.RenderingOptions() { ScaleImagesToFitPageWidth = true };
            PngDeviceP.Process(((Aspose.Pdf.Document)m_oDocument).Pages[++_iPageIndex], _oOutputStream);

commenting the ScaleImagesToFitPageWidth option it goes ok, but this option was inserted for solving the problems we are discussing in this thread…

Please solve it as soon as possible.


#47

@BooleServer

Thanks for getting back to us.

Would you kindly share the value of m_iResolution variable, so that we can test the scenario accordingly.


#48

Of course, is 120


#49

@BooleServer

Thanks for sharing requested details.

We have tested the scenario with your 3 files and observed that the API was not generating correct images when we used ScaleImagesToFitPageWidth option as true. However the output images were fine when we removed usage of this option.

Following issues have been logged in our issue tracking system, for your PDF documents. We will further investigate these issues and inform you in case of any progress towards their resolution. Please be patient and spare us little time.

PDFNET-44937 - (May 2018_StrategicPlanDashboard.pptx export.pdf export.pdf_)
PDFNET-44938 - (Income & Expenditure May 2018.pdf export_withoutoption.pdf)
PDFNET-44939 - (BrochureQuadr3ante_interno_RAST.pdf export.pdf)

We are sorry for the inconvenience.