GreatDevelopers / Certificate

Web-based Certificate generation system
MIT License
20 stars 35 forks source link

Certificate in Second Page #20

Closed vigasdeep closed 7 years ago

vigasdeep commented 7 years ago

Look at this generated PDF, the Certificate goes out to next page. 59ca0d6e57772.pdf

Questions ?

  1. Can we add some constraint, even if text goes down or is more in length/height, the certificate must not go to next page?

  2. What are other solutions for this?

amisha2016 commented 7 years ago
  1. Can we add some constraint, even if text goes down or is more in length/height, the certificate must not go to next page?`

I think there should be Certificate of one page only.

  1. What are other solutions for this?

We have to allign each element of certificate properly.

amisha2016 commented 7 years ago

@vigasdeep

I think we should first decide the template of the certificate. Then, this issue will not make any sense.

I mean to say we should decide the web form of our certificate first. May be some users won't require photograph or want logo at the middle or only two signature fields.

So, We should give the power to users to GUI their own certificates.

vigasdeep commented 7 years ago

@amisha2016 I agree with you. But in the preview I see template just fine, but why is not right in the certificate? There will be multiple templates.

dsdeeptisharma commented 7 years ago

I have tried the same but at my end it's coming as a single page only. PDF

amisha2016 commented 7 years ago

@vigasdeep I can try to manage the above certificate in one page. But that is not general solution because it may create a problem with other users. So shall we strict the word limit of all fields enter by users. What say?

mandeeps708 commented 7 years ago

@amisha2016 Can you explain why would it create problem with users?

If it's a font issue, we can simply have the fonts installed.

amisha2016 commented 7 years ago

@mandeeps708 I mean to say the certificate example which Vigas has posted is a particular case. This problem can arise with many users. So I thought as a solution to strict the word limit of each field like "name of event" in order to bring certificate in one page.

mandeeps708 commented 7 years ago

@amisha2016 Can you verify if it's a font issue or not? As @dsdeeptisharma didn't face this issue with same input (and same length of fields).

And for the limit thing, we can't really restrict the users to not use a little longer names (how can we predict the limit?). One thing can be done is you can try removing the extra space in between texts. Or even lowering the font size a bit, when input goes long enough.

amisha2016 commented 7 years ago

I have pulled the recent changes, run install.sh script and switched to branch restructured. But there I got an error.

PHP Fatal error: Uncaught OdfException: Nothing to parse - check that the content.xml file is correctly formed in /var/www/html/Certificate/library/odf.php:73\nStack trace:\n#0 /var/www/html/Certificate/manual.php(5): Odf->__construct('odt/base/base59...')\n#1 {main}\n thrown in /var/www/html/Certificate/library/odf.php on line 73, referer: http://localhost/Certificate/option.php?var=manual

mandeeps708 commented 7 years ago

@amisha2016 unrelated to this issue though.

Make sure, php-gd and php-xml are installed.

amisha2016 commented 7 years ago

Already installed

vigasdeep commented 7 years ago

generated a new certificate with same template, content is on 1st page only. but empty Page is there. needs fixing. 59d1432a3f039.pdf