PDA

View Full Version : Weird Cross Platform Printing Problems



igor
3rd August 2007, 19:48
I am trying to write a simple calendar generator to print out two pages for a calendar month.
My primary platform is Mac, but I am trying to write portable code that could be compiled on Windows as well.
:D
I am using a Parallels VM with Windows XP and the Qt-Win-MinGW setup to test the Windows version.

The same code, compiled on each platform, produces very different results.
:confused:
Here are PDF captures of the output of each
Mac.pdf (http://www.divshare.com/download/1439565-c7e)
Windows.pdf (http://www.divshare.com/download/1439569-9fe)

On the right hand page of the Windows version, the boxes with the day numbers are solid grey
:confused:
Here's my source.
DIY_Two_Page_Month.zip (http://www.divshare.com/download/1439250-a09)

Here's a static Mac application
DIY_Two_Page_Month.Mac.zip (http://www.divshare.com/download/1439557-891)

Here's a static Windows executable
DIY_Two_Page_Month.Win.zip (http://www.divshare.com/download/1439563-ab1)

Any clues would be appreciated. :o

jacek
5th August 2007, 19:12
Is that Blue Highway font available on your windows machine?

PS. Please use attachments instead of external sites.

igor
6th August 2007, 01:44
Is that Blue Highway font available on your windows machine?


Yes, and here's a link to it so you can use it, too

Blue Highway font (http://www.dafont.com/blue-highway.font)

jacek
6th August 2007, 01:57
Yes, and here's a link to it so you can use it, too

Blue Highway font (http://www.dafont.com/blue-highway.font)
What does QFont( "Blue Highway").exactMatch() return?

igor
6th August 2007, 04:44
What does QFont( "Blue Highway").exactMatch() return?

I have no idea.

Why do you ask ?

How does this relate to my question ?

jacek
7th August 2007, 15:19
I have no idea.
Then check it.


Why do you ask ?

How does this relate to my question ?
I want you to check if that font was properly installed on your system. If you compare "y" or "g" from those PDFs, you'll see that they're different, which might mean that Qt uses different font on windows.

igor
7th August 2007, 16:17
:eek:
You miss the point of the original question.
The problem I am experiencing has nothing to do with fonts.
The line setting the font can be removed without problem.

marcel
7th August 2007, 16:25
Well, if you look in QPdfBaseEnginePrivate::drawTextItem, you will see that a substituted font can have an unpleasant effect.

I've seen the two pdf's and I am not sure if this is a
font problem. The only way to see what's wrong is to take Acrobat Professional and PdfCan opener and examine/compare the page streams and resource dictionaries.
I would do that, but I'm on vacation( meaning I don't have Acrobat Pro at home :)).

It looks more like when an unhandled exception occurs in code :).

Regards