Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / How to send pdf document to printer
Author Message
Anonymous
# Posted: 6 May 2011 07:30


hello

i trying printing my documet in printer and my VBA code doesnt working

PDF.BeginDoc
PDF.PDFPAGE_SetAnnotation 100, 200, 110, 210, "Title",_
"Here goes annotation contents...", 255,_
false, false, false, false, false, false, false, false, 0
PDF.PDFANNOTATION_Flags_afPrint = True
PDF.EndDoc

please can you help me ?

max.f
# Posted: 6 May 2011 08:24


Hello,

by default Adobe Acrobat does not print any annotation or notes. So you need to enable this in preferences.
Go to:
Edit --> Preferences --> Commenting
and enable option "Print notes and pop-ups"

(here is a screen shot: http://www.colorpilot.com/~max.f/scr1.gif )

--
Max Filimonov

Anonymous
# Posted: 6 May 2011 08:41


THX,

And how print actual opened page in PDF document ?

i need something like "PDF.PrintActualPage" or Print viewed page...

Thank You

max.f
# Posted: 6 May 2011 08:45


You can't send to printer some page from PDF while it is being generated.
But you may do it after the PDF is generated and saved to disk.
Use your programming language reference to know how to send a document to a printer.

--
Max Filimonov

Anonymous
# Posted: 6 May 2011 16:12


Yes you right,

i need code to print pdf file from memory, if this code exist.

yet i use this working code :
i must edit pdf file then save pdf to disk and after save i can print my file, this is not the best but its good alternative for me

Thank You

Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Dim result As Long
result = ShellExecute(0&, "print", "C:UsersMarekDesktop1-L-0006_1test.pdf", vbNullString, vbNullString, vbNormalFocus)

max.f
# Posted: 11 May 2011 07:37


Well, it depends on the programming language you use.

The basic concept is: create device context based on the printer you need (CreateDC function), draw to that context (PDF Creator Pilot's method DrawPageToDC)

Here is the sample for C++ how to create DC:
http://msdn.microsoft.com/en-us/library/dd183521(v =vs.85).aspx

Here is a reference for DrawPageToDC:
http://www.colorpilot.com/pdfcreatorpilotmanual/IP DFDocument4/DrawPageToDC.html

--
Max Filimonov,
max.f@colorpilot.org

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.014

 

Page top