Forums | Mahara Community
Support
/
Height of pdf
06 September 2014, 7:18
Hello,
I am using 1.9.0 and try to embed PDF block. But what does not fit is the heigt of the pdf when using 1:1, It remains the same in 30:30:30 or 70:30 or 100.
Could you please give me some advice to handle this,, to get the appropriate height to chosen width.
Thanks and Regards
Conrad
10 September 2014, 0:48
Hello,
anyone out there who could handle this problem?
Regards, Conrad
10 September 2014, 8:46
Hi Conrad,
This is tricky problem if I recall correctly as the height of the block is created first and then the pdf is rendered within it. So we don't "know" the height of the pdf page straight off.
So to do this one would need to add some javascript that gets fired after the pdf has been rendered to readjust the mahara block to be the same height as a page within (+ some padding) but without the pdf resizing itself now that it's container is now smaller.
To alter the javascript for this one would need to look within the folder:
artefact/file/blocktype/pdf/
and add something to the render_instance or the like
CheersRobert
12 September 2014, 3:04
Hi Robert,
thanks for your answer and information about the tricky challange.
Isn't there a chance to handle the size similar to Images, that way to fill width and height when using the block? This would be less comfortable than the solution you mentioned, but perhaps a work around could be a good intermediary solution.
Regards, Conrad
15 September 2014, 7:55
Hi Conrad,
I've added this issue to the bug tracker: https://bugs.launchpad.net/mahara/+bug/1369320
Feel free to add any more information to it that you think is useful - or if I've not described the issue correctly
Cheers
Robert