Image Black (negative image)

Hi

I Bought the License Aspose Total, and I used Aspose.pdf.kit in my projet in order to extract image from pdf file (scan source)

After extraction, i insert image into my Apose.Words Document. When I open my document into browser, inserted images was negative. Why ??

if you want test with my source, i've joined the file (exemple.pdf)

You can see my code

Dim LicenseFile As String = MapPath("bin") + "\Aspose.Total.lic"

Dim licenseFilePDFKit As String = MapPath("bin") + "\Aspose.Total.lic"

If System.IO.File.Exists(LicenseFile) AndAlso System.IO.File.Exists(licenseFilePDFKit) Then

Dim License As Aspose.Words.License = New Aspose.Words.License

License.SetLicense(LicenseFile)

'PDF KIT

Dim licensePDFKit As Aspose.Pdf.Kit.License = New Aspose.Pdf.Kit.License

licensePDFKit.SetLicense(licenseFilePDFKit)

End If

***************************************************************************************

Dim DocImage As Aspose.Words.Document = New Aspose.Words.Document

Dim monDocBuilder As Aspose.Words.DocumentBuilder = New Aspose.Words.DocumentBuilder(DocImage)

With monDocBuilder.PageSetup

.LeftMargin = 0

.RightMargin = 0

.TopMargin = 0

.BottomMargin = 0

End With

Dim Extractor As Aspose.Pdf.Kit.PdfExtractor = New Aspose.Pdf.Kit.PdfExtractor

Extractor.BindPdf(MonDocPdf)

Extractor.StartPage = 1

Extractor.ExtractImage()

While Extractor.HasNextImage

Dim mst As IO.MemoryStream = New IO.MemoryStream

Extractor.GetNextImage(mst, Drawing.Imaging.ImageFormat.Jpeg)

Dim img As Drawing.Image = Drawing.Image.FromStream(mst)

monDocBuilder.InsertImage(mst)

End While

DocImage.Save("Directview.doc", Aspose.Words.SaveFormat.Doc, Aspose.Words.SaveType.OpenInBrowser, Me.Response)

Hi,

I have tested this issue at my end and noticed that the black image is produced by Aspose.Pdf.Kit. I have logged this issue as PDFKITNET-18202 in our issue tracking system. Our team will look into this issue and you will be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,