Open and print pdf

How do i open a PDF (NOT IN READER) and print it.

So in code, open a pdf file and print it out to the printer without any user interaction.
i.e. pdf file I distribute with app that I already know its location in app folder

Mac or Windows? And you always show the print dialog.

For Mac there is CPMPrintSessionMBS.

Not tested:

open and print it ina HTMLViewer ?

My application runs on both Mac and Windows.

I already have a complicated piece of code to create say a 10 page report.

What I want to do is add a custom one page PDF to the front as the cover page,
that would allow me to change the branding on the report very easily.

The other pages are all custom coded. Trying to figure out if I can open a 1 page pdf
and either append it to the front of the report or print the one page then print the rest.

For the Mac handling PDFs is relatively simple with CoreGraphics and PDFKit (with MBS of course). On Windows I’m not sure about alternatives to DynaPDF.

How do you create your original PDF?

Windows 10 have a default virtual pdf printer.

I do not had time to check it, yet.

On Windows XP, I use PDFCreator-2_4_1-Setup.exe and it is good. If you install it, (always do that), read carefully what is on screen: by default it will install some other tool you do not really need…

MBS Plugin can indeed help.
You can download the plugin and check the examples.
via CoreGraphics or PDFKit we can print on Mac and via DynaPDF on Windows.