Changed code to update image reference to use href instead of bname attribute name

Added header information to xml for image link
Replace bname with xlink:href for image references
Added RNOWidthAdj flag for Braidwood
This commit is contained in:
Rich 2014-01-08 20:05:45 +00:00
parent 6cb0edbf98
commit 21301832e0
4 changed files with 5 additions and 5 deletions

View File

@ -505,8 +505,8 @@ namespace fmtxml
Bitmap bmp= new Bitmap(str);
bmap.SetAttribute("width",bmp.Width.ToString()+"px");
bmap.SetAttribute("height",bmp.Height.ToString()+"px");
//bmap.SetAttribute("xlink:href",str);
bmap.SetAttribute("bname",str);
bmap.SetAttribute("xlink:href", str);
//bmap.SetAttribute("href", str);
return bmap;
}

View File

@ -162,7 +162,7 @@ namespace fmtxml
{
sb.Append("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n");
sb.Append("<!--Proprietary Information - Copyright 2012 - Volian Enterprises, Inc. All rights reserved.-->\r\n");
sb.Append("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"8in\" height=\"10in\" viewBox=\"0 0 576 720\">\r\n");
sb.Append("<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" width=\"8in\" height=\"10in\" viewBox=\"0 0 576 720\">\r\n");
sb.Append(string.Format(" <desc>{0}</desc>\r\n", file.Name.ToLower().Replace(".rtf", "")));
svg = true;
return svg;
@ -234,7 +234,7 @@ namespace fmtxml
string bmWidth = bmp.Width.ToString() + "px";
string bmHeight = bmp.Height.ToString() + "px";
//Console.WriteLine("'{0}'", bmFileName);
sb.Append(string.Format(" <image x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\" bname=\"{4}\"/>\r\n",
sb.Append(string.Format(" <image x=\"{0}\" y=\"{1}\" width=\"{2}\" height=\"{3}\" xlink:href=\"{4}\"/>\r\n",
TwipsToPointsX(bitmapMatch.Groups[1].Value),
TwipsToPointsY(bitmapMatch.Groups[2].Value),
bmWidth,

View File

@ -170,7 +170,7 @@ namespace fmtxml
fsty = (float) System.Convert.ToDouble(cmdele.GetAttribute("y"));
int scale=1;
if (cmdele.HasAttribute("scale")) scale = System.Convert.ToInt32(cmdele.GetAttribute("scale"));
string fname = cmdele.GetAttribute("bname");
string fname = cmdele.GetAttribute("xlink:href");
Bitmap bm = new Bitmap(fname);
Image img = Image.FromFile(fname);
rc = new RectangleF();

Binary file not shown.