New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asked Tag [polygon ] is not in the [Draw] tag .... #442

Open
imranctg16 opened this Issue Jan 22, 2019 · 7 comments

Comments

Projects
None yet
3 participants
@imranctg16
Copy link

imranctg16 commented Jan 22, 2019

I am getting this error when my html has this ->
<draw width="16" height="10"> <polygon points="5,0 10,8 0,8"/> </draw> i checked the vendor file,, and the polygon.php file is there.. what could be the reason for this error ?

@imranctg16

This comment has been minimized.

Copy link
Author

imranctg16 commented Jan 22, 2019

More Detailed Error Message : Spipu\Html2Pdf\Exception\HtmlParsingException: The asked [polygon] tag is not in a [DRAW] tag in /vendor/spipu/html2pdf/src/Tag/AbstractSvgTag.php:68 Stack trace: #0 /vendor/spipu/html2pdf/src/Tag/AbstractSvgTag.php(45): Spipu\Html2Pdf\Tag\AbstractSvgTag->openSvg(Array) #1 /vendor/spipu/html2pdf/src/Html2Pdf.php(1436): Spipu\Html2Pdf\Tag\AbstractSvgTag->open(Array) #2 /vendor/spipu/html2pdf/src/Html2Pdf.php(1407): Spipu\Html2Pdf\Html2Pdf->_executeAction(Object(Spipu\Html2Pdf\Parsing\Node)) #3 /vendor/spipu/html2pdf/src/Html2Pdf.php(5583): Spipu\Html2Pdf\Html2Pdf->_makeHTMLcode() #4 /vendor/spipu/html2pdf/src/Html2Pdf.php(1439): Spipu\Html2Pdf\Html2Pdf->_tag_open_TD(Array) #5 /vendor/spipu/html2pdf/src/Html2Pdf.php(1393): Spipu\Html2Pdf\Html2Pdf->_executeAction(Object(Spipu\Html2Pdf\Parsing\Node)) #6 /vendor/spipu/html2pdf/src/Html2Pdf.php(595): Spipu\Html2Pdf\Html2Pdf->_makeHTMLcode() #7 /home/bs166/Downloads/kaizen/app/Traits/PdfGeneratorTraits.php(31): Spipu\Html2Pdf\Html2Pdf->writeHTML('\n ...') #8 /app/Http/Controllers/DetailController.php(116): App\Http\Controllers\DetailController->generatePdf('

@LittleBigFox

This comment has been minimized.

Copy link
Contributor

LittleBigFox commented Jan 24, 2019

Hi!

Yes it's strange, because Html2PDF allow this svg tag... https://github.com/spipu/html2pdf/blob/master/examples/res/svg.php

I take a look on this, but i'm not an expert of svg...

Regards,
LBF

@LittleBigFox

This comment has been minimized.

Copy link
Contributor

LittleBigFox commented Jan 24, 2019

I tried the polygon tag, it work... Could you provide the full draw tag please?

Regards,
LBF

@imranctg16

This comment has been minimized.

Copy link
Author

imranctg16 commented Jan 25, 2019

Sure .
<draw width="16" height="10"> <polygon points="5,0 10,8 0,8"/> </draw>
My PHP version: 7.2.14
Laravel version: 5.6.39
spipu/html2pdf v5.2.1

@LittleBigFox

This comment has been minimized.

Copy link
Contributor

LittleBigFox commented Jan 25, 2019

Ok, i try you code, and it work... I guess there is another problem here...
Are you sure you have nothing more than this line <draw>...</draw> ?

The asked [polygon] tag is not in a [DRAW] tag in /vendor/spipu/html2pdf/src/Tag/AbstractSvgTag.php:68
Suggests that the tag is corrupt.

@imranctg16

This comment has been minimized.

Copy link
Author

imranctg16 commented Jan 25, 2019

if i only use the draw tag,, it works fine.. but when i put it under div tag,, it shows that error .
<draw width="16" height="10"> <polygon points="5,0 10,8 0,8"/> </draw> This works Just fine. But when it is nested under a div tag, it shows error

@spipu spipu added the bug label Feb 19, 2019

@spipu

This comment has been minimized.

Copy link
Owner

spipu commented Feb 19, 2019

it may be a bug :( i tag it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment