• Hi Lewis

    the PDFs generated from my pages stop if they come across a < character (link).

    e.g. (example code from a random tutorial)

    /* Storing elements of first matrix entered by user. */
    
    for(i=0;i

    instead of

    /* Storing elements of first matrix entered by user. */
    
    for(i=0;i<r;++i)
    for(j=0;j<c;++j)
    {
    printf("Enter element a%d%d: ",i+1,j+1);
    scanf("%d",&a[i][j]);
    }

    The pages named code 01 – 05 was me trying to narrow down the problem. (at first I thought it was the pre tags causing a problem etc.)

    The more than character > doesn’t cause this problem (link).

    Thanks again for all the hard work.

    let me know where the best place is to post bugs I saw there’s a github, as well as the mantis tracker and this forum here.

    https://wordpress.org/plugins/wp-post-to-pdf-enhanced/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ajg-cal

    (@ajg-cal)

    in case it’s relevant

    ubuntu 12.04.4

    nginx -v
    nginx version: nginx/1.1.19
    php -v
    PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:24:43)
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    Thread Starter ajg-cal

    (@ajg-cal)

    hah I think the < less than character truncated the rest of my topic title too…

    Plugin Author Lewis Rosenthal

    (@lewisr)

    🙂

    Best place for you to post bugs is in my Mantis tracker. WordPress does provide a tracker, but I’ve found that it’s easy to get disconnected from the plugin rea in question, and have had a hard time getting back (yes, I know; it’s probably not that difficult, but I was a bit put off by it).

    While I have a github account, I don’t really use it, and wouldn’t necessarily put my own work there (my blog has a number of anti-gigantic-hosting-entities-aka-cloud-services rants).

    Indeed, It would be interesting to see the intermediate HTML with what appears to be the beginning of an opening tag in the middle of nowhere (and I’m not saying that there aren’t legitimate reasons for typing a less-than character – note my side-stepping the issue of actually typing the blasted thing!).

    I’m working on a debug setting to allow displaying the intermediate HTML (I probably just need a well-placed print_r() somewhere) which will hopefully help narrow down these types of issues. TCPDF is a very loyal friend; it will generate exactly what you tell it to generate. But, like making wishes with a genie, you have to be careful in your wording, because you will indeed get exactly that which you have requested – no more, and no less.

    Thus, like the <pre> tag issue, we need to figure out a consistent method of identifying these (essentially, at least to TCPDF’s POV) spurious characters so that they are treated like anything else.

    Have you tried escaping them with \ ? I was working on that last evening, though admittedly more related to the <pre> tag thing. Check out what happens to this page when we process it. In that case, escaping the symbols made no difference, perhaps because we’re dealing with complete tags. However, in this case, it might make a difference. Give it a shot and let me know.

    Good work finding these nits! Thanks!!

    Cheers (again)

    Lewis

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘post containing’ is closed to new replies.