Print Page | Close Window

How to Save PDF from TStream

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=1182
Printed Date: 02 May 25 at 4:05AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to Save PDF from TStream
Posted By: archimedes
Subject: How to Save PDF from TStream
Date Posted: 21 Aug 09 at 2:09PM

Hi all,

I'm trying to find how can i save a PDF file from TStream in Delphi 2007. I'm using trail version. Is it posible to be done this. I need a simple code.



Replies:
Posted By: DELBEKE
Date Posted: 21 Aug 09 at 4:04PM
Can you explain what you mean with "save a PDF" ? To disk or something else ?
"from a TStream"? how do you got this pdf in a TSTream ?
There is a function to save a PDF on disk : SaveToFile, it save a loaded pdf , perhaphs you can use LoadPdfFromStream ?


Posted By: archimedes
Date Posted: 24 Aug 09 at 7:07AM

I want to create pdf file from a stream. But it is formated as RTF format. When i use this stream the file is empty. Same happen when i use LoadFromString. Am I missing something??? My goal is to create PDF file from Stream or String.



Posted By: archimedes
Date Posted: 24 Aug 09 at 7:40AM
i found that LoadFromString(instr) retunr always 0 which mean The PDF could not be loaded. How can i find where is the problem


Posted By: Ingo
Date Posted: 24 Aug 09 at 9:57AM
Hi!

You won't have success if the TStream-data is formatted as RTF (like you wrote above).
It should be formatted as PDF then you can create a pdf-file from it.
If you're doing it the other way round (making a stream from a pdf-file) then you'll see how stream-structure for pdf should look to do your way (stream to pdf-file).

Cheers, Ingo
 



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