Hello,
How do I set programmatically landscape printing. I open existing pdf and try to access page-objects "Landscape" attribute but I can not find ObjectAttribute method. If ObjectAttribute is not member of iacDocument.
I also tried to get PageFormat and set it's Landscape property to true but it didn't help either. I am using PDF Creator .NET 2.0 g-3.
'...
Dim fmt As Amyuni.PDFCreator.IacPageFormat
doc = New Amyuni.PDFCreator.IacDocument(Me)
If doc.Open(fs, "") Then
fmt = doc.GetPageFormat()
fmt.Landscape = True
doc.Print("", False)
'...
Thanks in advance.
Mikko
Landscape printing
Hello,
Are you using PDF Creator or PDF Creator.Net? I guess version 2.0g-3 is for the Creator the .Net version is g and not g-3.
If you wish to set a page to landscape you can use the following call:
or you can using the below C#code:
Hope this helps.
Are you using PDF Creator or PDF Creator.Net? I guess version 2.0g-3 is for the Creator the .Net version is g and not g-3.
If you wish to set a page to landscape you can use the following call:
Code: Select all
.ObjectAttribute("Pages[1]", "Landscape") = True
Code: Select all
using ( IacDocument document = new IacDocument( null ) )
{
Amyuni.PDFCreator.IacPage Page1 = document.GetPage(1);
document.Open (testfile,"");
Page1.AttributeByName("Rotate").Value = 90;
using(System.IO.FileStream newfile = new System.IO.FileStream("Landscape.pdf", FileMode.Create, FileAccess.Write, FileShare.Read))
{
document.Save(newfile,0);
}
Hope this helps.
Hi, thanks for reply. I found from the manual that you can set the landscape on by using .ObjectAttribute(... but the problem is which objects method it is?
I am using following code (vb.net):
'....
Dim doc As Amyuni.PDFCreator.IacDocument
Dim fs As System.IO.FileStream
doc = New Amyuni.PDFCreator.IacDocument(Me)
fs = New System.IO.FileStream("c:\amyuni\sample.pdf", System.IO.FileMode.Open)
If doc.Open(fs, "") Then
doc.ObjectAttribute("Pages[1]", "Landscape") = True
doc.Print("", False)
End If
fs.Close()
'....
This does not work because compiler says 'ObjectAttribute' is not a member of 'Amyuni.PDFCreator.IacDocument'. I am using PDF Creator .NET 2.0g.
Thanks in advance
Mikko
I am using following code (vb.net):
'....
Dim doc As Amyuni.PDFCreator.IacDocument
Dim fs As System.IO.FileStream
doc = New Amyuni.PDFCreator.IacDocument(Me)
fs = New System.IO.FileStream("c:\amyuni\sample.pdf", System.IO.FileMode.Open)
If doc.Open(fs, "") Then
doc.ObjectAttribute("Pages[1]", "Landscape") = True
doc.Print("", False)
End If
fs.Close()
'....
This does not work because compiler says 'ObjectAttribute' is not a member of 'Amyuni.PDFCreator.IacDocument'. I am using PDF Creator .NET 2.0g.
Thanks in advance
Mikko
Hello,
For the error message please get back to support@amyuni.com
The sample that turn the page page 90 degrees works under .Net I try it.
For the error message please get back to support@amyuni.com
The sample that turn the page page 90 degrees works under .Net I try it.