Rotate Text in Document Template

0
I would like to rotate a static label in a table cell in a document template so that the text is vertical. Anyone have experience doing this? Any pointers greatly appreciated.
asked
2 answers
0

Try adding this style to your label:

-ms-transform: rotate(90deg); 
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
answered
0

Herman

I tried your suggestion which results in the following error in the console...I added the css above to the style field on the static label - maybe it should go somewhere else?

An error has occurred while handling the request. [User 'mxuser' with session id '6de4538b-f70a-46ba-9d9b-f35d898af821' and roles 'ClientAdmin, ClientUser']

com.mendix.modules.microflowengine.MicroflowException: Error during parsing custom style '-ms-transform' with value 'rotate(90deg)' for widget label13 at Job.PageTriggerGeneratePDFDocument (DocumentExport : 'Generate PDF (.pdf) document using template MxModulePDFTemplate'')

Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:158)

Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Error during parsing custom style '-ms-transform' with value 'rotate(90deg)' for widget label13 at com.mendix.documentexporter.focomponents.FOComponent.convertToFOAttributes(FOComponent.java:104)

Caused by: org.w3c.dom.DOMException: INVALIDCHARACTERERR: An invalid or illegal XML character is specified. at org.apache.xerces.dom.CoreDocumentImpl.createAttribute(Unknown Source) at org.apache.xerces.dom.ElementImpl.setAttribute(Unknown Source) at com.mendix.documentexporter.focomponents.FOComponent.convertToFOAttributes(FOComponent.java:101) at com.mendix.documentexporter.focomponents.FOComponent.addCSSStyleToFOElement(FOComponent.java:79) at com.mendix.documentexporter.focomponents.StaticLabel.generateFO(StaticLabel.java:34) at com.mendix.documentexporter.focomponents.DocumentTemplateRepresentator.render(DocumentTemplateRepresentator.java:327) at com.mendix.documentexporter.focomponents.Table.generateFO(Table.java:71) at com.mendix.documentexporter.focomponents.DocumentTemplateRepresentator.render(DocumentTemplateRepresentator.java:327) at com.mendix.documentexporter.focomponents.Table.generateFO(Table.java:71) at com.mendix.documentexporter.focomponents.DocumentTemplateRepresentator.render(DocumentTemplateRepresentator.java:327) at com.mendix.documentexporter.focomponents.Dataview.generateFO(Dataview.java:34) at com.mendix.documentexporter.focomponents.DocumentTemplateRepresentator.render(DocumentTemplateRepresentator.java:327) at com.mendix.documentexporter.focomponents.Table.generateFO(Table.java:71) at com.mendix.documentexporter.focomponents.DocumentTemplateRepresentator.render(DocumentTemplateRepresentator.java:327) at com.mendix.documentexporter.focomponents.DocumentTemplateRepresentator.generate(DocumentTemplateRepresentator.java:131) at com.mendix.documentexporter.documents.FOBasedDocument.exportToInputStream(FOBasedDocument.java:80) at com.mendix.documentexporter.DocumentGenerator.exportToInputStream(DocumentGenerator.java:112) at com.mendix.documentexporter.DocumentGenerator.exportToIMendixObject(DocumentGenerator.java:79) at com.mendix.documentexporter.actions.microflow.DocumentExportAction.execute(DocumentExportAction.scala:74) at com.mendix.documentexporter.actions.microflow.DocumentExportAction.execute(DocumentExportAction.scala:17) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:49) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:193) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.execute(InternalCore.java:263) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:151) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:153) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:147) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:140) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

answered