• Welcome to the new forum! We upgraded our forum software with a host of new boards, capabilities and features. It is also more secure.
    Jump in and join the conversation! You can learn more about the upgrade and new features here.

Custom image won't show on brew sheet

Captain Damage

Apprentice
Joined
Feb 16, 2009
Messages
5
Reaction score
0
I've got a custom image to replace the standard glass-of-beer picture in the recipe design screen, but it won't show up on the brew sheet for printing. My picture is replaced on the brew sheet with the default glass picture. I'd like my label to print on the brew sheet. Any way to do this?
 
I believe you'll need to make your own custom brew sheet to print your own image.

Make a copy of NewBrewsheet.htm from the application's Resources and put it in your local Reports folder.
On Macintosh it's ~/Documents/Beersmith2/Reports/
Put your custom image in your local Reports folder also.
Modify your copy of NewBrewsheet.htm (rename it also)
Modify the following line:
<div class="glass"><img src='$GLASS' height='128' width='75' /></div>
  to:
<div class="glass"><img src='./yourimage.jpg' height='128' width='75' /></div>
The ./ tells your browser to look in the current folder where your .htm file resides.
You may need to play with the height or width to match the scale of your image.

You can add your custom report in Preferences.
You can then make it your default report in View - Set Default Report...

Hope this helps.
 
A trick some people (including myself) use is to take an unused field in the recipe, and populate that field with the desired image file name.  Assistant brewer is the most common, because it is generally the least used.  This gives you the ability use a different file for each recipe without having to modify the report. 
 
Thanks for the replies!
Wayne F., do you know if there is a variable that points to the image selected when I use the "set your own image" function on the design page? (The "+" next to the glass icon) Otherwise it looks like I would have to create a different brew sheet for each image/label.
 
Captain Damage said:
Thanks for the replies!
Wayne F., do you know if there is a variable that points to the image selected when I use the "set your own image" function on the design page? (The "+" next to the glass icon) Otherwise it looks like I would have to create a different brew sheet for each image/label.

There is NOT.  I created the current list of tags based on the Beersmith source code.  Read my post above to keep you from having to create a custom report for every brew. 


 
I had no problem changing the glass to my own image. I change the $GLASS to my *.jpg.  The image file had to be in the same folder as my brew sheet and the image file had to have the jpg extension.
 
Tom knows better than I, so no, you won't find a beer glass variable to use in the brew sheet.  Tom posted a file somewhere (I downloaded it last week) that lists all variables.
It took me a while, but I think I understand Tom's trick now, which should work for you as follows:
So you have many pictures to use for different brews, lets say they are named:
label1.jpg
label2.jpg etc.
If all your images are not the same aspect ratio I'm not sure if they will distort because of the img fixed Height and Width values (in pixels) in the brew sheet.

Go ahead and make the custom brew sheet as I described above.
You "take an unused field in the recipe" i.e. Assistant Brewer = $ASST_BREWER
Change:
<div class="glass"><img src='$GLASS' height='128' width='75' /></div>
To:
<div class="glass"><img src='./$ASST_BREWER' height='128' width='75' /></div>
Note: ./ is a relative path to the current "Reports" directory, so if your pictures are somewhere else you need to modify the path.
Code:
Change:
<span class="item">Asst Brewer:</span> $ASST_BREWER

To:
<span class="item">Asst Brewer:</span>

Now in the Notes section of your recipe you can enter label1.jpg in the Asst Brewer box.
For your next recipe you can enter label2.jpg in the Asst Brewer box, etc.
 
Hey! I got it to work! It's a little kludgey (espcially since Windows7 likes to be a jerk), but it works! Thanks guys!
 
Back
Top