Live data from Hacker News

Edge displays “123456” in PDF but prints “114447”

developer.microsoft.com

61–70 of 71 posts

Re: Edge displays “123456” in PDF but prints “114447”

#61
post #32

Earlier quoted context omitted.

I worked on Preview at Apple from 2008-2011 and created the signature capture feature. It's always cool to hear people talk about it!

I've demonstrated and gotten literally hundreds of users to fall in love with it. Thanks for that!

That's so amazing to hear! It pretty much flew under the company radar--most people didn't find out about it until the first reviews of the Lion beta came out.

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.

Re: Edge displays “123456” in PDF but prints “114447”

#62

Earlier quoted context omitted.

Absolutely right. PDF fixes the problem Word documents have where different versions of Word tends to render the document ever so differently. Usually in a way that seems to mess up all those beautiful page breaks you meticulously planned. It does this by every element having absolute positioning.

And is the scourge of every paper I want to read on my Kindle. Everyone publishes their PDFs and there seems to be no reliable way to reflow them.

I use calibri for my E-Books, and it seems to do a pretty good job of reflowing PDFs(and exporting to mobi). YMMV though, especially if headers/footers are badly done.

Re: Edge displays “123456” in PDF but prints “114447”

#63

Earlier quoted context omitted.

Absolutely right. PDF fixes the problem Word documents have where different versions of Word tends to render the document ever so differently. Usually in a way that seems to mess up all those beautiful page breaks you meticulously planned. It does this by every element having absolute positioning.

Off-topic, but you seem like you might know: why does text copied from PDFs sometimes have messed-up spaces? It seems to guess where the spaces should go based on kerning, so with justified text, a widely-spaced line may come out with a space between each letter, while a narrowly-spaced one has no spaces at all. (Also the thing where it inserts line breaks at the end of every print line is maddening)

That's often caused by the font specified in the PDF not being available on the platform where the PDF viewer is running, so a different font has been used instead.

Re: Edge displays “123456” in PDF but prints “114447”

#64
post #23

The PDF "format" never fails to amuse me. Check out the talk "OMG WTF PDF" [0] from the 27. Chaos Communication Congress, it's eye opening. 0: https://media.ccc.de/v/27c3-4221-en-omg_wtf_pdf

I still love that the SHA 1 collision was able to change the color of an image in a PDF, due to the junk data present.

Re: Edge displays “123456” in PDF but prints “114447”

#65
post #44

Earlier quoted context omitted.

It's such an awesome feature. I don't use macOS as much as I used to but I will always switch to my Mac when I get a doc to sign, which is a lot. It must have saved many many millions of sheets of paper.

To be fair, on a Microsoft Surface you would just use your pen to sign directly on the screen which is much more natural. It doesn't make any sense to me that Steve Jobs was so anti-pen, while also pushing for intuitive interaction.

I think he was anti the crappy pens and digitising systems available at the time, the requirement to have a pen to use the device at all and the poor interface designs they encouraged.

Re: Edge displays “123456” in PDF but prints “114447”

#66

Earlier quoted context omitted.

The built-in MacOS support for PDF is great. Any app that can print to a printer can print to a PDF file. And the Preview app, despite its name, can edit PDFs to add annotations (text, graphics), add or remove pages, etc. There's also a feature by which you sign your name on a piece of paper, hold it up to the camera, and it will capture it and insert it into a the document. It's convenient that these are built in an…

Doesn't Quartz use PostScript for rendering the MacOS desktop?

NeXT Step did, but they switched to 'Display PDF' in OSX to save licensing costs as PDF is free to use.

Re: Edge displays “123456” in PDF but prints “114447”

#67
post #35

Earlier quoted context omitted.

Doesn't Quartz use PostScript for rendering the MacOS desktop?

NeXT used Display PostScript, and I would create widgets by writing PostScript code. 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 distri…

> PDF → XPS → PDF

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.

Re: Edge displays “123456” in PDF but prints “114447”

#69

Earlier quoted context omitted.

Off-topic, but you seem like you might know: why does text copied from PDFs sometimes have messed-up spaces? It seems to guess where the spaces should go based on kerning, so with justified text, a widely-spaced line may come out with a space between each letter, while a narrowly-spaced one has no spaces at all. (Also the thing where it inserts line breaks at the end of every print line is maddening)

That's often caused by the font specified in the PDF not being available on the platform where the PDF viewer is running, so a different font has been used instead.

Hmm. I may have been unclear--the PDF reads fine, but if I copy and paste some text into a text editor, I get the messed-up spaces. It seems as if the PDF doesn't encode text as text but just as a series of characters and locations, leaving spaces unrecorded, so when copy-pasting the reader has to guess from the distance between letters.
Post reply on HN