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 - NewOutline - The Page No doesn't update properly
  FAQ FAQ  Forum Search   Register Register  Login Login

NewOutline - The Page No doesn't update properly

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

Joined: 02 Oct 09
Location: india
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote thya Quote  Post ReplyReply Direct Link To This Post Topic: NewOutline - The Page No doesn't update properly
    Posted: 02 Oct 09 at 2:04PM
Hi,
    I am Thya and  am evaluating the QuickPDF library for our internal company use.

I am testing the code with the "Copy bookmarks" from one pdf file to another PDF. I was success with the copy operation. However, the PageNo of the NewOutline() function seems to be working wrongly. It correctly update the concerned PDF file, however, if we open the PDF file in the Adobe reader, the outline points to the one page before actual page.

For example, If the source outline pointing to the 7 page, The bookmark created with the Quick pdf library is pointing to the page no 6.

If i open the PDF in the Adobe Acrobat 9, the page no. in the outline still displays correct page number, however if clicked, it navigates to the page the targetted page (page no - 1).

Please help me in this regard. As I will have to provide the beta version of the software today, Any immediate help would be appreciated.

Code and/or sample generated pdfs can be uploaded on request.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Oct 09 at 2:28PM
Hi Thya!

Welcome here!
This is a user-user-forum. So it's not guaranteed that you'll get an answer very quickly. If there're no users with your prob and experiences to solve it then you'll never get an answer here.
If you need "immediate help" then you should post/call on the official product pages:
http://www.quickpdflibrary.com/support/index.php

Cheers, Ingo



Edited by Ingo - 02 Oct 09 at 2:29PM
Back to Top
thya View Drop Down
Beginner
Beginner
Avatar

Joined: 02 Oct 09
Location: india
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote thya Quote  Post ReplyReply Direct Link To This Post Posted: 03 Oct 09 at 4:50AM
Hi Ingo,
      I have poseted the same problem in the Support page also.
If i get any response here asap, i will be able to complete the project today.

Thanks for your quick response.
Thya
Back to Top
thya View Drop Down
Beginner
Beginner
Avatar

Joined: 02 Oct 09
Location: india
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote thya Quote  Post ReplyReply Direct Link To This Post Posted: 03 Oct 09 at 4:58AM
Please download the PDF and see the bookmarks. it is pointing to the wrong page no. However, if you open the file in the Adobe acrobat,  Bookmarks's page no are showing correct page no.
if we just do a update and save changes, it will work properly.

http://codeguyz.co.cc/thiyagu/The%20Art%20of%20Solving%20Problems-copy.pdf
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 09 at 6:24AM
Hi!
Not only with Acrobat... Foxit shows the correct pages, too.
Very strange...?

Back to Top
thya View Drop Down
Beginner
Beginner
Avatar

Joined: 02 Oct 09
Location: india
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote thya Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 09 at 6:38AM
Yes, You are right!

Please download the source from the location:
http://www.esnips.com/r/hmfl/doc/9a1a3762-1e11-48bb-a728-0435e95c5ecc/CopyBookmarks

Please let me know if you find any strange thing in the code.

Back to Top
thya View Drop Down
Beginner
Beginner
Avatar

Joined: 02 Oct 09
Location: india
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote thya Quote  Post ReplyReply Direct Link To This Post Posted: 06 Oct 09 at 3:45AM
Hi Ingo,
      Thanks for all.
I got a solution from Support Team. I have given here the full text of the support mail
-------------------------------------------------
Thya,

Thanks for your patience.

I've reviewed the code that you sent through and noticed the issue that could be causing the problem.

For the AddBookmarks function that you've created, you're specifying 0,0 for the destination position of the bookmark (i.e. the position on the page that the user is shown when they click on a bookmark). With the default page origin (bottom left corner of the page) this will mean that the user is shown the very bottom of the page at the top of the screen, which might be the next page. By calling the SetOrigin(1) function you can change the default page origin to be the top left corner. This would mean that the user would be shown the top of the page when they click on the bookmark.

---
static void AddBookmarks(QuickPDFAX0716.PDFLibrary QP, Node<OutLine> root, int NewParentID)
{
OutLine Parent = root.Data;

foreach (Node<OutLine> i in root.Children)
{
OutLine t = i.Data;


QP.SetOrigin(1) // This sets the page origin to the top left corner

int temp = QP.NewOutline(NewParentID, t.OutlineTitle,t.PageNo, 0D);

if (i.Children.Count > 0)
{
AddBookmarks(QP, i, temp);
QP.CloseOutline(temp);
}
}
}
---

I've updated your code above, to call SetOrigin(1), can you let me know how this goes on your end?

Cheers,
Rowan
-----------------------------------------------------------

- Rowan.

Back to Top
thya View Drop Down
Beginner
Beginner
Avatar

Joined: 02 Oct 09
Location: india
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote thya Quote  Post ReplyReply Direct Link To This Post Posted: 08 Oct 09 at 7:03AM
xfgh dfg
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