Loading...

How to avoid the black border with Pdf ?

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

How to avoid the black border with Pdf ?

Postby louis » Tue Jul 07, 2009 1:51 pm

When I display a little pdf file (a small picture), a black border is automatically added. So I erase it with CropWhiteBorders then AddBorders(x, vbWhite). No problem. After that, I add some text in the picture.

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 !
louis
 
Posts: 49
Joined: Tue Apr 28, 2009 6:18 pm

What does represent the pixel parameter in CropBordersEX ?

Postby louis » Tue Jul 07, 2009 3:15 pm

When using 1, the complete border is erased...
louis
 
Posts: 49
Joined: Tue Apr 28, 2009 6:18 pm


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron