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

Free Support Forum - aspose.com

Contents of images are swapped on every page

I'm having a weird problem when trying to loop through all images in a pdf and replace them with a jpeg-version of the same image. On pages with more than 1 image the contents of the images are swapped (se the attached file to illustrate this problem). I use the following code and the newest version of aspose.pdf (6.6.0.0) :

Public Shared Function ConvertPDFToPDF(ByRef inputStream As Stream) As MemoryStream
    Dim pdfDocument As New Aspose.Pdf.Document(inputStream)
    For Each page As Aspose.Pdf.Page In pdfDocument.Pages
        Dim idx As Integer = 1
        For Each image As Aspose.Pdf.XImage In page.Resources.Images
            Using imageStream As New MemoryStream()
                image.Save(imageStream, ImageFormat.Jpeg)
                page.Resources.Images.Replace(idx, imageStream)
                idx = idx + 1
            End Using
        Next
    Next
    Dim outputStream As New MemoryStream()
    pdfDocument.Save(outputStream)
    Return outputStream
End Function

Hi Bjarke,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and template file.

I am able to reproduce the issue you mentioned. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-33183. We will notify you via this forum thread regarding any update against your issue.

Thank You & Best Regards,

Any news in this case? Do you have an estimated date for when this is fixed?

Hi Bjarke,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for being patient.

Our development team is looking into your issue and will share their feedback soon. I have asked the development team to share the details and ETA regarding this issue. I will update you as soon as I get a feedback from their side.

Thank You & Best Regards,

Hi Bjarke,<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

I have received
an ETA update regarding your reported issue and the fix for your reported issue
will be part of our upcoming official release of Aspose.Pdf for .NET v6.8 (to
be released in March 2012). You will be notified via this forum thread once the
new release is available for download.<o:p></o:p>

Sorry for
the inconvenience,

Thanks for your patience. Please note that the issues you have found earlier (filed as PDFNEWNET-33183) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.