Editing background of template

Discuss the presentation application

Editing background of template

Postby JJJoseph » Mon Dec 22, 2008 7:13 am

How do I extract the background of one of the pre-made Impress templates? I'd like to modify the template and save it as a new template. There's nothing in the Help department.
OOo 3.4.X on MS Windows 7 + Blackberry 10
JJJoseph
 
Posts: 173
Joined: Thu Dec 13, 2007 2:55 am
Location: Vancouver, Canada

Re: Editing background of template

Postby acknak » Mon Dec 22, 2008 5:04 pm

Why do you want to "extract" a background? Just click on "Master Pages" in the task panel at the right of the Impress window; all of the backgrounds (and some more, I think) from the included templates are there. Just click on the one you want.

If you really want to get at the template files, they are in directories .../basis3.0/share/template/en-US/layout and .../.../presnt on my Linux system; I expect that the location will similar for Windows or Mac, just change the beginning. Try a file search for a folder named 'presnt'--that should get you started, then go up one step and over into 'layout'.

You may not be able to extract a background for some of the presentation templates: they may be based on an area-fill, not a background image.

As an alternative approach, you could make a slide with one of the templates, then export the slide as an image, then import the image into a new presentation as the background.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Editing background of template

Postby JJJoseph » Fri Dec 26, 2008 7:33 am

Yes, I can see the master templates, but they're still templates. How do i get at the background image to change it? All I get is the aggregated template, with no access to the components. Same with the "presnt" folder (and the higher folders in the sequence). It's full of .otp templates only. Higher directories are filed with .otg,.ott,&.ots templates.

I'm thinking that the templates are likely built-up from components like .jpg files, etc. but I can't figure out how it's done. I'd like to do this to make company-specific templates for others to use, and then delete all the previous generic templates.
OOo 3.4.X on MS Windows 7 + Blackberry 10
JJJoseph
 
Posts: 173
Joined: Thu Dec 13, 2007 2:55 am
Location: Vancouver, Canada

Re: Editing background of template

Postby acknak » Fri Dec 26, 2008 7:03 pm

Let's get specific. Pick a template that you're interested in, and then we can talk specifically about how to get access to the background for that template.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Editing background of template

Postby JJJoseph » Wed Jan 07, 2009 7:57 am

acknak wrote:Let's get specific. Pick a template that you're interested in, and then we can talk specifically about how to get access to the background for that template.


OK, let's try "desert.otp". I want to add some figures to the background.

PS: I apologise for the time lag over the holidays. I'm back at my desk now
OOo 3.4.X on MS Windows 7 + Blackberry 10
JJJoseph
 
Posts: 173
Joined: Thu Dec 13, 2007 2:55 am
Location: Vancouver, Canada

Re: Editing background of template

Postby acknak » Wed Jan 07, 2009 5:51 pm

No problem--Happy 2009!

Sorry, I don't have a template called "desert.otp". Is is something you downloaded?

Well, I found a template with that name here: http://documentation.openoffice.org/Samples_Templates/User/template_2_x/impress/index.html that looks like this:
thumbnail.png
thumbnail.png (33.49 KiB) Viewed 10686 times

If that's the one you mean, then ok, I see what you're after. I never noticed that before: a presentation that has the background set as a bitmap image does not leave any way to access or select the image. You can change the background to something else, but you can't get the background out to work with the image.

In that case, the simplest thing is to just open the document in a Zip archive utility (all OOo/ODF files are actually Zip archives) and extract the image from the archive.

Here's what I see in that file:
    $ unzip -l Desert.otp
    Archive: Desert.otp
      Length     Date   Time    Name
    -------- ---- ---- ----
    56 10-30-06 20:47 mimetype
    0 10-30-06 20:47 Configurations2/statusbar/
    0 10-30-06 20:47 Configurations2/accelerator/current.xml
    0 10-30-06 20:47 Configurations2/floater/
    0 10-30-06 20:47 Configurations2/popupmenu/
    0 10-30-06 20:47 Configurations2/progressbar/
    0 10-30-06 20:47 Configurations2/menubar/
    0 10-30-06 20:47 Configurations2/toolbar/
    0 10-30-06 20:47 Configurations2/images/Bitmaps/

    965189 10-30-06 20:47 Pictures/100000000000040000000300438F4949.png
    8861 10-30-06 20:47 content.xml
    53147 10-30-06 20:47 styles.xml
    1225 10-30-06 20:47 meta.xml
    39926 10-30-06 20:47 Thumbnails/thumbnail.png
    10003 10-30-06 20:47 settings.xml
    2084 10-30-06 20:47 META-INF/manifest.xml
    -------- -------
    1080491 16 files
You can extract the files in the Pictures folder and do whatever you need to do.

