Xojo Conferences
XDCMay2019MiamiUSA

[MBS] PDF printing on Mac (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] DynaPDF and removing page items
Next thread: [MBS] [ANN] 17.2pr3


[MBS] CURL MissingFUnctionExcpetion   -   Garth Hjelte
  [MBS] PDF printing on Mac   -   Steve Upton
   Re: [MBS] PDF printing on Mac   -   Christian Schmitz
    Re: [MBS] PDF printing on Mac   -   Steve Upton

[MBS] PDF printing on Mac
Date: 19.04.17 19:24 (Wed, 19 Apr 2017 11:24:28 -0700)
From: Steve Upton

I have a PDF (created in InDesign) that opens OK via DynaPDF and saves fine as well.

Problem is, it doesn't print OK on Mac (printing using DynaPDF on Windows works fine but is unavailable for Mac). The transparent drop shadows become a solid 50% transparent gray, rather than tapering off to nothing as drop shadows should.

I'm trying to print the PDF using CGPDFDocumentMBS and the CGContextMBS.DrawCGPDFDocument example shown in the MBS docs.

1) Is there a way to hand an DynaPDF object over to CGContextMBS for printing? (without saving as a file first)

2) Any ideas on how to handle the drop shadow problem?

thanks

Steve

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] PDF printing on Mac
Date: 19.04.17 20:23 (Wed, 19 Apr 2017 21:23:54 +0200)
From: Christian Schmitz

> 1) Is there a way to hand an DynaPDF object over to CGContextMBS for printing? (without saving as a file first)

You can render a page as picture with DynaPDF and draw it in the CGContext.
If you do the colorspaces right and use high resolution it should work fine.

Sincerely
Christian

Re: [MBS] PDF printing on Mac
Date: 19.04.17 21:24 (Wed, 19 Apr 2017 13:24:35 -0700)
From: Steve Upton

> On Apr 19, 2017, at 12:23 PM, Christian Schmitz <<email address removed>> wrote:
>
>> 1) Is there a way to hand an DynaPDF object over to CGContextMBS for printing? (without saving as a file first)
>
> You can render a page as picture with DynaPDF and draw it in the CGContext.
> If you do the colorspaces right and use high resolution it should work fine.
>

OK. that had come to mind... but it seems a bit of a last-resort hack.

In addition is will generate some rather large print files and, if they choose to "print to PDF" which many of our users likely will, then large unsearchable PDF files..

But I can live with writing out temp files for printing. (and it's understandable that DynaPDF's in-RAM structure would be fundamentally incompatible with macOS PDF handling)

The larger problem is the transparency issue introduced in printing. I can open the original PDF in Preview and view / print without the issue. But when it's opened using CGPDFDocumentMBS and CGContextMBS.DrawCGPDFDocument is used for printing, it fails...

I'm on Sierra 10.12.4 and I also see the problem on current iOS but a colleague on OS 10.9 doesn't see the problem. Perhaps something in Apple's newer PDF rendering?

Steve

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info