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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Page Orentation
Author Message
Anonymous
# Posted: 10 Jun 2005 19:28


How do i change the page to landscape as i create a pdf document from vb?

Stanislav
# Posted: 10 Jun 2005 20:26


Hi !

This can be done using PDFPAGE_Orientation method:
PDF.PDFPAGE_Orientation(1).

1 is the code for poLandscape - TxPDFPageOrientation enum of PDF Creator Pilot.

Thank you very much !

Best regards,
Stanislav

arunjoseph
# Posted: 3 Feb 2006 20:51


How can I do the same in ASP?

Stanislav
# Posted: 3 Feb 2006 21:04


Hello,

PDF.PDFPAGE_Orientation = 1

Thank you very much !

Best regards,
Stanislav
Two Pilots

arunjoseph
# Posted: 3 Feb 2006 21:15


Hi,
I am getting a "Catastrophic failure" when I tried using PDF.PDFPAGE_Orientation = 1.
HTTP 500.100 - Internal Server Error - ASP error

... here is the code:

Set PDF = CreateObject("PDFCreatorPilot2.piPDFDocument")

' initialize PDF Engine
PDF.StartEngine "demo@demo", "demo"

' set GenerateInMemoryFile flag to TRUE so keep PDF only in the memory
PDF.GenerateInMemoryFile = TRUE
PDF.PDFPAGE_Orientation = 1
' start document generation
PDF.BeginDoc
Set HTML = CreateObject("HTML2PDFAddon.HTML2PDF2")
' initialize HTML engine
HTML.StartHTMLEngine "",""
HTML.AutoAdjustContentWidth =TRUE
' connect to PDF Creator Pilot instance
HTML.ConnectToPDFLibrary PDF
' load HTML file from URL
HTML.LoadHTMLFile "c:/trend.htm"
' convert whole HTML document into PDF
HTML.ConvertAll
' disconnect from PDF Creator Pilot instance
HTML.DisconnectFromPDFLibrary
Set HTML = nothing
' finalize PDF generation
PDF.EndDoc

Thanks,
Arun

Stanislav
# Posted: 4 Feb 2006 10:17


Dear Arun,

Just put PDF.PDFPAGE_Orientation = 1 under PDF.BeginDoc:
PDF.BeginDoc
PDF.PDFPAGE_Orientation = 1

Thank you very much !

Best regards,
Stanislav
Two Pilots

Anonymous
# Posted: 25 Oct 2006 20:40


How can I do the same in ASPX in Visual C#?

Stanislav
Member
# Posted: 25 Oct 2006 21:18


Hello,

You can get example here:

http://www.colorpilot.com/~spanasik/examples/Orien tation.zip

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Jerry
# Posted: 17 Nov 2006 23:43


Arunjoseph,
hi,
I run your codes,but it's very slowly.
I don't know why.
Can you tell me how to change it?

Jerry

Stanislav
Member
# Posted: 20 Nov 2006 12:23


Dear Jerry,

Please try to install latest version of the libraries.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

 

 

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

 

Page top