Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

Embed JPG IMAGE

$
0
0
Hi. I'm an italian student and i'm sorry for my bad english!
I want to know how I Can embed JPG in my PDF with my personal class.
I try to understand in the FPDF how include the JPG but i'have serious problem with my class.

[CODE]
WriteObj "<<" & vbCr & _
"/Type /XObject" & vbCr & _
"/Subtype /Image" & vbCr & _
"/Name /" & Name & vbCr & _
"/Width " & CStr(ImgWidth) & vbCr & _
"/Height " & CStr(ImgHeight) '& _

WriteObj "/BitsPerComponent 8" & vbCr & _
"/ColorSpace /DeviceRGB " & vbCr & _
"/Length " & CStr(I + 1) & " 0 R" & vbCr & _
'--------------------------------------------------------------------- -------------
'What Filter i must Use???
If i ENCODE my array bytes in ASCII85 the colours is inverted
'"/Filter /ASCII85Decode"
I try this but the image is very strange
'"/FFilter [/ASCII85Decode /DCTDecode ]"
'--------------------------------------------------------------------- ------------------

WriteObj ">>" & vbCr & _
"stream" & vbCr

'How i write the bytes??

imgBtoStr = ToASCII85(imgBUffer)
WriteObj imgBtoStr & vbCr
WriteObj "endstream"
EndObj

strImg = strImg & "/" & Name & " " & CStr(I) & " 0 R " & vbCr
InitObj
WriteObj CStr(Len(imgBtoStr) - 2)
EndObj

[/CODE]

Can help me someone???
Thank s to all!!!

Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>