Results 1 to 3 of 3

Thread: Nuance PDF VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    2

    Nuance PDF VB

    We use Nuance pdf at work. Most VB relating to pdf seem to be relating to Acrobat so I've not been able to google much on this.

    I'm trying to get the Nuance API to merge PDFs and managed to find out the syntax to get the file to merge.
    VARIANT_BOOL InsertPages(long nInsertPageAfter, IDispatch* iDDDocSource, long nStartPage, long nNumPages, long bBookmarks);

    However, when I tried with the following:
    If ddDocTarget.InsertPages(1, ddDocSource, 0, 2, False)

    This dropped a page off the second file.

    Can someone kindly point out how I should be coding this out instead so that I merge everything, after the first document?

    Thanks in advance

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Nuance PDF VB

    Can someone kindly point out how I should be coding this out instead so that I merge everything, after the first document?
    without ever having heard of nuance before, looks like you specify to insert 2 pages after the first page, though that does not indicate why the document should be truncated by 1 page

    maybe something like
    Code:
    numPages = primaryDoc.GetNumPages() - 1
            numberOfPagesToInsert = sourceDoc.GetNumPages
    Last edited by westconn1; Oct 27th, 2021 at 06:16 AM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    2

    Re: Nuance PDF VB

    Thank you so much for this! I am going to give this a shot! Really appreciate it!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width