Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Problem using AddImageFromStream |
Post Reply
|
| Author | |
Brummos
Beginner
Joined: 22 Mar 16 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: Problem using AddImageFromStreamPosted: 22 Mar 16 at 10:36AM |
|
Hi,
I need some help using AddImageFromStream. At the moment i have the following. PDFLibrary.InsertPages(1, 1); PDFLibrary.SetPageSize('A4'); imageid := PDFLibrary.AddImageFromStream(IMGStream, 0); PDFLibrary.SelectImage(imageidd); horz := PDFLibrary.ImageWidth; vert:= PDFLibrary.ImageHeight; PDFLibrary.SetOrigin(1); PDFLibrary.DrawImage(0, 0, horz, vert); PDFLibrary.ReleaseImage(imageid); the problem is with "imageid := PDFLibrary.AddImageFromStream(IMGStream, 0);". It keeps returning 0, so something goes wrong with adding the image. And the result is a blanco pdf file. If i save the stream i get a perfect image, so i assume its correctly inserted into the stream i'm using. Can anyone help me with this? Thanks in advance |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 Mar 16 at 11:18AM |
|
Hi Brummos,
so the image data isn't valid. It would be more helpful posting the code snippet which builds the stream. Perhaps then it's possible to find the error. BTW: It's not necessary to insert a first blank page for creation because for first creation a blank page is as default already inside ;-) Cheers and welcome here, Ingo |
|
|
Cheers,
Ingo |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 Mar 16 at 11:22AM |
|
perhaps it's only the stream-position.
It have to be set to 0 before. Cheers, Ingo
|
|
|
Cheers,
Ingo |
|
![]() |
|
Brummos
Beginner
Joined: 22 Mar 16 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 Mar 16 at 11:23AM |
|
Hi,
thanks for your help! you answer already helped me since it made me figure out why the stream was wrong. the stream was fflled with a pdf and not an image like tiff. as soon as i stored the stream with tiff it started working. thanks!
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store