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!
![]() |
MergeFileList problem |
Post Reply ![]() |
Author | |
bogey ![]() Senior Member ![]() ![]() Joined: 30 Nov 05 Location: United States Status: Offline Points: 50 |
![]() ![]() ![]() ![]() ![]() Posted: 12 Jan 06 at 9:50AM |
I am attempting to rewrite the pdf merge process I have been using to use the MergeFileList() in the file system instead of using the MergeDocument() in memory. First I am creating the file list using the QP.AddToFileList("pdflist","D:/document/007822.pdf"), etc.. Then I call the QP.MergeFileList("pdfList","d:/temp/12345.pdf") I get results code of 0 on the merge process. I suspect it is a permissions issue. I have granted iusr_ account full access to the folder. Is there something else I need to do? |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
Please have a look at "samples". Best regards, Ingo |
|
![]() |
|
tallen14218 ![]() Beginner ![]() Joined: 25 Jan 06 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Ingo, Any more specifics? I looked at the Sample Code Forum on this site and there does not seem to be anything related to MergeFileList or MergeFileListFast. I looked at the knowledgebase on the iSED site and there is also no sample code for MergeFileList or MergeFileListFast. What "samples" are you referring to? Tom |
|
Tom
|
|
![]() |
|
bogey ![]() Senior Member ![]() ![]() Joined: 30 Nov 05 Location: United States Status: Offline Points: 50 |
![]() ![]() ![]() ![]() ![]() |
There are no samples of this code on the sedtech site.
Here is the basics with some debugging code added... 'Start QP Process call QP.AddToFileList("pdfList","d:\pdf\file1.pdf)) thisDoc = "d:/temp/" & Session.SessionID & "-" & timer * 100 & ".pdf" response.write("<br>Merging File List to " & thisDoc & " = " & QP.MergeFileListFast("pdfList",thisDoc)) Once this is complete you can then load the merged PDF to memory, insert form data, change properties, secure and compress it, and then stream it to the browser. QP.LoadFromFile(thisDoc) response.write("<br>Total Page Count = " & QP.PageCount()) call QP.SetInformation(1,"whoever") 'Authorcall QP.SetInformation(2,"title") 'Title call QP.SetInformation(3,"subject") 'Subject call QP.SetInformation(4,"") 'KeyWords call QP.SetInformation(5,"creator") 'Creator call QP.SetInformation(6,Request.ServerVariables("SERVER_NAME")) permissions=QP.Permissions(1,0,0,1,1,0,1,1) 'encrypt 40 bit for compatibility with acrobat 3 and 4 Response.ContentType = "application/pdf"
|
|
![]() |
|
JanN ![]() Senior Member ![]() Joined: 29 Oct 05 Location: Germany Status: Offline Points: 116 |
![]() ![]() ![]() ![]() ![]() |
Forget this post. We both have written at the same time. Your post made my suggestions needless... :)
Edited by JanN |
|
![]() |
|
JanN ![]() Senior Member ![]() Joined: 29 Oct 05 Location: Germany Status: Offline Points: 116 |
![]() ![]() ![]() ![]() ![]() |
bogey,
which value does QP.LastErrorCode return if placed after QP.MergeFileListFast? Edited by JanN |
|
![]() |
|
bogey ![]() Senior Member ![]() ![]() Joined: 30 Nov 05 Location: United States Status: Offline Points: 50 |
![]() ![]() ![]() ![]() ![]() |
LastErrorCode should return 0
|
|
![]() |
|
JanN ![]() Senior Member ![]() Joined: 29 Oct 05 Location: Germany Status: Offline Points: 116 |
![]() ![]() ![]() ![]() ![]() |
Documentation: "A new file list will be created during merging that will contain the result of the merge process for each of the items in the specified file list. The new file list will have the same name as the original file list with the word Result appended. For example, if the original file list was called "MyFiles", then the new file list will be called "MyFilesResult". This new file list will not contain file names, but will contain a text description of the status of the matching file during the merge process."
Try to read the new list "pdfListResult" with these functions: FileListCount, FileListItem Perhaps they tell what happens... |
|
![]() |
|
tallen14218 ![]() Beginner ![]() Joined: 25 Jan 06 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
LastErrorCode is 999 when I attempt to merge 2 400KB files using MergeFileList. LastErrorCode is 0 when I attempt to merge 2 400KB files using MergeFileList. In both cases, no merge file is created and the merged file count returned is always 0. Tom
|
|
Tom
|
|
![]() |
|
tallen14218 ![]() Beginner ![]() Joined: 25 Jan 06 Location: United States Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Aah, I see the error of my ways. I was using 2 different instances of a PDF object - I use the first instance to create and write each individual PDF and the second instance to manage the FileList and then finally the merge. I was unlocking the first instance with my unlock code but not hte second instance. MergeFileListFast worked great once I got my head screwed on right. Thanks Jan and bogey. Tom
|
|
Tom
|
|
![]() |
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