dionx / pecl-haru Goto Github PK
View Code? Open in Web Editor NEWpdf haru extension for php7
License: Other
pdf haru extension for php7
License: Other
Hi,
I stumbled on an issue with your fork for php7 support. The library is compiling fine and working when creating a simple pdf with text or one image or so. But if try to add more pages to a document I get the Invalid document handle is set -error. This happens after third page is added.
I've tried to debug the issue but my C/Zend skills are very limited.
It appears that the php_harudoc_dtor is called too early when it should be called at the end of my script (I think, at least that's how it worked on the latest pecl-haru 1.0.4 on php 5).
Here's an example of my test script.
<?php
$doc = new HaruDoc();
for($i = 1; $i <= 10; $i++) {
echo "Calling doc->addPage() ".$i."\n";
$p = $doc->addPage();
echo "\n";
}
$doc->save("test.pdf");
I get a HaruException "An invalid document handle is set" on 4th loop
I'm running php 7.2 on apache
I tried the libharu C-library straight on and it worked as expected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.