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!!!
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!!!