TinyButStrong - the PHP Template Engine
Categories > OpenTBS general LibreOffice >

OpenTBS v1.1: 2 problems

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Vincent
Date: 2009-12-21
Time: 13:53

OpenTBS v1.1: 2 problems

Hello,

I am using TBS 3.5.1 and OpenTBS -plugin 1.1, and I have currently these 2 problems:

1. Linked images are not shown upon merging. I have set a background image that has the print-option 'do not print background' set. This way I can use 1 template for both printing onto pre-printed stationary and outputting to PDF (with the backgound image shown).

If I don't link the background image, OpenTBS merges fine, but since the image is 140KB, I would like to keep it linked in order to not waste space (in the long run).

2. If I specify a $file_name in the '$TBS->Show(OPENTBS_DOWNLOAD, $file_name);', then all the / are transformed into _ - Of course this means I cannot set a default path for the newly generated document to open and thus it always opens as read-only.

I don't know if these are bugs or if I can solve them myself - any help is appreciated!
By: Skrol29
Date: 2009-12-21
Time: 16:15

Re: OpenTBS v1.1: 2 problems

Hi Vincent,

1)
By default, OpenOffice saves links with a relative path. This means if the computer that hosts the web server is different from the computer of the internet user, then the link is broken and the image doesn't display.
You can change the type of link in the option screen: menu Tools/Options, item "Load/Save", "General", uncheck option "save URL relatively to the file system", and uncheck option "save URL relatively to Internet".
- If the image path is local to the computer, then the saved path is affected by this option.
- If the image is an URL path, then it is also affected by this option, but unfortunately OpenOffice put the internet image in a local cache, and saves the local path for the image. You can workaround this problem by manually edit the "style.xml" file and change the tag <style:background-image>.
- If the image is a path to a local network, then the path is always saved correctly because there is no relative path in this case.

2)
When you choose to output the file as a download-able file, then you cannot give a path. This is out of context here. The server cannot and must not know your directory tree. All files downloaded from Internet have only a name without path.



By: Vincent
Date: 2009-12-21
Time: 17:04

Re: OpenTBS v1.1: 2 problems

Both answers are correct and enabled me to work around them!

So now I save the file in the local dir, chgrp and chmod the file and then refresh the page, enabling me to click the new file and finish it off.

I like your framework very much - next on my list is a shot at a plugin to enable LDAP-lookups. Is there any way we can donate for 'the cause'?
By: Skrol29
Date: 2009-12-22
Time: 15:29

Re: OpenTBS v1.1: 2 problems

Hi,

> Is there any way we can donate for 'the cause'?

Let know that TBS and OpenTBS are nice :)