But, when I want to add this picture (with the text) on a new Pdf file I'm creating (one standard A4 page), using PdfAddImageFromGdPictureImage then PdfDrawImage, the small picture and the text appear but the black border is coming back.
How to do not add this border ? At that time I cannot use CropWhiteBorders then AddBorders (the small picture is somewhere in the Pdf page and the border overwrites the page contents).
I think we have to use CropBorders before PdfAddImageFromGdPictureImage, but the real question is : why a black border is systematically added ? Even we have created a white border.
- Code: Select all
' display
status = GDVA.DisplayFromPdfFile(fileA$) ' a big picture
status = GDVB.DisplayFromPdfFile(fileB$) ' the small picture
GDI.SetNativeImage (GDVB.GetNativeImage)
' the white border is erased
status = GDI.CropWhiteBorders
' a white (transparent) border is added
status = GDI.AddBorders(24, vbWhite)
status = GDVB.SetNativeImage(GDI.CreateClonedImage(GDI.GetNativeImage))
GDI.CloseNativeImage
' adding text
' ...
' make Pdf
GDIPdf.PdfNewPdf(path, "", "", "", "")
ImageF = GDIPdf.PdfAddImageFromGdPictureImage(GDVA.GetNativeImage) ' the big picture
ImageS = GDI_File.PdfAddImageFromGdPictureImage(GDVB.GetNativeImage) ' the small picture
' a black border is added !
