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 - MergeFile function. How to ???
  FAQ FAQ  Forum Search   Register Register  Login Login

MergeFile function. How to ???

 Post Reply Post Reply
Author
Message
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Topic: MergeFile function. How to ???
    Posted: 30 Jun 10 at 10:52AM
My code is bellow:

private PDFLibrary PDFLib = new PDFLibrary();
string sOutputFile = @"C:\my temp\test.pdf";
string sSecondFile = @"C:\my temp\secondfile.pdf";
string sImageFile = @"C:\my temp\thirdfile.jpg";

PDFLib.SaveToFile(sOutputFile);
PDFLib.MergeFiles(sOutputFile, sSecondFile, sOutputFile)
PDFLib.AddImageFromFile(sImageFile, 0);
PDFLib.DrawImage(10, 10, PDFLib.PageWidth() - 10, PDFLib.PageWidth() - 10);

After execute application successfully, My Output File's content is bank.
I don't know what wrong I did. Please help me.

Thank you so much!
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 10 at 6:37AM
Hi!

I think you have a load before the SaveToFile ...
MergeFiles works only on disk... so the first Load
(with the old sOutputFile) is still active...
So AddImage doesn't touch the new sOutputFile but the old sOutputFile...
the old sOutputFile wasn't saved at the end - so the image is lost.
Your sequence is wrong ;-)
Please read the first threads in the general section from debenu...
There are knowledgebase- and sample-sections on the official supportpages.

Cheers, Ingo


Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jul 10 at 8:51AM
Dear Ingo,
Thanks for your reply, I solve my problem by using MergeDocument()

Regards,
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