Print Page | Close Window

Quick PDF: Print Multiple Pages

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=3073
Printed Date: 03 Feb 26 at 5:40PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Quick PDF: Print Multiple Pages
Posted By: tedescomicchi
Subject: Quick PDF: Print Multiple Pages
Date Posted: 16 Feb 15 at 9:58AM
Hi there

This is my first post, so I hope to include all needed information :-)

I'm looking for a code sample to print 2 or 4 pages on 1 sheet. In my Windows printer setting I'm able to setup the print that way. But in the debenu functions I don't find any "option" to do that.

Is there an option already to print multiple pages on a sheet, or is there a code sample for that functionality?

Thanks a lot for support.

Bye
Michele



Replies:
Posted By: Ingo
Date Posted: 16 Feb 15 at 10:43AM
Hi Michele,
 
PrintOptions and SetupCustomPrinter doesn't offer these properties so far.
What you can do is creating an empty working pdf and put four original pages
with 4 x smaller dimensions to any new page.
This you can do with the library.
 
Cheers and welcome here,
Ingo
 


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



Posted By: tedescomicchi
Date Posted: 16 Feb 15 at 1:10PM
Ciao Ingo

thaaank you a lot for your answer!
Do you have a code sample how to minimize a page and how to put it on a new sheet?
;-)

Thanks again!


Posted By: mLipok
Date Posted: 17 Feb 15 at 8:18AM

this is not exactly what you want (it shows only how to 2 in 1 ) 
but I think it can by helpful for you:

Func _QP_Page_2in1(ByRef $oQP, $bAddSplitter = False)
Local $iOrginalPageCount = $oQP.PageCount()

Local $iNewPageCounter = 0
Local $bNewPageHaveDrawedTopOfPage = False ; 1 = true ,  0 = false

Local $iID_CapturedPage

If $iOrginalPageCount > 1 Then
For $iCurrentPage = 1 To $iOrginalPageCount
If Not $bNewPageHaveDrawedTopOfPage Then
$oQP.NewPage()
$iNewPageCounter += 1
$oQP.MovePage($iNewPageCounter)
$oQP.SetPageSize('A4')
If $bAddSplitter Then
$oQP.SetLineWidth(1)
$oQP.SetLineColor(1, 0, 0)
$oQP.SetMeasurementUnits($__eQPDF_MUNITS_Milimeters)
$oQP.DrawLine(0, $__eQPDF_A4_HeightInMM / 2, $__eQPDF_A4_WidthInMM, $__eQPDF_A4_HeightInMM / 2)
EndIf
EndIf

$iID_CapturedPage = $oQP.CapturePage($iNewPageCounter + 1)

; select Page to which you want Insert content - Draw Captutred Page
$oQP.SelectPage($iNewPageCounter)

If Not $bNewPageHaveDrawedTopOfPage Then
; draw on top of page
$oQP.DrawRotatedCapturedPage($iID_CapturedPage, 0, _
$__eQPDF_A4_HeightInMM, _
$__eQPDF_A4_HeightInMM / 2, $__eQPDF_A4_WidthInMM, 270)
$bNewPageHaveDrawedTopOfPage = True
Else
; draw on bootom of page
$oQP.DrawRotatedCapturedPage($iID_CapturedPage, 0, _
$__eQPDF_A4_HeightInMM / 2, _
$__eQPDF_A4_HeightInMM / 2, $__eQPDF_A4_WidthInMM, 270)
$bNewPageHaveDrawedTopOfPage = False
EndIf
Next
EndIf
EndFunc   ;==>_QP_Page_2in1



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