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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - MergeFileList problem
  FAQ FAQ  Forum Search   Register Register  Login Login

MergeFileList problem

 Post Reply Post Reply
Author
Message
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Topic: MergeFileList problem
    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?

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jan 06 at 12:04PM
Hi!

Please have a look at "samples".

Best regards,
Ingo
Back to Top
tallen14218 View Drop Down
Beginner
Beginner


Joined: 25 Jan 06
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote tallen14218 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 10:55AM

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
Back to Top
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:06AM

There are no samples of this code on the sedtech site.

 

Here is the basics with some debugging code added...

'Start QP Process
Set QP = Server.CreateObject("iSED.QuickPDF")
Call QP.UnlockKey("xxxxxxxxxxxxxxxxxxxxxxxxxxx")
QP.SetTempPath("d:/temp")
QP.SetTempFile("d:/temp/pdftemp.dat")
response.write("<br>Check Temp Path = " & QP.TestTempPath()) 

call QP.AddToFileList("pdfList","d:\pdf\file1.pdf))
call QP.AddToFileList("pdfList","d:\pdf\file2.pdf))
call QP.AddToFileList("pdfList","d:\pdf\file3.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")  'Author
call 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
call QP.Encrypt(PDFPassword,"",0,permissions)
Call QP.CompressContent()
'output any error codes
fncDebug("<br>Error Code = " & QP.LastErrorCode())

Response.ContentType = "application/pdf"
Response.AddHeader "Content-disposition",  "inline; filename=" & timer * 100 & ".pdf"
Response.BinaryWrite QP.SaveToVariant()

 


 

Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:10AM
Forget this post. We both have written at the same time. Your post made my suggestions needless... :)

Edited by JanN
Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:16AM
bogey,

which value does QP.LastErrorCode return if placed after QP.MergeFileListFast?

Edited by JanN
Back to Top
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:19AM
LastErrorCode should return 0
Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:31AM
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...
Back to Top
tallen14218 View Drop Down
Beginner
Beginner


Joined: 25 Jan 06
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote tallen14218 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:33AM

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
Back to Top
tallen14218 View Drop Down
Beginner
Beginner


Joined: 25 Jan 06
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote tallen14218 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 06 at 11:44AM

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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store