It does add a space on the end of the byte stream (it needs a space between each hex byte).
But even when I use DCtDecode (where there are no space) it is corrupt. As in nothing will load it… unlike before… where it would load, but Acroreader wanted to fix it.
BTW, here is a link to a thread on the old RS forums with pure RS code to implement ASCII85 encoding/decoding: Base85 (Be sure to read to the end of the thread as the code gets better.)
ASCII85 may be preferable anyway as it generally results in a smaller string than the hex rendition…
Your link is broken. (It seems that the “Link” functionality on this forum is causing lots of confusion )
Are you saying that you are now able to open the PDF in a viewer, but the picture data doesn’t show up? If so, is it possible that the picture isn’t positioned and/or scaled where you think it is? If you can post a link to the PDF, I can examine it in Acrobat Pro and/or Illustrator.
Well, from development of DynaPDF I know that it’ll take years to get things done right. Handling images in all the options will be a challenge. Not to forget fonts with all the varieties. And how much hours do you put in compared to taking existing plugin like DynaPDF Starter?
This is quite true, but I think that Dave’s goal for functionality is quite more limited than DynaPDF’s.
While it’s still not a trivial task, I think it is doable. I don’t know whether it’s worth doing as compared to using DynaPDF starter, but Dave seems to be making good progress, and I’m hoping that he succeeds.
Christian… I am not concerned nor impressed with the amout of time that went into DynaPDF. I have put about 4 DAYS into SimplePDF and my design and requirement specifications are quite rigid and controlled. I expect to have DrawPicture working quite soon. And when it is complete it will be able to drop into existing code that creates a PRINTER graphics object and be 100% code compliant.
Peter. There was no link… this forum just “made it up”. But yes… the PDF now opens but the picture does not show up. Position/Scale is the first thing I thought of as well… so I looked at the “cm” command and based on examples I have found it “looks” right.
Can’t “post” the PDF code here as it has binary characters… in a while I will put in on my website and post the URL… Thanks
The main limitation I always found frustrating with Asher’s class was that it didn’t support links (either within the document or external, to a website). Are you planning on supporting links?
Well, in our DynaPDF examples we have one of the examples mimic a Graphics like class. Including DrawPicture there, I think.
The bigger problem is that the plugin can’t provide a Graphics subclass as that is not supported.
[quote]Dave S
Thanks for that… it didn’t work either…
Something makes me think the data I am encoding is the problem… not the manner in which it is encoded
basically I am converting the Picture to a string (which I THOUGHT would be the right data) by doing this
Note: The JpegData is the string containing jpeg data. Remember you will have to use a “[/DCTDecode]” filer for the content stream. Also you will need to use the newer Picture class. This is code from my very old PDF engine.
and finally the PAGE and CONTENT objects look like this
the rg sets color to RED, “re f” draws a filled rect
the Image code should be from the small “q” to the capital “Q” where “img0” matches the resource above
6 0 obj << /Type /Page /Parent 5 0 R /Contents 7 0 R >> endobj
7 0 obj
<< /Length 66 >>
stream
1. 0. 0. rg
131 661 26 -26 re f
q
16 0 0 16 136 656 cm
/img0 Do
Q
endstream
endobj