One of the line in your code is wrong replace the below line in your code and run the application then all your errors should go...
new jpgBytes() as ByteArray, 0, 0, 0, 0, 1, ResizeMode.RESIZE_PAGE);
If this post answers your question or helps, please kindly mark it as such.
Thanks for your reply, but it still doesnt work I'm afraid.
I have the following:
[Embed( source="assets/ribbon.jpg", mimeType="application/octet-stream" )]
myPDF.addImageStream( new jpgBytes() as ByteArray, 0, 0, 500, 500, 1, ResizeMode.NONE);
But I still get the errors:
- 1067: Implicit coercion of a value of type int to an unrelated type org.alivepdf.layout.Resize
- 1067: Implicit coercion of a value of type int to an unrelated type String.
- 1119: Access of possibly undefined property NONE through a reference with static type Class.
It would be great if someone could provide the working code, inlcuding import classes etc.
Many thanks in advance
I have the answer.... you MUST specific the colour space as part of the imageStream
new jpgBytes() as ByteArray, ColorSpace.DEVICE_RGB, null, 0, 0, 500, 500, 0, 1, "Normal", null);
The link below is a valueable resource and provides further info (Starts @ line 4364)
Wish I had found your post sooner. Would have save me a lot of time. Thanks!
I need a favor i am doing the same code, I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.