fpvectorial-html: Adds support to missing images

git-svn-id: trunk@52201 -
This commit is contained in:
sekelsenmat 2016-04-15 12:28:58 +00:00
parent b0633c96d9
commit e8c2373bcd
2 changed files with 5 additions and 2 deletions

View File

@ -2624,6 +2624,8 @@ var
begin
inherited Render(ADest, ARenderInfo, ADestX, ADestY, AMulX, AMulY, ADoDraw);
if Document.GetPageCount() = 0 then Exit;
lPage := Document.GetPage(0);
lPageHeight := Round(lPage.Height);
lPage.GetNaturalRenderPos(lPageHeight, lMulY);

View File

@ -14,7 +14,7 @@ interface
uses
Classes, SysUtils, math, contnrs,
fpimage, fpcanvas, laz2_xmlread, laz2_dom, fgl,
fpimage, fpcanvas, laz2_xmlread, laz2_dom, fgl, lazfileutils,
// image data formats
fpreadpng,
// HTML can contain SVG
@ -232,7 +232,8 @@ begin
else if TvVectorialDocument.GetFormatFromExtension(lAttrValue, False) <> vfUnknown then
begin
lEmbVecImg := ADest.AddEmbeddedVectorialDoc();
lEmbVecImg.Document.ReadFromFile(lAttrValue);
if FileExistsUTF8(lAttrValue) then
lEmbVecImg.Document.ReadFromFile(lAttrValue);
end;
end;
'xlink:href':