Print Page | Close Window

DLL function: SaveToString

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=787
Printed Date: 17 May 24 at 1:24PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: DLL function: SaveToString
Posted By: JanN
Subject: DLL function: SaveToString
Date Posted: 20 Sep 07 at 9:05AM
Hi!

Has anybody used the function SaveToString from DLL? What I experience is that I only get the first 768 byte of the document. Can anyone tell me how to make it work?

Thanks in advance.

Regards,
Jan



Replies:
Posted By: Ingo
Date Posted: 20 Sep 07 at 9:22AM
Hi Jan!

Without looking into the function this moment ...
Perhaps the  read-in-loop is the problem?
Normally such loop begins with "...until eof...".
If i look inside pdf-files with notepad i often see the eof-sign anywhere inside (not at the end!) of the pdf-content. Perhaps SaveToStr stops at this eof?

Best regards,
Ingo



Posted By: JanN
Date Posted: 20 Sep 07 at 9:26AM
Hi Ingo!

Unfortunately the break is not that clear. The returned string ends in between a pdf stream object:

....
>>
startxref
0
%%EOF
          9 0 obj
<<
/Type /Catalog
/Pages 10 0 R
>>
endobj
10 0 obj
<<
/Type /Pages
/Kids [ 11 0 R  1 0 R ]
/Count 2
>>
endobj
20 0 obj
<< /Length 21 0 R /S 46
/Filter /FlateDecode
>>
stream
xœc```c``ZÁÀÁÀ .Ì À€


Could it be that this somehow is a limitation of Delphi when using DLLs!?



Posted By: JanN
Date Posted: 20 Sep 07 at 9:27AM
Probably useful information: I'm using Delphi 7.


Posted By: marian_pascalau
Date Posted: 20 Sep 07 at 3:23PM
Hi there, do not use that function. Because of string manipulations you may get truncated in the wrong place. You should use instead the last ActiveX version toghether with SaveToStream function.
 
Best regards, Marian



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