How to print a page with landscape orientation ?

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
leuze
Posts: 8
Joined: Fri Aug 17 2007

How to print a page with landscape orientation ?

Post by leuze »

Hi,
my problem:
when i print pdf pages having orientation 'landscape' the printed page is not automatically rotated 90°. Due to this only half of the page is visible on the printout.

this is my code:

Code: Select all

using (FileStream file1 = new System.IO.FileStream(@"c:\Portrait_Landscape.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
      {
        IacDocument document = new IacDocument(null);

        // print to file
        document.Open(file1, "");
        bool Suc = document.StartPrint("FinePrint", false);
        for (int pageIndex = 1; pageIndex <= document.PageCount; pageIndex++)
        {
          IacPage CurrentPage = document.GetPage(pageIndex);
          IacPageFormat Format = CurrentPage.GetPageFormat();
          if (Format.Landscape)
          {
            Console.WriteLine(string.Format("P {0}: landscape", pageIndex));
            //document.RotatePage(pageIndex, IacRotatePageOption.acRotatePageRight);
          }
          else
          {
            Console.WriteLine(string.Format("P {0}: other", pageIndex));
          }
          document.PrintPage(document.GetPage(pageIndex));
        }
        document.EndPrint();
      }

as you can see, i already tried to check the format of the page and if this is 'landscape' i rotate the page. But the print result didn't look correct.

How can i print landscape pages so their content is rotated AND the print result looks like the original.

Thank you in advance !
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

I am not sure why if the page is landscapte you would need to rotate it.

Normally, if the page is landscape it will be sent as landscape to the printer.

Which version of the PDF Creator are you using?
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
leuze
Posts: 8
Joined: Fri Aug 17 2007

Post by leuze »

Hi,
I'm using the following versions of amyuni assemblies in my studio solution:

acPDFCreator.Net.dll 3.0.2735.26235
acPDFCreatorLib.Net.dll 3.0.1.0
acXMLParser.Net.dll 2.7.0.0
leuze
Posts: 8
Joined: Fri Aug 17 2007

Post by leuze »

Do you have a solution for my problem with landscape pages ?
if you need a test file, you can use the test.pdf file i already sent to your customer for the open issue #1586.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Are you using Framework 1.1 or 2.0 for .Net?
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
leuze
Posts: 8
Joined: Fri Aug 17 2007

Post by leuze »

Hi,
i'm using .net 3.0
leuze
Posts: 8
Joined: Fri Aug 17 2007

issue #1709: problem to verify with latest trial version

Post by leuze »

Dear amyuni support member,
today i downloaded the latest trial version of pdf-creator to check if my reported issue #1709 is fixed.
i replaced the old versions of dlls
acPDFCreator.Net.dll 3.0.2782.4678
acPDFCreatorLib.Net.dll 3.01a
in my visual-studio 2005 test project with the latest trial versions
acPDFCreator.Net.dll 3.0.2782.4678
acPDFCreatorLib.Net.dll 3.02a

if i start now my test-project, it fails immedeatly with a "System.IO.FileNotFoundException" exception

However with the old dlls my test-project works fine.
I'm using VS 2005 and .Net 2.0

Can you help me ?

Mit freundlichen Grüßen / kind regards
Heiko Leuze


sorry for posting this support mail directly to your forum but if i send mail to "canada.support@amyuni.com"
your spam filter reject it.

I was also not able to use your web-form at
http://www.amyuni.com/sendmail.html
to send you this message.
The web-form displayed the follwoing warning after pressing the submit button
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.amyuni.ca:25 in /data/16/1/56/124/1382450/user/1483219/htdocs/httpdocs/class.smtp.php on line 105
Post Reply