Skip navigation
OnlyScreenNameLeft
Currently Being Moderated

Trouble inserting image into PDF

Jan 26, 2012 3:12 AM

Tags: #color #image #colour

Hi,

 

I have written a program in RPG that generates a PDF file with a company logo and some text.

 

While I have had no problems with the text content, the image has me completely stumped.  The first approach I tried was to use a jpeg along with the DCTDecode filter but that gives me an 'Out of memory' error when opening the PDF.  The next method I tried was converting the image to an RGB based raw binary data file using GIMP and inserting this with no filter.  This displays the image but the colours are wrong, my image has a white background with a blue and red logo on it.  What I get however, is a grey background with a turquoise and blue logo!

 

My image file is 254w x 81h x 3 colours = 61,722 bytes.  This is the exact size of the file and I have entered the length as 61,722, width as 254, height as 81, bitspercomponent as 8 which I believe is correct.  Any other settings cause the image to not load at all anyway.

 

Any ideas where I am going wrong?

 

Thanks.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points