C#/ MigraDoc - 粗体表列

时间:2016-10-19 04:03:36

标签: c# migradoc

我有一个包含两列和多行的表格,我需要将第一列加粗。我尝试使用ExceptionHandlerExceptionResolver | Failed to invoke @ExceptionHandler method: public tmn.kiosk.processor.common.controller.model.BaseControllerResponseEntity tmn.kiosk.processor.common.controller.GlobalExceptionHandler.handleException(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.Exception) java.lang.NullPointerException at tmn.kiosk.processor.common.aspect.LoggingAspect.performTransactionIdCollectingFromGlobalExceptionHandler(LoggingAspect.java:135) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor356.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0] at java.lang.reflect.Method.invoke(Method.java:607) ~[?:2.6 (08-23-2013)] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) ~[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) ~[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68) ~[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) ~[spring-aop-4.0.5.RELEASE.jar:4.0.5.RELEASE] at tmn.kiosk.processor.common.aspect.LoggingAspect.performLogging(LoggingAspect.java:27) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0] at java.lang.reflect.Method.invoke(Method.java:607) ~[?:2.6 (08-23-2013)] ,但它不会将字体更改为粗体。如果我使用column.Format.Font.Bold = true;,但大胆的风格不起作用。有人可以告诉我我做错了什么吗?这是创建表的代码片段:

column.Format.Font.Colors = Colors.Blue;

1 个答案:

答案 0 :(得分:1)

只是一个猜测:我认为问题是字体'Calibri Light'。 “Calibri Light”没有大胆的版本,MigraDoc不知道在需要“Calibri Light Bold”时应该使用'Calibri Regular'。

我希望当您将字体名称更改为“Calibri”或“Arial”或任何其他支持Regular和Bold的字体时,MigraDoc将正确处理此问题。

为第一列设置字体名称“Calibri”应该可以解决问题。