PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri May 10, 2024 12:05 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Dec 22, 2009 9:58 am 
Offline

Joined: Tue Dec 22, 2009 9:48 am
Posts: 6
I have create pdfdocument :
Code:
 

PdfDocument document    = new PdfDocument();
               
                document.Info.Author    = "Ordinazioni";
                PdfPage page            = document.AddPage();

                page.Orientation = PageOrientation.Landscape;
                page.Width = 300;
               pg.Height = XUnit.FromMillimeter(1000);

..... my code ........

 document.Save("c:\\documenti\\file.pdf");



for print the docuemnt :

Code:
 
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();

            try
            {
                // Get the path that stores user documents.
//                string myDocumentsPath =     Environment.GetFolderPath(Environment.SpecialFolder.Personal);

                myProcess.StartInfo.FileName        = "c:\\documenti\\file.pdf";
                myProcess.StartInfo.Verb            = "Print";
                myProcess.StartInfo.Arguments       = "\"" + cStampante + "\"";
                myProcess.StartInfo.CreateNoWindow  = true;
               
                myProcess.Start();
            }

            catch (System.ComponentModel.Win32Exception e)
            {
                if (e.NativeErrorCode == ERROR_FILE_NOT_FOUND)
                {
                    Console.WriteLine(e.Message + ". Check the path.");
                }

                else if (e.NativeErrorCode == ERROR_ACCESS_DENIED)
                {
                    // Note that if your word processor might generate exceptions
                    // such as this, which are handled first.
                    Console.WriteLine(e.Message +
                        ". You do not have permission to print this file.");
                }
            }


My Problem is: how to imposes the propety page to Anybody?

Scusate il mio inglese .......


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 04, 2010 6:35 pm 
Offline

Joined: Tue Dec 22, 2009 9:48 am
Posts: 6
I set the parameters: - Auto-rotate and CENTRA - Page setup = null how????


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group