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 - Printing two pages in one
  FAQ FAQ  Forum Search   Register Register  Login Login

Printing two pages in one

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

Joined: 30 Jun 14
Location: Milan Italy
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ggirarde Quote  Post ReplyReply Direct Link To This Post Topic: Printing two pages in one
    Posted: 30 Jun 14 at 6:08PM
Since many printers directly support the 2 pages in 1 and 4 pages in 1 printing, I tought it were a simple thing to get this done with QuickPdf Library on the right printer but, after some search about SetupCustomPrinter, PrintOptions and GetPrinterBins, I feel lost.

Is there any way to do it?


Ty in advance.
Back to Top
Paul View Drop Down
Moderator Group
Moderator Group


Joined: 25 Jun 14
Location: Slovakia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paul Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 14 at 9:18AM
Debenu Quick PDF Library does not have this option yet. This could be a good feature. Try to send it via this form: http://www.debenu.com/support/contact/
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 14 at 11:25AM
did you look at this:
http://www.debenu.com/docs/pdf_library_reference/DrawCapturedPage.php

cheers
mLipok
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
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 14 at 11:27AM
I think I can create an example in this weekend.

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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 14 at 6:57AM

It will not be possible to do this with SetupCustomPrinter and Devmode as the settings for nUp printer would need to be contained in a custom part of the DEVMODE structure which would be different for every printer driver and also undocumented. This is the same reason many custom features such as fancy bins and other options cannot be supported reliably.  Many drivers respect the values in the DEVMODE structure and many drivers ignore most of it and define there own additional and undocumented DEVMODE structure.

The only way to do this is via CapturePage and DrawCapturedPage.

Andrew.

Andrew.
Back to Top
ggirarde View Drop Down
Beginner
Beginner
Avatar

Joined: 30 Jun 14
Location: Milan Italy
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ggirarde Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jul 14 at 11:18AM
CapturePage and DrawCapturedPage ... very interesting suggestion.

Ty a lot for your response :)
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 23 Oct 14 at 2:13PM
Finally I have time to finish it.


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

Edit: Typo


Edited by mLipok - 27 Oct 14 at 8:43PM
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
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