Dom PDF – Images dont get displayed

13 years ago, October 14, 2011

I came through this very funny case while i was developing a site which uses DOMPDF to generate PDF from html.

The problem was I was not getting the images in the PDF generated.

I had url_fopen ON on server.

I had tried all relative and absolute paths for the image.

Everything I could imagine.

Drupal 7 – Handling file uploads – allowed file extensions

13 years ago, October 14, 2011

While working with custom forms with file upload fields in drupal, you may sometimes get a error regarding extensions:

The specified file “your file name here” could not be uploaded. Only files with the following extensions are allowed: “jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp”

To allow all extensions, you have to manually set the ‘file_validate_extensions’ validator to an empty array.

Drupal – Force Path Prefix for Default Language

13 years ago, September 26, 2011

When you have more than one language on Drupal site, you have to define the default language among one of them. For example, if i set English as the default language, it will be shown in both http://<domain_name> and http://<domain_name>/en. but all the links in the default language will not have the en path prefix.

© 2024 Anil Maharjan