Print Page | Close Window

Load a PDF File

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=491
Printed Date: 19 May 24 at 9:07AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Load a PDF File
Posted By: lecameleon
Subject: Load a PDF File
Date Posted: 23 Aug 06 at 5:51AM
Hi,

I've got a little problem using isedQuickPdf Dll version.
I try to load a PDF file with LoadFromFile or DAOpenFile.
I can do this with no real problem only under conditions.
When my PDF got a normal name like "Buy list.pdf", no problem, but when my PDF file has a particulary name like "PDF-78400-100830 Buy list.pdf", impossible to load it ! Each time, the function returns me 0
Is there some restrictions about the name of the PDF file to load ?
Thanx



Replies:
Posted By: Michel_K17
Date Posted: 30 Aug 06 at 12:03AM
It's always worked for me, even with complex filenames.

-------------
Michel


Posted By: Ingo
Date Posted: 30 Aug 06 at 2:41AM
Hi!

I've tested it with several names (like you described here) - No problems.

Perhaps it's having to do with short filenames, missing "" or country code tables...?

Good luck,
Ingo



Posted By: lecameleon
Date Posted: 01 Sep 06 at 11:03AM
Hi

Thanks for answers.

I tried several methods, and since I have a filename a little complex or with numbers in it, I always get an error opening the file.

My goal is to read the number of pages in my document.

This is what I do :

LoadFromFile('Liste des familles du 15072006.pdf')
nbPages# = PageCount()

Can one of you send an example of opening a file with a 'strange' name please ?
Thanks


Posted By: JanN
Date Posted: 01 Sep 06 at 12:27PM
You wrote:
"Buy list.pdf" works
"PDF-78400-100830 Buy list.pdf" doesn't
---

Have you tested with different string lengths? Perhaps you can find a limit for the length of the filename?


Posted By: hbarclay
Date Posted: 01 Sep 06 at 1:20PM
Originally posted by lecameleon lecameleon wrote:

Hi

I tried several methods, and since I have a filename a little complex or with numbers in it, I always get an error opening the file.



Is the file you are trying to open on a network drive or a local hard drive?

Harry



Posted By: lecameleon
Date Posted: 04 Sep 06 at 4:37AM
The files are on a network drive
But the problem is the same if they are on a local drive c:\


Posted By: lecameleon
Date Posted: 04 Sep 06 at 5:18AM
Originally posted by JanN JanN wrote:

You wrote:
"Buy list.pdf" works
"PDF-78400-100830 Buy list.pdf" doesn't
---

Have you tested with different string lengths? Perhaps you can find a limit for the length of the filename?


U'r right, I have found a file limit of 30 chars.
Can someone confirm this please ?


Posted By: Ingo
Date Posted: 04 Sep 06 at 9:24AM
Hi!

That's not good ... but that's not your problem. "PDF-78400-100830 Buy list.pdf" has only 29 digits ;-)

Best regards,
Ingo


Posted By: lecameleon
Date Posted: 04 Sep 06 at 9:40AM
yes it's my problem
When I give the name of file, it was an example
all my files start with PDF-78400-100830-
so when I wrote my post, I've put only 29 chars.
But now, I made some other tests and when I go up to 30 chars, I can read my PDF !
Why do U say it's not good ?
U don't have this limit ?


Posted By: JanN
Date Posted: 04 Sep 06 at 10:51AM
As far as I know, the DLL functions themselves are not limited to a number of chars.

Which programming language are you using? Can you post a piece of code?


Posted By: Michel_K17
Date Posted: 04 Sep 06 at 10:56AM
I just tested sample code up to 50 characters. I also tested the filename you provided (PDF-78400-100830 Buy list.pdf) and it works fine for me. I agree with JanN, please show your sample code: the problem might be elsewhere.

-------------
Michel


Posted By: lecameleon
Date Posted: 04 Sep 06 at 11:23AM
my programming language is Clarion from SoftVelocity so I use the dll version

here a sample code

Loc:fileToLoad = 'PDF-74800-100830 Buy List from 01082006.pdf' !! I'm locate in the good directory

return# = LoadFromFile(clip(Loc:fileToLoad))
message('Return => ' & return#)
message(PageCount())

The return variable always contains 0 if I put a file with a name length > 30 chars. Else It works ok.

Another sample of code with I've tested :

openFile# = DAOpenFile(Loc:fileToLoad, '')
message(openFile#)
nbPages# = DAGetPageCount(openFile#)
message('Nb Pages = ' & nbPages#)
closeFile# = DACloseFile(openFile#)


Posted By: Michel_K17
Date Posted: 04 Sep 06 at 11:31AM
How do you declare the varible Loc:fileToLoad? Is it a fixed length string by any chance? If the variable is limited to 30 characters, it might be ignoring the extra text you are trying to place in the variable.

Can you do a "debug.print" or view the content of that variable after you have loaded the filename into it?

-------------
Michel


Posted By: lecameleon
Date Posted: 05 Sep 06 at 4:36AM
my variable is a String(255) and when I look at then content, the filename is correctly load in it.

i really don't know where my error is....



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