LoadAnnotationsFromXMP is not working

Discussions about annotation support.
Post Reply
hardikv
Posts: 43
Joined: Thu Jan 27, 2011 11:46 am

LoadAnnotationsFromXMP is not working

Post by hardikv » Fri Jul 27, 2012 12:05 pm

Hi all,

i have GDPIcture.net dll 8.5.28. i want to load annotation xmp file using LoadAnnotationsFromXMP() method in GDViewer control. i had tried belwo code but it is not working

Code: Select all

 OpenFileDialog OpenFileDialog1 = new OpenFileDialog();

            OpenFileDialog1.Title = "Save Annotations As XMP";
            OpenFileDialog1.CheckFileExists = false;
            OpenFileDialog1.Filter = "XMP|*.xmp";
            if (OpenFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                string FilePath = OpenFileDialog1.FileName;
                if (gdViewer1.LoadAnnotationsFromXMP(FilePath) != GdPictureStatus.OK)
                {
                    MessageBox.Show("Can't load annotations from " + FilePath);
                }
                
            }
i have used below code to save annotation to xmp. the file is generated but when i will try to use this XMP file to load inside gdviewer control using LoadAnnotationsFromXMP() method then it is not loaded inside GDViewer control.

Code: Select all

 SaveFileDialog SaveFileDialog1 = new SaveFileDialog();

            SaveFileDialog1.Title = "Save Annotations As XMP";
            SaveFileDialog1.CheckFileExists = false;
            SaveFileDialog1.OverwritePrompt = false;
            SaveFileDialog1.Filter = "XMP|*.xmp";
            if (SaveFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                string FilePath = SaveFileDialog1.FileName;
                if (gdViewer1.SaveAnnotationsToXMP(FilePath) == GdPictureStatus.OK)
                {
                    MessageBox.Show("Annotations succefully saved as XMP in " + FilePath);
                }
                else
                {
                    MessageBox.Show("Can't save annotations in " + FilePath);
                }
            }

Please help me to solve this problem.

Thanks

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: LoadAnnotationsFromXMP is not working

Post by Loïc » Fri Jul 27, 2012 2:26 pm

Hello,

Please download latest V8 release and check you annotation sample. We show a way to load/save annotation blob from XMP file format.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest