VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mikkidee on August 07, 2012, 14:55:08 PM

Title: Problem with pdf output
Post by: mikkidee on August 07, 2012, 14:55:08 PM
I have searched these forums exhaustively for a solution to these issues, but have been unsuccessful finding anything helpful...
I am trying to style the pdf page that is generated when a visitor clicks on the pdf icon on the product details page.

I managed to ascertain that the "template" for this pdf file is: ..../productdetails/default_pdf.php, but have the following issues -

- It seems that external styling doesn't work:
     - I've attempted inserting styles in the default stylesheet (added custom styling to the main site css file), no dice
     - I tried inserting them in the vmsite-ltr.css, no dice
     - Inline styling does however work, so I have had partial success with styling, but I really need someone to tell me where I can modify:
          - the div created by "echo $this->currency->createPriceDiv" (spacing between prices is untidy)
          - empty spacing between output, which seems like it's caused by divs...
- The image display is completely messed up:
     - The main image has the description next to it and I can't work out where that comes from, but I'd like it either underneath or gone...
     - The additional images thumbnails "step" across and down the page, which looks rediculous... (I've actually removed them entirely for now)
- I inserted the product dimensions but can't get the product_lwh_uom to display as lowercase...

Help with these issues would be GREATLY appreciated. Ideally, I'd like to get the text on the right of the image - but that's not too major an issue.

Many thanks in advance,

Mike
----------
Using VM2.0.8e and J!2.5.6
(zip file contains generated pdf and default_pdf.php)

[attachment cleanup by admin]
Title: Re: Problem with pdf output
Post by: digital-boy on September 08, 2012, 03:23:50 AM
Hi,
i have exactly the same issues. could you solve it already?
furthermore the generated pdf won't show the user defined fields.
i tried for days now and i am quite frustrated. almost cursing the
day i decided to use VM...
is anyone able and willing to help me/us with this?
i'd appriciate any advice!!!
thx
Title: Re: Problem with pdf output
Post by: Marttyn on September 23, 2013, 20:50:35 PM
Im also trying to add some style to the generated PDF, but seems impossible  :o
Every object created its just a block, with no format... one bellow another
Can somebody tell how to style this?
Title: Re: Problem with pdf output
Post by: Maxim Pishnyak on September 26, 2013, 15:21:51 PM
Use inline css.
Title: Re: Problem with pdf output
Post by: Marttyn on September 27, 2013, 00:24:17 AM
Ive tried <tag style:"whatever;"> but didnt work either. The only thing that did work was tags like <table>, <strong>, <h1/2/3/4>...
Only with this tags i managed to get "decent" output (no styling, but at least coherent positioning)
I should try again the inline styling.
Thanks!
Title: Re: Problem with pdf output
Post by: Maxim Pishnyak on September 30, 2013, 07:04:54 AM
<tag style="whatever;">