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 - SaveToFile fails
  FAQ FAQ  Forum Search   Register Register  Login Login

SaveToFile fails

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


Joined: 30 Jun 25
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryK Quote  Post ReplyReply Direct Link To This Post Topic: SaveToFile fails
    Posted: 30 Jun 25 at 9:39PM
SaveToFile fails.  
1. Is there a way to find out why?  It has been working fine for several years, until now.
2. Is there a limit to the length of the path?  The length might be a bit longer than used previously, but well below the Windows path length maximum.

Using C and the 1711 library.

Thank you.
Back to Top
swb1 View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 05 Dec 05
Location: United States
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote swb1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jun 25 at 10:05PM
There is not much to the SaveToFile function. A drill down through the code gets us to this API call which tests for save capability:

<result> = CreateFileW(PWideChar(FileName), GENERIC_READ or GENERIC_WRITE,
    0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)

If that returns false, you cannot save a file.
 
In Delphi I could call System.GetLastError - RAD Studio API Documentation and I might learn "why". I do not know if you have that option in C.

My guess is that the OS is saying "No" for some reason. Maybe permissions, bad path, file in use, etc. but I don't think there is anything about QPL that should be the source of the issue. 
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 5 hours 58 minutes ago at 8:55PM
Like swb1 told already.
Perhaps the file you wanna save is locked by another process?
Try LastErrorCode to get a more detailed error.

Cheers,
Ingo

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