I'm using FPDI together with TCPDF to add a page to a already existing PDF-file. This works great, but I have one problem. When I output the new PDF I get an automatic page counter in the lower right corner, "112/299" for example. I find no documentation in FPDI or TCPDF about this automaticly generated page counter.
This problem only occurs when I put the file through FPDI, which narrows it down to FPDI I suppose.
My question is: How do I remove this god awful page counter in the bottom right corner of every page in my FPDI-generated PDF-file.
Thankful for answers.
I solved it, finally. The thing was, TCPDF puts default headers and footers on every page it generates, you can disable this with;
$object->setPrintHeader(false);
$object->setPrintFooter(false);
The thing was, I use FPDI to concatenate two PDF-files into one. To do this, you have to iterate over every page in both of the files you want to put together, and then finally add all these pages to a new PDF-file and output it.
So the solution was disabling the header and footer in every page sent to the new PDF-file, in the object it self who iterates over this. Just use;
$this->setPrintHeader(false);
$this->setPrintFooter(false);
If you're using PHP of course, otherwise you'll figure it out!
Related
I have a very big view which needs to be converted to PDF. I have used Rotativa but it is not properly page breaking, half of the line goes to next page and I don't know where needs to use page break because my view model generate dynamically.
Rotativa is built on top of wkhtmltopdf library, so this means that the same solutions from this post should also be a good for you: Wkhtmltopdf Characters in single line partially cut between pages
I wanted to ask if there is a possibility to force Joomla to use full article image if intro image is empty (everywhere where image should be visible).
Is there a setting for this? Is it a feature of a template or Joomla engine itself? Right now I always have to specify both of this images, cause if I specify one only full article image Joomla does not display miniature in many places. If I specify the other one miniature is there but when I enter article it is missing.
I always end up having to specify the same image twice. Is there any way around this?
Thanks
UPDATE1:
I ended up overwriting the template for article to display $images->intro_image whenever $images->image_fulltext is not available.
This solves my problems yet one joomla user tells me she is sure that they were able to do that before without any modifications in the template. So now I'm just wondering if there is a setting for this in Joomla Admin so that it does not have to be forced in template code
It turned out that each element of my page except full article used intro_image. So what I did was to copy out the part responsible for showing article into the html folder of my template and just added a php code to use intro image instead of fulltext image (if it is present). You basically need to change $image->fulltext to $image->intro_image in the condition. But remember to keep the original condition as an elseif condition if you want to be able to still use full text image
I am trying to figure out how to use the code posted by Nicholas Lim in Random images on click to display random post when page refreshes.
I am using wordpress for my website, the url structure does not contain .php extension. So i won't be able to use it to display random image in my WP post, am i right?
If it is possible, could anyone please guide me step by step how to use the code.
I spent much time reading about this, but still haven't understood.
Thank you in advanced
Not 100% sure what your requirements are here.
Is this correct:
1. You want to display random images on a page refresh.
2. You're not running a php server.
If yes to both of the above, then why not just use the JavaScript example from the post that you have included in your original question?
I'm fairly new to Share Point so forgive me if this is to easy for you guys, but I could not seem to find the answer anywhere and I am rather stumped.
I am currently trying to make a website to track if particular tasks go over their due date. I have a calculated column that leaves a DIV tag to the image of a red/yellow/green circle which is displayed by the javascript for a Content Editor Web Part (CEWP) made by Christophe on his site here:
http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/
I was able to put his code into the CEWP and everything looks great when it is in a standard list.
But I want a web part version of this on the homepage for easy view. When I make the web part (of a view grouping by the image tag) and place on the main site all I see is the DIV tag! I made sure to put an identical CEWP on the homepage as well but i get as grouping:
+[columnName] : DIV>img title=blahblahblah>/DIV> (2)
Needles to say when I expand this it stays the same for all entries below
Any Ideas?
Thanks for your time :D
Nobody has responded, but I found the answer so hopefully this will save someone the hours of grief I had. This will seem ridiculous but just go with it.
In the calculated column instead of returning the type as text, return it as a currency. Sounds ridiculous BUT IT WORKS!!
it would be awesome if someone could help me with this - I've already spent more than a day on it. :(
In a phtml file in Magento, I'm displaying a long list of products with a checkbox next to each. I've already added some code to paginate this list. The problem is, when I move to say page 2, I need to 'remember' which boxes were selected in page 1, and select them when I move back to page 1. I know how to use javascript to detect if a checkbox is checked or not. I was planning to save an array of selected boxes in the magento session - adding to it when more boxes are checked and deleting when boxes are unchecked. But my session-changing code is PHP, and my checkbox-detector is javascript. I know I can't call my session-changing function from javascript - I've been told that I would need AJAX to do this. I don't know any AJAX at all. Is there any other way to do this?
I'd be happy to post relevant snippets of my code if anyone can help me. Thanks!
UPDATE:
Okay, so I decided to use AJAX after all, and I've added a lot of AJAX code already. The problem is, it's not working. Btw, I'm not using jQuery. When I write this in Magento:
xmlhttp.open("POST", 'adjust_session.php', true); xmlhttp.send(params);
exactly where do I need to put my adjust_session.php file? It's not working if I put it in the same folder as my phtml file (where I'm calling the open function).
Thanks!
How are you actually doing the pagination? If you have to make a round-trip to the server for the paginated data anyway, send a list of checked/unchecked with it and toggle in the session. Then, when rendering the new page, either check the boxes in the HTML directly, or just pass a list of currently checked boxes in as JS and parse it on the response.
Alternatively, if you are doing everything on one page (and using AJAX for pagination already), you could also hold onto an array in JS and recheck the boxes after you render them.
Hope that helps!
Thanks,
Joe