Title: Error message
Last modified: January 24, 2017

---

# Error message

 *  [dosser](https://wordpress.org/support/users/dosser/)
 * (@dosser)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/error-message-577/)
 * Hi there,
 * Love the plugin. Though everything seems to be working fine, I see from my logs
   that I am getting the following error happening every time a PDF gets generated–
 * ‘PHP Warning: preg_replace(): Compilation failed: regular expression is too large
   at offset 36048 in /xxxxxxxxxxxxxxxxxx/wp-content/plugins/dk-pdf/includes/mpdf60/
   classes/cssmgr.php on line 205’
 * Sounds like the regex is too long. I’ve had a look and it appears to relate to
   this block of code in ‘cssmgr.php’ (there are three similar preg_replaces and
   this third one is where it seems to flag the error) –
 *     ```
       	preg_match_all( '/url\(([^\'\"].*?[^\'\"])\)/', $CSSstr, $m);
       		for($i = 0; $i < count($m[1]) ; $i++) {
       			$tmp = str_replace(array('(',')',';'),array('%28','%29',$tempmarker),$m[1][$i]);
       			$CSSstr = preg_replace('/'.preg_quote($m[0][$i],'/').'/', 'url(\''.$tmp.'\')', $CSSstr);
       		}
       ```
   
 * Any ideas? As I say, seems to be working, just wondered if anyone else had experienced
   this.
    -  This topic was modified 9 years, 2 months ago by [dosser](https://wordpress.org/support/users/dosser/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/error-message-577/#post-8793277)
 * Hi dosser, sorry for the delay,
 * I’m going to look at server logs in the demo site to see if this error appears,
   if so I’m going to try to solve it, thanks for informing about it 🙂

Viewing 1 replies (of 1 total)

The topic ‘Error message’ is closed to new replies.

 * ![](https://ps.w.org/dk-pdf/assets/icon-256x256.png?rev=3396282)
 * [DK PDF - WordPress PDF Generator](https://wordpress.org/plugins/dk-pdf/)
 * [Support Threads](https://wordpress.org/support/plugin/dk-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/dk-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dk-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dk-pdf/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/error-message-577/#post-8793277)
 * Status: not resolved