Giter Site home page Giter Site logo

pecl-haru's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

pecl-haru's Issues

"Invalid document handle is set" when calling for document

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.