Logo and page title on PDFs

Phoca Restaurant Menu - restaurant menu manager
BradC
Phoca Member
Phoca Member
Posts: 25
Joined: 22 Aug 2009, 05:14

Logo and page title on PDFs

Post by BradC »

Hi Jan

Firstly I'm not a programmer, so hope this is safe to do. Please let me know if it's not.

I changed line 101 in \plugins\phocapdf\restaurantmenu.php from

Code: Select all

$pdf->setHeaderData('' , 0, '', $content->header_data);
to:

Code: Select all

$pdf->setHeaderData('' , 0, '', $content->header_data . $document->getTitle());
It appears to work fine.
http://www.junctionmotel.com.au/wine-list
Last edited by BradC on 29 Nov 2010, 21:25, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Logo and page title on PDFs

Post by Jan »

Hi, this is safe and looks great.

Jan
If you find Phoca extensions useful, please support the project
willkey
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Oct 2010, 18:04
Location: Huntington, VT
Contact:

Re: Logo and page title on PDFs

Post by willkey »

Hi BradC,

I see you have successfully implemented the Phoca Restaurant Menu into your beautiful Junction Motel & Function Centre website. I have been trying for two weeks to get my menu even close to what I need. Basically, I need the menus to print out in a PDF that is legible and makes sense. Might you be able to provide some insight as to how you did it? Or would you be willing to consult with me?

I deeply appreciate any time you could offer to help me get this sorted out.

I do understand that the styling can happen in the administrator/components/com_phocamenu/helpers/phocamenurenderviews.php but I simply can't get what I need to happen happen! Also, would love to have the nice header, like you have, with a background image, etc. I had to shut off my images because the server was delivering a 500 server error regardless of changing the parameter in the .htaccess file...

See image attached for a little of what I need to happen...

Image

Thanks,
Will
BradC
Phoca Member
Phoca Member
Posts: 25
Joined: 22 Aug 2009, 05:14

Re: Logo and page title on PDFs

Post by BradC »

Hi Willkey

The client has seriously messed up the layout now, both the website and the PDF layouts.

Have you looked through all my other 11 posts in the forum?
Change body font size for PDFs (viewtopic.php?f=39&t=5644)
Body font size? (viewtopic.php?f=37&t=5561)
Watermark for PDFs (viewtopic.php?f=39&t=5637)

All my work has been with: PhocaPDF version 1.0.1 and PhocaMenu version 1.1.0

This is how I have Phoca PDF Plugin setup:
SITE TAB
Margin Top: 45mm
Margin Right: 12mm
Margin Left: 12mm
Margin Bottom: 25mm
Page Format: A4
Page Orientation: Portrait
Font Type: freesans
Site Font Color: #000000
Site Cell Height Ratio: 1.4

HEADER TAB
Display Header: Yes
Display Header Line: Yes
Header Data: <img alt="" src="images/stories/pdf-logo.gif" /><br /><br />
Header Data Align: Center
Header Font Type: freesans
Header Font Size: 18pt
Header Font Style: Bold
Header Font Color: #666666
Header Line Color: #000000
Header Background Color:
Header Cell Height Ratio: 1.0
Header Margin: 1mm

FOOTER TAB
Display Footer: Yes
Display Footer Line: Yes
Footer Data:
Footer Data Align: Left
Footer Display Pagination: Yes
Footer Font Type: freesans
Footer Font Size: 8pt
Footer Font Style: Regular
Footer Font Color: #000000
Footer Line Color: #000000
Footer Background Color:
Footer Cell Height Ratio: 1.0
Footer Margin: 10mm

PDF TAB
PDF Name: JunctionMotel.pdf
PDF Destination: Inline Browser (Popup)
Cache: No
Image Scale: 3
Display Plugin Code: Yes
Display Images: Yes
willkey
Phoca Member
Phoca Member
Posts: 12
Joined: 03 Oct 2010, 18:04
Location: Huntington, VT
Contact:

Re: Logo and page title on PDFs

Post by willkey »

WOW - Thank you for such a succinct reply! I will give it a whirl and let you know how I fair!

BradC wrote:Hi Willkey

The client has seriously messed up the layout now, both the website and the PDF layouts.

Have you looked through all my other 11 posts in the forum?
Change body font size for PDFs (viewtopic.php?f=39&t=5644)
Body font size? (viewtopic.php?f=37&t=5561)
Watermark for PDFs (viewtopic.php?f=39&t=5637)

All my work has been with: PhocaPDF version 1.0.1 and PhocaMenu version 1.1.0

This is how I have Phoca PDF Plugin setup:
SITE TAB
Margin Top: 45mm
Margin Right: 12mm
Margin Left: 12mm
Margin Bottom: 25mm
Page Format: A4
Page Orientation: Portrait
Font Type: freesans
Site Font Color: #000000
Site Cell Height Ratio: 1.4

HEADER TAB
Display Header: Yes
Display Header Line: Yes
Header Data: <img alt="" src="images/stories/pdf-logo.gif" /><br /><br />
Header Data Align: Center
Header Font Type: freesans
Header Font Size: 18pt
Header Font Style: Bold
Header Font Color: #666666
Header Line Color: #000000
Header Background Color:
Header Cell Height Ratio: 1.0
Header Margin: 1mm

FOOTER TAB
Display Footer: Yes
Display Footer Line: Yes
Footer Data:
Footer Data Align: Left
Footer Display Pagination: Yes
Footer Font Type: freesans
Footer Font Size: 8pt
Footer Font Style: Regular
Footer Font Color: #000000
Footer Line Color: #000000
Footer Background Color:
Footer Cell Height Ratio: 1.0
Footer Margin: 10mm

PDF TAB
PDF Name: JunctionMotel.pdf
PDF Destination: Inline Browser (Popup)
Cache: No
Image Scale: 3
Display Plugin Code: Yes
Display Images: Yes
Post Reply