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 - problem with special characters in file paths
  FAQ FAQ  Forum Search   Register Register  Login Login

problem with special characters in file paths

 Post Reply Post Reply
Author
Message
Cord Viking View Drop Down
Beginner
Beginner


Joined: 08 Nov 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cord Viking Quote  Post ReplyReply Direct Link To This Post Topic: problem with special characters in file paths
    Posted: 08 Nov 10 at 10:25AM
The following file path specification for function signfile() will result in an errorcode 2 "pdf-file not found":
 
AFilePath := 'E:\Users\j.düvel\AppData\Local\test.pdf';
 
AQuickPDF.SignFile(AFilePath,...)
 
We have to create this path from the environment variable %USERPROFILE%, so we have no control over what username has been choosen.
 
Is there a solution for this problem?
Back to Top
Cord Viking View Drop Down
Beginner
Beginner


Joined: 08 Nov 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cord Viking Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 10 at 10:28AM
The editor also has a problem with these chars, hope display is correct here:
 
AFilePath := 'E:\Users\j.düvel\AppData\local\test.pdf'
Back to Top
Cord Viking View Drop Down
Beginner
Beginner


Joined: 08 Nov 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cord Viking Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 10 at 10:30AM
Disabled wysiwyg, hope display is correct now:

AFilePath := 'E:\users\j.düvel\AppData\local\test.pdf'
Back to Top
Cord Viking View Drop Down
Beginner
Beginner


Joined: 08 Nov 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cord Viking Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 10 at 10:33AM
sorry - now way, giving up!
Anyway, the problem should be the dot, so use this as example:

AFilePath := 'E:\users\j.duevel\AppData\local\test.pdf';
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 10 at 11:12AM
You need to encode your string with UTF-8 encoding if it uses any unicode characters.

var
 
FileNameW: WideString;
 
FileNameA: AnsiString;
begin
 
FileNameW := WideString('C:\unicode') + WideChar(20081) +
WideString('\test.pdf');
 
FileNameA := Utf8Encode(FileNameW);
 QP
.SaveToFile(FileNameA);
end;
Back to Top
Cord Viking View Drop Down
Beginner
Beginner


Joined: 08 Nov 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cord Viking Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 10 at 11:39AM
Problem solved! Thank's a lot!
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