Print Page | Close Window

Loadfromstream problem

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=667
Printed Date: 04 Apr 26 at 10:42PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Loadfromstream problem
Posted By: cpri
Subject: Loadfromstream problem
Date Posted: 08 Mar 07 at 12:58AM
Hello there,

I have the following problem.
I have a pdf file loaded into a Tmemorystream.
When I save this stream to a file. I can open this file with every pdf viewer (including my own quickpdf based viewer). But I don't want to save the stream first to a file and then open the file. The direct way would be by using the function LoadFromStream.
When I use this function I get an error on the ReadTrailer function and the pdfstream isn't loaded.

I saw that the LoadfromFile function uses the Loadfromstream function as well but then the file is loaded into a Tfilestream. How can get the Loadfromstream function to work without saving my stream first to file and then oping this file to a TfileStream

Thanks




Replies:
Posted By: ukobsa
Date Posted: 08 Mar 07 at 2:21AM
Hi,

Does this happens for every PDF? And can you post a code snippet so that we have a test case?
Just for sure: did you reset your memory streams position to zero before using loadfromstream?

Ulrich



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk