7 Replies Latest reply: Jan 27, 2012 3:01 AM by lrosenth RSS

    Trouble inserting image into PDF

    OnlyScreenNameLeft Community Member

      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.