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 - Mac :: LoadFromString Bug ?
  FAQ FAQ  Forum Search   Register Register  Login Login

Mac :: LoadFromString Bug ?

 Post Reply Post Reply
Author
Message
JMLM View Drop Down
Team Player
Team Player
Avatar

Joined: 26 Mar 13
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote JMLM Quote  Post ReplyReply Direct Link To This Post Topic: Mac :: LoadFromString Bug ?
    Posted: 05 Apr 15 at 9:26PM
I use the latest version of your library on mac 11, and the language  I use is Swift.
I can create and save PDF easily, the loadFromFile function loads the pdf, but loadFromString doesn't. 
The NSData value passed is valid and when it is recorded with writeToFile function the PDF is saved and compliant.
loadFromString just creates a blank document.

        var pdf:PdfTemplate = PdfTemplate() /// Debenu Config        
        var datas:NSData = getDocumentBlob(1) // from sqlite storage.
        pdf.pdf?.LoadFromString(datas, "")
        pdf.pdf?.SaveToFile(path)  ///Pdf is blank
             
        datas.writeToFile(path2,atomically: true); // Pdf is Ok

Objective-C

    NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

    NSString *documentPath = [searchPaths objectAtIndex:0];

    NSString *filePath = [documentPath          stringByAppendingPathComponent:@"file.pdf"];

    

    NSData *fileData = [NSData dataWithContentsOfFile:filePath];

    NSString *copy = [documentPath stringByAppendingPathComponent:@"copy.pdf"];

    

    [DQPL LoadFromString:fileData :@""];

    

    [DQPL SaveToFile:copy];

does not work either


Does someone has this failure ? 
Is something wrong in these lines of code
Thanks in advance.


Edited by JMLM - 07 Apr 15 at 12:45PM
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 Apr 15 at 7:36AM
Hi JMLM,

I think this is probably related to an issue in the import headers that we've provided with the Mac version, it's fixed internally and we'll provide the fix in the release of 11.14 next week.

I might be able to provide you with a beta build on Friday if it's urgent for you?

Cheers,
- Rowan.
Back to Top
JMLM View Drop Down
Team Player
Team Player
Avatar

Joined: 26 Mar 13
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote JMLM Quote  Post ReplyReply Direct Link To This Post Posted: 08 Apr 15 at 7:53AM
Hi Rowan,
Thanks for you reply,
It's not so urgent, I'm glad to see the progression of the Mac version, and relieved of this response.
I start my project on mac, so I can let you know the problems I have.
Cheers 
Jim
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