[Interest] PDF creation issues with QT5

Israel Brewster israel at eraalaska.net
Wed May 29 20:01:49 CEST 2013


On May 28, 2013, at 3:10 PM, Israel Brewster <israel at eraalaska.net> wrote:

> On Apr 4, 2013, at 9:48 AM, Israel Brewster <israel at eraalaska.net> wrote:
> 
>> I am trying to create a PDF document using QT5 on Mac OS X 10.8. In Qt 4 I had the following code to accomplish this, which worked perfectly:
>> [...snip...]
> 
> I just tried this with the 5.1 beta and I'm seeing the same behavior - when using QPDFWriter, I either get a tiny page size or A4 - I can't seem to get it to use standard letter, or tabloid, or any other size the user may want.
> 
> Is anyone else seeing this behavior? Or is it only me?

Well, after some effort and tweaking, I managed to get the QPrinter based approach working under Qt 5.1 - actually with code almost identical to my original code. I had to make the content narrower to fit on the page, since the setPageMargins command is (apparently) being ignored, resulting in a HUGE left margin that cut off the right side of my content.

The QPDFWriter approach still misbehaves as it did in 5.0.x (I'll see if I can whip up a simple example app demonstrating that). Of course, 5.1 is currently unusable for me, not only because it is still beta, but because menus appear to be having issues - my quit and preferences functions are not properly merged into the application menu, and keyboard shortcuts in the menu are ignored when the cursor is in a text field. But that's a whole different issue.

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Era Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x7293
-----------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130529/24b91a0e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130529/24b91a0e/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130529/24b91a0e/attachment-0001.html>


More information about the Interest mailing list