Author Topic: Can't upload some PDF files  (Read 3718 times)

disconnect

  • Newbie
  • *
  • Posts: 8
    • View Profile
Can't upload some PDF files
« on: September 29, 2015, 12:01:57 pm »
Hi all

The strange problem occured. When I trying to upload PDF document created by Office 2010 the process takes a long time.

The document eventually uploaded to the server but the name changes to the "error.pdf"

I can rename it, but sure this is abnormal.

No error logs, no any warnings but very long and annoying.

Any idea what be wrong and how can I fix it?

Thank you in advance.

A little more

Xubuntu 12.04 Apache 2 php 5 Any other documents like a TXT, DOC, PDF from PDF printer or Adobe STD working fine.
« Last Edit: September 29, 2015, 12:06:53 pm by disconnect »

disconnect

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Can't upload some PDF files
« Reply #1 on: September 30, 2015, 11:44:10 am »
Fixed.  Is a bug, for sure, just add a "_" in dirtytxt function and problem is gone.  If anyone get the same trouble, just ask me. "Thanks" for your help.

conrado

  • Administrator
  • Hero Member
  • *****
  • Posts: 998
  • Conrado
    • View Profile
    • Feng Office
    • Email
Re: Can't upload some PDF files
« Reply #2 on: October 22, 2015, 06:07:40 pm »
Hi disconnect.

Thanks  (no quotation marks for you :P ) for following up on this.

I have taken note of this to pass to the dev team.

Did you put it in the issue tracking system? Sorry I ask and don't check - trying to cover as many questions/issues as possible with very little time. We are hard working on version 3.4 (It is looking so good already!)

Cheers!
Get Official Support for your Feng Office. Support the development team. Sign up for a Free Trial here.

disconnect

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Can't upload some PDF files
« Reply #3 on: December 16, 2015, 07:57:25 am »
Hi Conrado.

Sorry for long response

The problem here

Code: [Select]
}
function getDirtyTexts(&$texts, $textContainers) {
    for ($j = 0; $j < count($textContainers); $j++) {
        if (preg_match_all("#\[(.*)\]\s*TJ#ismU", $textContainers[$j], $parts))
            $texts = array_merge($texts, @$parts[1]);
        elseif(preg_match_all("#Td\s*(\(.*\))\s*Tj#ismU", $textContainers[$j], $parts))
            $texts = array_merge($texts, @$parts[1]);
    }

I just add "_" symbol in
Code: [Select]
#Td\s*(\(.*\))\s*Tj#ismU
Now it look like
Code: [Select]
_#Td\s*(\(.*\))\s*Tj#ismU
Code: [Select]
}
function getDirtyTexts(&$texts, $textContainers) {
    for ($j = 0; $j < count($textContainers); $j++) {
        if (preg_match_all("_#\[(.*)\]\s*TJ#ismU", $textContainers[$j], $parts))
            $texts = array_merge($texts, @$parts[1]);
        elseif(preg_match_all("_#Td\s*(\(.*\))\s*Tj#ismU", $textContainers[$j], $parts))
            $texts = array_merge($texts, @$parts[1]);
    }

And error is gone

Hope this helps.