Thread Rating:
  • 268 Vote(s) - 2.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print-graphic-pdfプロシージャの仕様について
09-30-2011, 04:05 PM,
#1
Tongue  print-graphic-pdfプロシージャの仕様について
Curl Ver8から新たに導入された、指定したGraphicからPDFを出力できるprint-graphic-pdfプロシージャについてですCool


Graphicが横長だと、PDFに出力した際に画面が切れてしまいます。
(引数orientationにてPageOrientation.landscapeを設定することで横長に出力されるかと思ったのですが、違ったみたいです・・・)

もし誰か解決方法をお分かりでしたら教えて下さいHuh
Reply
09-30-2011, 06:36 PM, (This post was last modified: 09-30-2011, 07:37 PM by 森口 慶紀.)
#2
Wink  RE: print-graphic-pdfプロシージャの仕様について
print-graphic-pdfプロシージャの引数"page-description"でページサイズ(今回はA4)を指定すると、
横向きにすることができましたSmile
Code:
{import * from CURL.GRAPHICS.PRINTER}
{import * from CURL.LANGUAGE.REGEXP}

{let pf:#PDFPrintRootFrame}
{let rect1:Graphic = {Fill border-width = 2cm, border-color = "green", width = 210mm,
                         height = 287mm, background = "white"}}
{value rect1}

{CommandButton label="test printing",
    {on Action do
        {output "Default Printer: " & {Printer.get-default-printer}}
        def pageDescriptions = {Printer.get-page-description {String {Printer.get-default-printer}}}
        let ppd:#PrintPageDescription
        {if-non-null pageDescriptions then
            {for pd in pageDescriptions do
                {if {regexp-match? "A4", pd.description} then                    
                    set ppd = pd
                    {break}
                }
            }
        }
        {if-non-null ppd then
            set pf = {print-graphic-pdf rect1,
                         page-description = ppd,
                         {choose-file style=FileDialogStyle.save-as} asa Url,
                         print-page-numbers?=false,
                         orientation=PageOrientation.landscape,
                         multi-part?=true
                     }
            {pf.done-printing}
        }
    }
}
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Print data NamDH 5 4,572 04-04-2017, 02:27 PM
Last Post: dyoshida
  print-graphic-pdfに関して nmyzk 1 3,431 05-11-2012, 05:23 PM
Last Post: nmyzk
  How to know if Graphic object is being displayed? alchimiste 5 6,619 11-05-2011, 12:38 AM
Last Post: RobertShiplett
Forum Jump:


Users browsing this thread:
1 Guest(s)