Loading...

Delete

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

Delete

Postby flado » Wed Feb 10, 2010 5:29 pm

Hi
I have a problem deleting an image file after editing it. Here's what I do to edit (add text) to the multi page tiff:
Code: Select all
        Procedure pAddVernr Integer iVernr
            String sVernr sFilePath sPDFDir sImage
            Integer iPicStatus iImage iWidth iLength
            Boolean bOK bMultiPage
            Move ("Vernr: " + (String(iVernr))) to sVernr
            Move (Length(sVernr)) to iLength
            Get ComGetNativeImage of oGdViewer1 to iImage
            Get ComTiffIsMultiPage of oGdImaging1 iImage to bMultiPage
            If (bMultiPage) Begin
                Get psCurrentImage of oLREB0100 to sImage
                Get ComCreateImageFromFile of oGdImaging1 sImage to iImage
            End
            Get ComGetWidth of oGdImaging1 to iWidth
            Get ComDrawText of oGdImaging1 sVernr 1350 5 14 OLEFontStyleBold OLEBlack "ARIAL" False to iPicStatus
            Get ComSetNativeImage of oGdViewer1 iImage to iPicStatus
            Get psPDFDir of oLREB0100 to sPDFDir
            Move (String(iVernr)) to sVernr
            Move (Trim(sPDFDir)) to sPDFDir
            If ((Pos(":", sPDFDir)) or (Pos("\\", sPDFDir))) Begin
                Move (sPDFDir + "\" + sVernr + ".pdf") to sFilePath
            End
            Else Move (sPathDatabase + sPDFDir + sVernr + ".pdf") to sFilePath
            If (bMultiPage) Begin
                Get ComPdfCreateFromMultipageTIFFEx of oGdImaging1 iImage sFilePath "" "" "" "" "" OLEPdfEncryptionNone OLEPdfRightUndefined "" "" to iPicStatus
                Get ComTiffCloseNativeMultiPage of oGdImaging1 to iPicStatus
                Get ComCloseImage of oGdImaging1 iImage to iPicStatus
            End
        End_Procedure


I then try to remove the tiff file (as I have saved it as a pdf):
Code: Select all
        Procedure pDelete
            String sImage sTest
            Boolean bFileExist bOK
            Integer iPicStatus
            Get psCurrentImage of oLREB0100 to sImage
            File_Exist sImage bFileExist
            Send ComCloseImage of oGdViewer1
            If (bFileExist) Get vDeleteFile sImage to bOK
            Set psCurrentImage of oLREB0100 to ""
            Send pUpdateList of oList1
            Send OnChange of oList1
        End_Procedure


I cannot delte the tiff file here, it seems it is being held by one of the GD objects, I have tried to release it but does not succeed. Can you please help me?
sincerely
/Leif Angestam
flado
 
Posts: 5
Joined: Wed Jan 20, 2010 1:40 pm

Re: Delete

Postby flado » Wed Feb 10, 2010 11:21 pm

Oh I forgot to say that I use Visual DataFlex and the GdPicture Pro ActiveX for this...
thanks
/Leif
flado
 
Posts: 5
Joined: Wed Jan 20, 2010 1:40 pm

Re: Delete

Postby flado » Fri Feb 12, 2010 3:08 pm

Hi
Is there anyway anyone can help me out with this. it is really appreciated.
thank you
/Leif
flado
 
Posts: 5
Joined: Wed Jan 20, 2010 1:40 pm

Re: Delete

Postby Loïc » Fri Feb 12, 2010 5:22 pm

Hi Leif,

Using the latest version I was unable to reproduce your problem.

Your code is a bit incomprehensible for me. If you are able to reproduce the problem in a simple vb6 app we will be able to bring more investigation.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron