wxPdfDocument::Image

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
Rubik
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Apr 28, 2006 4:48 pm

wxPdfDocument::Image

Post by Rubik » Fri Apr 28, 2006 5:11 pm

I can

utelle
Moderator
Moderator
Posts: 842
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxPdfDocument::Image

Post by utelle » Fri Apr 28, 2006 10:25 pm

[quote="Rubik"]I can

Rubik
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Apr 28, 2006 4:48 pm

Post by Rubik » Sat Apr 29, 2006 11:27 am

I have stept the code with a debugger and found the thing that is different in the samples and my projekcts.

When my code enters wxPdfImage::Parse() the path to tha image is correct.

Then coms the code

Code: Select all

 if (!uri.HasScheme())
  {
    fileURL = wxFileSystem::FileNameToURL(m_name);
  }
uri.HasScheme() becoms true and the row in the if-case is not executed.
In the samples (tutorial2) the if-case returns false and the row is executed.

This leds to that in my project on this row

Code: Select all

wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);
imageFile becoms false and the parse() funktions returns false.

utelle
Moderator
Moderator
Posts: 842
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle » Sat Apr 29, 2006 12:36 pm

Rubik wrote:I have stept the code with a debugger and found the thing that is different in the samples and my projekcts.

When my code enters wxPdfImage::Parse() the path to tha image is correct.

Then coms the code

Code: Select all

 if (!uri.HasScheme())
  {
    fileURL = wxFileSystem::FileNameToURL(m_name);
  }
uri.HasScheme() becoms true and the row in the if-case is not executed.
In the samples (tutorial2) the if-case returns false and the row is executed.

This leds to that in my project on this row

Code: Select all

wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);
imageFile becoms false and the parse() funktions returns false.
Without knowing the exact content of the member variable m_name and the exact content of fileURL after execution of FileNameToURL it's hard to say what's going wrong. Please give an example of these values. Maybe this gives us a hint. If the sample tutorial2 works and your project doesn't there must be a difference in the file name specification.

Regards,

Ulrich

Rubik
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Apr 28, 2006 4:48 pm

Post by Rubik » Sat Apr 29, 2006 2:31 pm

I think I have localist the problem to this row

Code: Select all

wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);
In my projekt it tryes to open fileURL

utelle
Moderator
Moderator
Posts: 842
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle » Sat Apr 29, 2006 5:52 pm

[quote="Rubik"]I think I have localist the problem to this row

Code: Select all

wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);
In my projekt it tryes to open fileURL

Post Reply