Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - DEVMODE and PrintDocumentToFile
  FAQ FAQ  Forum Search   Register Register  Login Login

DEVMODE and PrintDocumentToFile

 Post Reply Post Reply
Author
Message
CBuilderJoe View Drop Down
Beginner
Beginner


Joined: 14 Jun 13
Location: The Universe
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote CBuilderJoe Quote  Post ReplyReply Direct Link To This Post Topic: DEVMODE and PrintDocumentToFile
    Posted: 14 Jun 13 at 10:15AM
Hi All,

currently my program is written with C++Builder XE2 and uses the dll 9.12. All is working so far, but it seems as if the PrintDocumentToFile is somewhat broken in 9.14. The output of the same PDF is now 0 bytes instead of 11k. I did not change my code (except the header and dll version dependent things). What happend ??

The second is that SetPrinterDevModeFromString does not always work correctly. In some special cases - (eg. with Toshiba unversal printer driver V7.71), changing the DEVMODE settings have no effect or the PrintDocumentToFile does uses those settings.

best regards,
Bernd

Btw: who had that curly idea to pass the DEVMODE as a string ???

Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (1) Thanks(1)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 13 at 12:18PM

I believe we have located and fixed the issue with PrintDocumentToFile generating a 0 byte file.  This will be included in the upcoming 9.15 Beta 3.

It seems that some printers don't use the DEVMODE structure as expected.   It seems some of the label printer drivers don't want to follow rules for DEVMODE.  Many drivers ignore the standard DEVMODE structure and store their settings in the extended DEVMODE header.

The DevMode string is actually an Delphi AnsiString and not a C++ string.  In Builder you should be able to pass a AnsiString to it or you may need to use the QPLBuffer functions if that doesn't work.

It is a string because the is the easiest way to pass a buffer to and from the DLL in Delphi and it is also possible to use these functions with other programming tools such as FoxPro, PowerBuilder, VB6 etc.  that don't have support for pointers.

Andrew.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store