Edge displays “123456” in PDF but prints “114447”(developer.microsoft.com) |
Edge displays “123456” in PDF but prints “114447”(developer.microsoft.com) |
It's not just the numbers that are misprinted, but the text inside those cells too, which suggests that Edge's PDF engine is re-rendering the original PDF, rather than printing the original PDF as is, which I thought was the entire point of using PDF in the first place.
But maybe this is an edge case? In the sense that Microsoft assumes that given a PDF file, if a user wants to "Print to PDF", the user should just save the PDF file. "Print to PDF" is ostensibly used to convert HTML/DOC into PDF format.
It is common that when you "print to PDF" you take the output of the printer and serialize that to PDF. I use this feature often on my Mac (which I think many would claim has excellent support for dealing with PDF files) to build a PDF that is stripped of any interactive forms: so as to get an output which is only the PDF "as printed".
Interesting; sort of like taking an old Fireworks .fw.png file, and then exporting it to PNG, to get rid of the Fireworks project data. Never thought of using "Print to PDF" this way!
That's to be expected. The bitmap which Edge has rendered to the screen is not what will be sent to the printer driver. Instead, rich vector graphics will be sent. On Windows, the native print format is XPS, so this is most likely a bug in how Edge converts PDF to XPS for printing.
For simpler use cases Windows' graphics APIs can be used to both render to bitmap and to XPS but when printing something as rich and sophisticated as PDF better results are achieved by directly targeting the native print format, such as PCL, PostScript, or XPS. I suspect that's what the Edge devs have done and why it's producing different results on screen and in print.
Slow clap.
It is, Edge caused case
[1] https://abbyy.technology/en:kb:tip:jbig2_compression_and_ocr
http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_...?
Of course, reflowing the document is really painful with that source.
(Also the thing where it inserts line breaks at the end of every print line is maddening)
I cry every day I'm on windows and need to do those simple things which Preview made so easy while being light.
Thank you for this!
I don't think it was very common at Apple for an individual engineer to conceive, implement, and ship a feature like this. There was a general sentiment on the team of "let's do something with signatures," but we knew that very few people had scanners. We thought about touchpad input, but decided against it at the time. (That came much later, in either 10.11 or 10.12)
I was thinking, "well, almost no one has a scanner, but practically everyone using this application has a camera in their Mac." I built the initial prototype in OpenCV and then ported it to Apple's vDSP/Accelerate frameworks.
My favorite detail, which doesn't seem to be present in 10.12, is that you could just click on a horizontal line in a PDF; since I recorded the signature's offset relative to the baseline superimposed on the camera image, it would place the signature exactly on the line, with descenders nicely descending.
I've since moved on from macOS/iOS development, but I had a really positive experience at Apple. Met so many amazingly talented people there.
I used to hate PDFs before getting a Mac, but the first-class support in Preview, with features like that (along with the ability to tear out, reorder and attach pages) made me change my mind.
It must have saved many many millions of sheets of paper.
Quartz is like QuickTime plus something like OpenGL shaders plus something like NeXTStep "display PDF". I have no idea if this encouraged PDF integration into the display model.
Rather, I would say that NeXT, and then Apple, had some great IP and cross-licensing of PostScript and PDF display tech, and so they could ship the OS distribution with PDF as the printing model.
That is, one reason Windows might today re-render PDF → XPS → PDF is that they had needed to create display tech like PDF anyway, and so they did, and this was after humans had been playing with HTML for a while... Silverlight was pretty.
That's not what's happening unless you have a printer which directly supports PDF. Most likely what is happening on Windows is either:
PDF → XPS → PCL
PDF → XPS → PostScript
Depending on the printer. Which makes far more sense and is analogous to what OS X does: PDF → Quartz → PCL
PDF → Quartz → PostScript
There's really no notable difference between these two approaches as both Quartz and XPS are based on the same printing model as PDF. Don't confuse Quartz with PDF just because it offers import/export to PDF - Quartz has its own internal imaging model.