Posted 13 March 2022, 10:54 pm EST
Hi,
We are having 3 images, added into PDF file at Left, Center, Right respectively.
When Windows 10 is installed freshly and no other software is installed except .net framework.
We added all 3 images but Right side logo is not displayed. (its invisible on PDF file).
Though Left and Center Image is displayed properly.
With the same code snippet we don’t observed this issue on other system.
It is only occuring when we are using fresh PC without installing anything.
We are using following function:
private RenderObject GetPDFHeader(Font font)
{
if (SelectedUserSettings.IsLogoSelected)
{
string insertUserNameOnPDF = null;
RenderGraphics Leftlogo = null;
RenderGraphics Centerlogo = null;
RenderGraphics Rightlogo = null;
if (ToolSettingsData.Instance.ConfigData.AppSettings.LogoData.LeftLogo) { Leftlogo = GetLeftRenderedLogo(); } if (ToolSettingsData.Instance.ConfigData.AppSettings.LogoData.CenterLogo) { Centerlogo = GetCenterRenderedLogo(); } if (ToolSettingsData.Instance.ConfigData.AppSettings.LogoData.RightLogo) { Rightlogo = GetRightRenderedLogo(); } headerTable.Cells[rowIndex, 0].RenderObject = Leftlogo; headerTable.Cells[rowIndex, 0].Style.ImageAlign.AlignHorz = ImageAlignHorzEnum.Left; headerTable.Cells[rowIndex, 0].Style.ImageAlign.AlignVert = ImageAlignVertEnum.Center; headerTable.Cells[rowIndex, 2].RenderObject = Centerlogo; headerTable.Cells[rowIndex, 2].Style.ImageAlign.AlignHorz = ImageAlignHorzEnum.Center; headerTable.Cells[rowIndex, 2].Style.ImageAlign.AlignVert = ImageAlignVertEnum.Center; headerTable.Cells[rowIndex, 4].RenderObject = Rightlogo; headerTable.Cells[rowIndex, 4].Style.ImageAlign.AlignHorz = ImageAlignHorzEnum.Right; headerTable.Cells[rowIndex, 4].Style.ImageAlign.AlignVert = ImageAlignVertEnum.Center; rowIndex = rowIndex + 1; //Seperator headerTable.Cells[rowIndex, 0].Text = " "; headerTable.Cells[rowIndex, 0].SpanCols = 5; headerTable.Rows[rowIndex].Height = new Unit(5, UnitTypeEnum.Mm); rowIndex = rowIndex + 1; }
}
We add this returned rendered object as a child to C1 Print Document.
What will be the solution to display Right image on PDF file.