Web development

Imagemagick PDF -> image on windows error

Submitted by Sam on 15 June, 2012 - 22:18

I resolved the following error when using ImageMagick 6.7.7-4 to convert a PDF to an image on Windows 7 by updating the Ghostscript libraries for Windows from here http://www.ghostscript.com/download/gsdnld.html

Unrecoverable error: rangecheck in .setuserparams Operand stack: --nostringval-- --nostringval-- --nostringval-- START 0 2588256 1246516 1476808 192904 true 1138 5 END PROCS 2 2588256 1257815 1476808 194288 true 1137 5 gs_std_e.ps 4 2608352 1263870 1496904 199000 true 1137 5 gs_il1_e.ps 4 2608352 1266053 1496904 199000 true 1137 5 END FONTDIR/ENCS 5 2608352 1266231 1496904 199000 true 1137 5 END DEVS 5 2611856 1273263 1496904 199000 true 1137 5 END STATD 7 2611856 1280419 1496904 200624 true 1137 5 END GS_FONTS 8 2641800 1309593 1496904 200624 true 1138 5 END BASIC COLOR 9 2661896 1319482 1496904 200624 true 1136 5 END LEVEL 1 COLOR 10 2661896 1321210 1496904 200624 true 1136 5 END IMAGE 10 2661896 1324512 1496904 200624 true 1136 5 gs_btokn.ps 11 2661896 1327954 1496904 200624 true 995 4 gs_dps1.ps 12 2661896 1329299 1496904 200624 true 995 4 gs_dps2.ps 12 2661896 1331306 1496904 200624 true 995 4 gs_type1.ps 13 2681992 1336184 1496904 200624 true 995 4 While reading gs_lev2.ps: %%[ Error: invalidaccess; OffendingCommand: put ]%% START 572646 2736608 1402073 1496904 202880 true 999 7 END PROCS 572647 2756704 1416708 1496904 204264 true 997 7 gs_std_e.ps 572648 2756704 1419435 1496904 205648 true 997 7 gs_il1_e.ps 572648 2756704 1421618 1496904 205648 true 997 7 END FONTDIR/ENCS 572649 2756704 1421796 1496904 205648 true 997 7 END DEVS 572649 2760208 1428828 1496904 205648 true 997 7 END STATD 572650 2780304 1439312 1496904 207272 true 997 7 END GS_FONTS 572651 2800400 1466808 1496904 207272 true 997 7 END BASIC COLOR 572652 2820496 1476697 1496904 207272 true 995 7 END LEVEL 1 COLOR 572652 2820496 1478425 1496904 207272 true 995 7 END IMAGE 572653 2820496 1481727 1496904 207272 true 995 7 gs_btokn.ps 572654 2820496 1485169 1496904 207272 true 995 7 gs_dps1.ps 572654 2820496 1486514 1496904 207272 true 995 7 gs_dps2.ps 572655 2820496 1488521 1496904 207272 true 995 7 gs_type1.ps 572655 2820496 1490071 1496904 207272 true 995 7 While reading gs_lev2.ps: %%[ Error: invalidaccess; OffendingCommand: put ]%% </code?

Skipping the first directory in a .tar file

Submitted by Sam on 23 February, 2012 - 00:49

Lots of the compressed files I download come in the form "project-name-1.2.3.tar.gz", and contain a directory within them named in the same format, so when you untar it creates a directory like "project-name-1.2.3", with all of the project files below it. As most of the time I seem to be already working in a new directory where I want the file to untar, I don't want to have to bother about moving the contents up a level and then deleting the old directory. The tar switch --strip-components=1 addresses this problem by removing the first directory on extraction.

See man tar | grep strip-components .

OpenAtrium logo upload imagecache problem

Submitted by Sam on 21 February, 2012 - 17:23

In an OpenAtrium 6.x-1.0-alpha11 on Drupal 6.24, a custom logo uploaded through /features would not load. This is because the directory /sites/default/files/imagecache/designkit-image-logo/ had not been automatically created, as documented here: https://community.openatrium.com/documentation-en/node/2226. The solution is to enable ImageCache UI from admin/build/modules.

Minor Drupal core updates with Drush

Submitted by Sam on 26 January, 2012 - 11:52

On Ubuntu 10.10, sudo apt-get install drush installs Drush 3 rather than the latest version. Use pear, as recommended, to install the latest version (don't forget to sudo to overcome permissioning problems).

drush up drupal is used for updating minor releases of drupal core (i.e. 6.18 - 6.22) without updating all the contributed modules.

Syndicate content
Drupal theme by Kiwi Themes.