Hi

Read the PDF spec to see what sort of binary encoding is required for
the image data.

Regards

On Sep 27, 8:10 am, New Developer <secur...@isscp.com> wrote:
> Trying to add an Image to PDF
> Can anyone Please let me know where I have gone wrong ?
> Currently this is what I generate  using  bmp
>
> ByteArrayOutputStream bos = new ByteArrayOutputStream();
> bmp.compress(CompressFormat.JPEG, 100 , bos);
>
>     "stream \n" +
>     bos.toString() +  "\n" +
>    "endstream \n" +
>
> 101  0  obj
> <<  /Type  /XObject
>     /Subtype /Image
>     /Filter  /DCTDecode
>     /Width  341
>     /Height  256
>     /ColorSpace  /DeviceRGB
>     /BitsPerComponent  8
>     /Length 87296
>  >>
> stream
> ????^@^PJFIF^@^A^A^@^@^A^@^A^@^@??^@C^@^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A 
> ^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^ 
> A^A^A^A$
> ^K??^@?^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^G"q^T2??? 
> ^H#B??^UR??$3br?
> ....
> ?QU,?qXy?????p??????H??kz,??$
> endstream
> endobj
>
> 102 0 obj
> << /Type /Page
>     /Parent 1 0 R
>     /MediaBox [0 0 341  256]
>     /Contents 103 0 R
>     /Resources 105 0 R
>  >>
> endobj
>
> 104 0 obj
> <</Length 105 0 R>>
> stream
> q
>    1 0 0 1  100 100 cm
>    341 0 0 256 cm
>    /I103  Do
> Q
> endstream
> endobj
>
> 105 0 obj
> 64
> endobj
>
> 106 0 obj
> <<ProcSet [/PDF /ImageC]
> /XObject <<I106 0 R>>
>  >>
> endobj
>
> xref
> 0 6
> 0000000000 65535 f
> 0000000010 00000 n
> 0000000065 00000 n
> 0000000156 00000 n
> 0000000367 00000 n
> 0000001015 00000 n
> trailer
> <<
>    /Size 5
>    /Root 1 0 R
>  >>
> startxref
> 78802
> %%EOF

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to