margee has asked for the wisdom of the Perl Monks concerning the following question:

Dear Author, i am working as software engineer in one mnc company, while doing project related with pdf files using perl. i came to know abt the CAM::PDF Packages i downloaded it and installed in my system. As per the description about crunchjpgs.pl i done it but returning error output . it producing the error like.... Image 1 page 1, /R7 = object 7, (w,h)=(1024,768), length 69083 Failed to wirte file /tmp/crunchjpg.704 the same thing happen while running extractallimages.pl also Extracted 0 images 0. infact i am having the images(jpg) in my pdf file . So kindly, check out this problem and let know whether i am wrong or not.

Replies are listed 'Best First'.
Re: PDF Color
by Tanktalus (Canon) on Dec 02, 2005 at 16:58 UTC

    margee, as this is your first post (under this nickname), I would suggest you start by reading the ever-popular, "How (Not) To Ask A Question". Most notably, your post has no formatting whatsoever, it is missing some punctuation, and Randomly capitalises Words. Oh, and there is no code with which we can help you.

    Often, I install a module that someone is having problems with solely to help someone. I take their code, install the required modules, and test it out. Sometimes I don't find the same problem, but sometimes not only do I find it, but I point out where the error is. It's a great way for me to learn new modules. In your case, I know what module you're using, but I have no idea what your code is.

    If you could boil down your code to as few lines as possible to replicate the problem, I'm sure more people would be able to help you.

      Dear Sir, As you said it was my first mail in posting queries, so i made some cosmetical mistakes. I am sorry for it. I would like to expalin my query in a clear way. My requirement is to read a PDF FILE, get the PAGE NUMBERS in which COLOR IMAGES or COLOR CONTENT is present. For this i had downloaded CAM::PDF(CAM-PDF1.01.zip) and installed. I read the documentation from which i found that i could get all the images in PDF file extracted to a specific directory(using extractallimages.pl). Using that i could test whether the image is containing color or not using IsRgb() or IsCMYK() functions. But i was not able to do that. The program was giving some errors. But the program fulfills the requirement partly. What should i do if Color is there on a page without an image? Could you please send me the procedure i should follow for this requirement. Thanks & Regards Margret. J

        margee,

        You are correct that there are some cosmetic problems with your original post. You have not corrected them either there or with your added text above. Apologies aren't needed - but even if they were, generally an apology comes with a promise to do better next time, and you did not go and read any of the fine documentation of perlmonks in how to format your posts for maximum response. After all, something that is hard to read is less likely to be read. And that keeps you from getting answers. I'm not pointing out your "poor cosmetics" because I get a thrill out of demeaning people. I'm pointing them out because I think you genuinely need perl help, and your formatting is getting in the way of getting that help. Notice how many people answered your question? That's largely to do with two things - one of which is aesthetics - poor formatting makes it difficult to read.

        The second is nearly as important. I say nearly because, despite the fact that it is at the crux of your problem, with poor formatting, it would actually make it harder to read your posts. That is, you didn't provide your sample code that shows your problem. You continiued to not show your code here, making it very difficult for people to help. All we can do is guess at what problems your code faces, which is frustrating for us, and, truth be told, would be frustrating to you when you wonder why none of our help is, well, helping. It's sorta like giving us a blindfold and then expecting us to hit the bull's-eye with a dart from 30 paces. We don't even know which way to the target. Give us the code, take off our blindfold, and we have a much better chance.

        When you post a new note, you must hit the "preview" button. Notice how it says, "If something looked unlike you expected it to you might need to check out Writeup Formatting Tips". Follow those instructions - if things aren't appearing the way you think they should, follow the link (probably best to follow it in a new window so you don't lose what you've typed so far. You may want to go back to your other posts and reformat them, as well, partly as practice, and partly to encourage more people to respond when (if) they go back to the top of this thread to see what I'm complaining about.

        Good luck!