Print Page | Close Window

Booklet

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=786
Printed Date: 26 Apr 24 at 10:34AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Booklet
Posted By: KHentschel
Subject: Booklet
Date Posted: 20 Sep 07 at 8:22AM
Hello together,
 
i have a problem with the creation of a booklet PDF.
 
I use one given File and create from this a 2 up Booklet File. The creation runs fine but then when i call the PDF File there raise up an Acrobat Error Message:
 

"seitenstrukturdaten des dokuments enthalten einen ungültigen knoten"

After i press the OK Button i see (and can print) the correct file.

I hope someone can help me.
 
Best regards
 
Klaus Hentschel
 
here is my code (Visual FoxPro)
 
*** Code ***
lcInFile = 'd:\daten\infile.pdf'
lcOutFile = 'd:\daten\outfile.pdf'
loPDF = CREATEOBJECT("iSED.QuickPDF")
loPDF.UnlockKey('your Key')
lnPDF = loPDF.LoadFromFile(lcInFile)
loPDF.SetOrigin(1)
loPDF.SetPagelayout(0)
loPDF.SetPageMode(0)
lnPages = loPDF.PAGECOUNT()
lnReqPages = CEILING(lnPages / 2)
lnWidth = loPDF.PAGEWIDTH()
lnHeight = loPDF.PAGEHEIGHT()
llDrawLeft = .T.
lnAngle = 90
 
loPDF.NewPages(lnReqPages)
DIMENSION laCapture(lnPages,2)
FOR lnCount = 1 TO lnPages
   laCapture(lnCount,1) = loPDF.CapturePage(1)
   laCapture(lnCount,2) = CEILING((lnCount) / 2)
ENDFOR
 
FOR lnCount = 1 TO lnPages
   IF llDrawLeft
      lnLeft = 0
   ELSE
      lnLeft = lnHeight / 2
   ENDIF
   llDrawLeft = NOT llDrawLeft
   loPDF.SelectPage(laCapture(lnCount,2))
   loPDF.SetPageSize('A4 Landscape')

   loPDF.DrawCapturedPage(laCapture(lnCount,1), lnLeft, 0, lnHeight / 2, lnWidth)

   loPDF.RotatePage(360 - lnAngle)
ENDFOR

loPDF.SaveToFile(lcOutFile)
RELEASE loPDF



Replies:
Posted By: KHentschel
Date Posted: 21 Sep 07 at 5:19AM
Ulrich Kobsa helps me in this case (many thanks also from this point Ulli)
 
The "OpenAction Object Referenz" was not correct after the CapturePage / DrawCapturePage.
 
The Solution was:
 
After i create the Booklet File i open this File with QP again and set over the "SetOpenActionDestination" function the OpenAction to the first page. Now everything run fine without an error.


Posted By: Ingo
Date Posted: 09 Nov 21 at 8:08PM
Hi Klaus,

QP.RemoveSharedContentStreams after calling CapturePage should help...
...more than 14 years later ;-)



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk