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 »

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

Re: wxPdfDocument::Image

Post by utelle »

[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 »

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: 1128
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle »

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 »

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: 1128
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle »

[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