Keep RO Link for RO Images

Changed AddRtfText to public
Center figures in the PDF
Added debug output for figures.
This commit is contained in:
Rich
2016-11-04 13:22:54 +00:00
parent c6da832041
commit c014652d90
3 changed files with 21 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ namespace Volian.Print.Library
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer;
float left = x + Offset.X;
float top = y + Offset.Y;
float top = y + Offset.Y+ 12;
float bottom = top - height;
image.ScaleAbsoluteWidth(width);
image.ScaleAbsoluteHeight(height);
@@ -204,6 +204,20 @@ namespace Volian.Print.Library
cb.Stroke();
}
if (textLayer != null) cb.EndLayer();
if (PdfDebug)
{
// be very careful around the following line, if the cursor 'touches'
// NextTextAtCounter, it is incremented and the 'next' value may not be what
// was seen as the UniqueNumber in the pdf.
int next = NextTextAtCounter;
// buffer (unnecessary comments) so
// that cursor does NOT touch 'NextTextAtCounter'
// as easily
//if (InList(next,2958, 2961)) Console.WriteLine("Stop at UniqueNumber");
string dbt = string.Format("[{0}]{1}", next, debugText ?? "");
DrawPdfDebug(cb, left, top, left + width, top-height, dbt, 0);
}
return bottom;
}
private static float _GridTopAdjust = -10;