Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Print PDF

 Post Reply Post Reply
Author
Craig Richard View Drop Down
New Member
New Member
Avatar

Joined: 07 Feb 2013
Posts: 11
Post Options Post Options   Quote Craig Richard Quote  Post ReplyReply Direct Link To This Post Topic: Print PDF
    Posted: 30 May 2014 at 3:48am
I'm using TMSFMXNativePDFView to show a PDF on-screen, I don't know if I'm doing this right, but I then use
TMSFMXNativePDFView1.GetView.print(Sender);
to print the PDF, the print dialog shows (with the the PDF content) and I can print.

The problem I have is that the print dialog does not show the paper size options that printing from most other osx programs shows, so when I change printers, I can't change the paper size.

Is there a was of getting a print dialog up where I can change the paper size?
Or, is there a better (proper) way of printing?

Richard
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3465
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2014 at 3:11am
Hi, 

A combination of NSPrintPanel and NSPrintInfo should give you the maximum flexibility:


If you want to keep using an NSView, you can try the following code:

var
  vw: NSView;
begin
  vw := Macapi.AppKit.NSView(TMSFMXNativePDFView1.GetView);
  TNSPrintOperation.Wrap(TNSPrintOperation.OCClass.printOperationWithView(vw)).runOperation;
end;

Kind Regards, 
Pieter

Back to Top
Craig Richard View Drop Down
New Member
New Member
Avatar

Joined: 07 Feb 2013
Posts: 11
Post Options Post Options   Quote Craig Richard Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jun 2014 at 4:07am
Thanks Pieter, I'll have a look through those.
Your second option gives me the same result as TMSFMXNativePDFView1.GetView.print(Sender);
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down