If you edit the picture (you need some other software for that; OOo doesn't do image editing), you can keep the same name and replace the image in the original document file, again using your zip archive tool.

Alternatively, you can modify the image and rename it (e.g. if you wanted to use it with other projects), then change the background of the presentation to use the edited image: (in Impress) right-click on the slide background > Slide > Set Background Picture for Slide.

Here's a version of that template with a colorized (and much smaller) background image: Desert_brown.otp.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Editing background of template

Postby JJJoseph » Thu Jan 08, 2009 1:45 am

Exactly! That's what I was trying to do. There's no clue in the Help docs that the template is a zip file. I'm still not clear what the rest of the bits are, or how they're created, in case I wanted to create my own templates. Is there an OO application for creating templates?

Also, is there anything in the Help docs that explains this? I couldn't find anything.

Regardless, I'm now able to modify existing templates, so many thanks!
OOo 3.4.X on MS Windows 7 + Blackberry 10
JJJoseph
 
Posts: 173
Joined: Thu Dec 13, 2007 2:55 am
Location: Vancouver, Canada

Re: Editing background of template

Postby acknak » Thu Jan 08, 2009 6:47 am

Is there an OO application for creating templates?

Yes, it's called "Impress" ;-)

A template document is really just a plain document--well, almost. The main things that make it special are: 1) the file is marked as a template instead of just a regular document, and 2) the file is in a special location so that OOo knows to include it in the list of templates, and even the special location is optional.

There's nothing in the help about the file structure, as that's really nothing you need to know to use the software.

If you want to know more about presentation templates, I suggest a look at the Impress Guide.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Editing background of template

Postby JJJoseph » Tue Jan 13, 2009 4:00 am

acknak wrote:A template document is really just a plain document--well, almost. The main things that make it special are: 1) the file is marked as a template instead of just a regular document, and 2) the file is in a special location so that OOo knows to include it in the list of templates, and even the special location is optional.


It's in the "--well, almost" part that the answer lies! You demonstrated that the template is a "zip" file. How does the zip process work that results in an "odt" result? Anything I try results in a "zip" file.

If you want to know more about presentation templates, I suggest a look at the Impress Guide.


Went there to give it a try, but even though I have Java 6, I get the following if I try to search anything related to "template":

An error has occured: java.io.IOException: Lock obtain timed out: Lock@/var/lib/tomcat5.5/webapps/ROOT/WEB-INF/work/cache-dir/lucene-e0d8e2552e2e1d45d7e9207cf12d9cd9-commit.lock

I'm not expert at decoding Java error messages. Also as you can see, I'm not very successful figuring out OO on my own. So I'm back here again :-)
OOo 3.4.X on MS Windows 7 + Blackberry 10
JJJoseph
 
Posts: 173
Joined: Thu Dec 13, 2007 2:55 am
Location: Vancouver, Canada

Re: Editing background of template

Postby acknak » Tue Jan 13, 2009 5:00 am

That's not a Java error on your system, it's an error on the system that hosts the wiki. It's probably just a temporary condition--it worked for me just now.

Unfortunately, it's not a search of the particular Guide that you're interested in, it's a search of the entire OOo wiki. So, it may give you a lot of results that don't have anything to do with Impress.

Anyway, you can just skip right to Chapter 2: Using Slide Masters, Styles, and Templates.

Anything I try results in a "zip" file.

That's just a lack of flexibility in the zip utility. A zip archive is just a file, and you can name a file anything you like. If you can't configure your archive tool to create the archive with a ".odp" or ".otp" suffix on the file name, just create it as "mytemplate.zip" and then rename the file. If you're working in Windows, you probably need to have it show you the file extensions. Otherwise, Windows will ruin whatever name you give it by automatically tacking on the extension it thinks the file should have.

You can also come at the problem from the other direction: in OOo, just do File > Open, select your file.zip, and OK. OOo does not care what the file name is, as long as the contents match what's required for a valid ODF document.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Editing background of template

Postby OrlandoRider » Mon Jul 01, 2019 11:31 pm

I too would like to "save" the image from a template, so I can modify it.

WInZip is apparently not "robust" enough to extract the PNG file. Do you have any other suggestions?
OpenOffice 4.1.6 on Windows 10
OrlandoRider
 
Posts: 2
Joined: Mon Jul 01, 2019 11:29 pm

Re: Editing background of template

Postby Hagar Delest » Fri Jul 05, 2019 10:43 am

7zip works just fine for that.
AOO 4.1.7 on Xubuntu 19.10 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28621
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Editing background of template

Postby OrlandoRider » Tue Jul 16, 2019 3:49 am

Thanks - I'll look in to 7zip
OpenOffice 4.1.6 on Windows 10
OrlandoRider
 
Posts: 2
Joined: Mon Jul 01, 2019 11:29 pm


Return to Impress

Who is online

Users browsing this forum: No registered users and 7 guests