Print Page | Close Window

Page numbering

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: Sample Code
Forum Description: Share Debenu Quick PDF Library sample code with other forum members
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3135
Printed Date: 22 Nov 24 at 1:44PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Page numbering
Posted By: mLipok
Subject: Page numbering
Date Posted: 15 Jun 15 at 2:03AM
On AutoIt forum some member ask me about page numbering.

Here is example:

Func _QPDF_PageEnumerator(ByRef $oQP, $sFormat = 'Page %d of %d')
	Local $iX = 0
	Local $iY = $__eQPDF_A4_HeightInMM - 30

	Local $iCounter = $oQP.PageCount()
	Local $sText = ''
	Local $iTextWidth = 0

	For $iPage = 1 To $iCounter
		$oQP.SelectPage($iPage)
		$oQP.SetOrigin($__eQPDF_SORIGIN_TopLeft);
		$oQP.SetMeasurementUnits($__eQPDF_MUNITS_Milimeters)
		$sText = StringFormat($sFormat, $iPage, $iCounter)
		$iTextWidth = $oQP.GetTextWidth($sText)
		$iX = $__eQPDF_A4_WidthInMM - $iTextWidth - 10
		$oQP.SetTextSize(5)
		$oQP.DrawText($iX, $iY, $sText)
	Next 
EndFunc ;==>_QPDF_PageEnumerator


-------------
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600



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