wxPdfDocument::Image
wxPdfDocument::Image
I can
Re: wxPdfDocument::Image
[quote="Rubik"]I can
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
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
imageFile becoms false and the parse() funktions returns false.
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);
}
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);
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.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 codeuri.HasScheme() becoms true and the row in the if-case is not executed.Code: Select all
if (!uri.HasScheme()) { fileURL = wxFileSystem::FileNameToURL(m_name); }
In the samples (tutorial2) the if-case returns false and the row is executed.
This leds to that in my project on this rowimageFile becoms false and the parse() funktions returns false.Code: Select all
wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);
Regards,
Ulrich
I think I have localist the problem to this row
In my projekt it tryes to open fileURL
Code: Select all
wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);
[quote="Rubik"]I think I have localist the problem to this row
In my projekt it tryes to open fileURL
Code: Select all
wxFSFile* imageFile = wxPdfImage::GetFileSystem()->OpenFile(fileURL);