Im currently trying to read the annotations from a document, and burn them to a new transparent png image.
The problem is though that the annotations that have been loaded with XML aren't added.
If i try to add an annotation through method it works fine.
Is there something wrong with the XML data or is that a bug?
Code: Select all
GdPicturePDF pdf = new GdPicturePDF();
pdf.LoadFromFile(@"C:\Test\Test.pdf", false);
Int32 iId = pdf.RenderPageToGdPictureImage(72, true, true);
AnnotationManager am = new AnnotationManager();
GdPictureImaging oGdPictureImaging = new GdPictureImaging();
//Int32 iId = oGdPictureImaging.CreateGdPictureImageFromFile(@"T:\Temp\TSN\test.pdf");
am.InitFromGdPictureImage(iId);
am.AddAnnotationFromXML(arrow);
am.BurnAnnotationsToPage(false);
am.SaveAnnotationsToPage();
oGdPictureImaging.SaveAsPNG(iId, @"C:\Test\test.png");
Code: Select all
<Annotation>
<Type>AnnotationTypeLineArrow</Type>
<ID>624781a1-5013-4d96-9fc1-baf679ce793a</ID>
<Left>4.26917</Left>
<Top>7.77454</Top>
<Width>0.31844</Width>
<Height>0.9842</Height>
<Rotation>205.9388</Rotation>
<Opacity>1</Opacity>
<SquaredBox>False</SquaredBox>
<StrokeColor>-16777216</StrokeColor>
<FillColor>-16777216</FillColor>
<BorderWidth>0.05</BorderWidth>
<RadiusFactor>0</RadiusFactor>
<CreationTime>24-09-2014 16:53:02</CreationTime>
<ModificationTime>12-01-2016 14:48:25</ModificationTime>
<CanMove>True</CanMove>
<CanResize>True</CanResize>
<CanRotate>True</CanRotate>
<CanSelect>True</CanSelect>
<Printable>True</Printable>
<PreventBurning>False</PreventBurning>
<Visible>True</Visible>
<Fill>False</Fill>
<Stroke>True</Stroke>
<Zorder>4</Zorder>
<FlipX>False</FlipX>
<FlipY>True</FlipY>
<ArrowWidth>5</ArrowWidth>
<ArrowHeight>7</ArrowHeight>
<ArrowFilled>True</ArrowFilled>
</Annotation>
Kevin