web stats
Document Writer (PDF) Image rotate - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 01-16-2015, 01:24 AM
bobekos bobekos is offline
OBX.1 Kenobi
Join Date: Oct 2014
Posts: 26
bobekos is on a distinguished road
Default Document Writer (PDF) Image rotate

Hi everyone,

i put a image in my document writer. The html tag is:

PHP Code:
<img src="file:////C:/Barcode.png" width="66" height="103" alt="" align="right"/> 
Everything is working. But i need to rotate the image by 90 degree. I have already test some css styles and classes.Unsuccessfully.

PHP Code:
<style type="text/css">
rotate90 {
img src="file:////C:/Barcode.png" width="66" height="103" alt="" align="right" class="rotate90"/> 
PHP Code:
<img src="file://C:/barcode.png" width="66" height="103" alt="" align="center" style="transform:rotate(90deg)"/> 
In the browser, the image get rotated but in the PDF Document nothing happens.

I hope someone can help me
Reply With Quote
Old 01-16-2015, 05:40 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,116
narupley is on a distinguished road

Unfortunately I don't think that is supported by the version of the libraries we're using (iText / Flying Saucer), or at least we're not tapping into the API in such a way as to make that possible.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote
Old 01-17-2015, 03:22 AM
bobekos bobekos is offline
OBX.1 Kenobi
Join Date: Oct 2014
Posts: 26
bobekos is on a distinguished road

That's what I thought.I read that the flaying saucer project supports only CSS 2.1 which can't be use to rotate something.Anyway thanks for the feedback..possibly i will create a external Java class with a rotate function and call it from a transformer before the document writer starts to work.
Reply With Quote
Old 01-18-2015, 12:49 AM
AlexToft AlexToft is offline
OBX.3 Kenobi
Join Date: Sep 2010
Location: Leeds, UK
Posts: 160
AlexToft is on a distinguished road

The Imagemagick convert tool is perfect for this kind of scenario. You can call as a native binary, or there are a number of Java interfaces for it. A rotate isn't complex, so could potentially be implemented in Java very quickly, or in JavaScript inside the transformer (although it would be a lot slower). All options are probably going to require writing out to a temp file somewhere though unless you actually modify the PDF writer itself.

Last edited by AlexToft; 01-18-2015 at 12:58 AM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 05:08 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation