plumsl Posted April 4, 2010 Share Posted April 4, 2010 Hi, after Upgrade tu 4.2.1 and moving to another folder (whmcs is still working) the size of the invoice-file is larger than 500kB (before 70 k). also the charakters are very frayed/unsharp/unclear/blurred (right word?) What could be the cause/reason? thanks for some ideas! Plumsl 0 Quote Link to comment Share on other sites More sharing options...
plumsl Posted April 4, 2010 Author Share Posted April 4, 2010 Problem solved! I use the tcpdf.php (in the /includes -dir) from version 4.1.2 sure, it's quick 'n dirty but it works! nevertheless I'm interested abut the reason. if somebody has a solution .... ?! plumsl 0 Quote Link to comment Share on other sites More sharing options...
gerrybakker Posted April 14, 2010 Share Posted April 14, 2010 I have the same problem. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 14, 2010 WHMCS CEO Share Posted April 14, 2010 This must be due to the change of font. The previous default font only worked with certain characters and the new font works for a lot more, but is therefore larger. The old font is still included so to use that again, simply open includes/tcpdf.php and replace line 3263: $family = (strtolower($CONFIG["Charset"])=="utf-8") ? "freesans" : "helvetica"; # Pick font based on charset with this: $family = "helvetica"; Matt 0 Quote Link to comment Share on other sites More sharing options...
web2010 Posted April 14, 2010 Share Posted April 14, 2010 I am noticing the same with the large file size. I already have $family = "helvetica"; in the code 0 Quote Link to comment Share on other sites More sharing options...
plumsl Posted April 14, 2010 Author Share Posted April 14, 2010 Thanks Matt! Now it works with the new (4.2.1) version of tcpdf.php 0 Quote Link to comment Share on other sites More sharing options...
web2010 Posted April 15, 2010 Share Posted April 15, 2010 I am using the latest version of WHMCS - not an upgrade. My pdfs are over 500kb in size. How should I be fixing this? 0 Quote Link to comment Share on other sites More sharing options...
plumsl Posted April 15, 2010 Author Share Posted April 15, 2010 It does not matter whether your using an upgrade or not. it's the same file. try the way matt has shown an I think it will be also work for you. 0 Quote Link to comment Share on other sites More sharing options...
omnigenus Posted April 16, 2010 Share Posted April 16, 2010 Has to be the font...seems like the font is being "attached" to the pdf file 0 Quote Link to comment Share on other sites More sharing options...
oempire Posted April 22, 2010 Share Posted April 22, 2010 much better - worked perfectly.. remember the instructions says replace the whole line 0 Quote Link to comment Share on other sites More sharing options...
stumblrmonk3 Posted June 1, 2010 Share Posted June 1, 2010 Worked for me. Great fix! 0 Quote Link to comment Share on other sites More sharing options...
springs Posted August 10, 2010 Share Posted August 10, 2010 Just a note that this worked for us as well. I honestly didn't even realize it until reading this post, but a 488KB file dropped down to 11KB in size. Thanks for the Tip! 0 Quote Link to comment Share on other sites More sharing options...
eternitynz Posted August 11, 2010 Share Posted August 11, 2010 I am using the latest version (4.2) and have the same issues. The font line replacement worked for filesize but the logo image still looks blurry and unprofessional How can we fix the logo from blurring? the source image is perfect its somehow being altered by the invoice Vin 0 Quote Link to comment Share on other sites More sharing options...
Unihost Posted August 25, 2010 Share Posted August 25, 2010 Awesome, this worked for me, I went from 479kb to 10kb 0 Quote Link to comment Share on other sites More sharing options...
jprince Posted September 7, 2010 Share Posted September 7, 2010 Alternatively, you can continue to use the new fonts by not embedding the font. http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_fonts See Step 4. Important part, is to comment out the $file= in the following files: freesans.php freesansb.php freesansbi.php freesansi.php 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted September 23, 2010 Share Posted September 23, 2010 Im in 4.2.1 and i already have: $family = "helvetica"; and the pdf is around 500kb....so im missing something? Thanx! 0 Quote Link to comment Share on other sites More sharing options...
scool Posted November 5, 2010 Share Posted November 5, 2010 changing the line 3263 as Matt says, it also ruins my utf-8 encoding. the pdf file is now smaller of course, but he encoding is lost the characters ???????? appearing all over the pdf invoice 0 Quote Link to comment Share on other sites More sharing options...
stumblrmonk3 Posted December 19, 2010 Share Posted December 19, 2010 As of version 4.4.1, it is not line 3263, instead it's line 6525. I really wish there was an option to do this in the Admin area instead of editing files. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted December 19, 2010 Share Posted December 19, 2010 hmmm...nope...continue being the line 3263 0 Quote Link to comment Share on other sites More sharing options...
IntaHost-Steve Posted December 29, 2010 Share Posted December 29, 2010 Not sure how embedding the font and causing a 500kb+ invoice size is considered good practice 3 patches later... A better option/fix would be wise I feel. 0 Quote Link to comment Share on other sites More sharing options...
wsd Posted February 21, 2011 Share Posted February 21, 2011 WHMCS System Requirements: PHP Version 5.x or later tcpdf.php is still version 4.6.016_PHP4 I update to version 5.9.055 TCPDF without some problems and now my PDF files not larger end 35 KB I update because I will try to get it to work with the FPDF and FPDI so I can use a PDF template 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.