Print Page | Close Window

Mac :: LoadFromString Bug ?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3099
Printed Date: 05 Feb 25 at 4:56PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Mac :: LoadFromString Bug ?
Posted By: JMLM
Subject: Mac :: LoadFromString Bug ?
Date 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.



Replies:
Posted By: Rowan
Date 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.


Posted By: JMLM
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk