Commit 05e42b19 authored by Oleg Korshul's avatar Oleg Korshul

write images to pdf bug

parent 4ea7f5f9
......@@ -58,6 +58,9 @@ LIBS += -L$$DESTINATION_SDK_PATH -lPdfReader
LIBS += -L$$DESTINATION_SDK_PATH -lDjVuFile
LIBS += -L$$DESTINATION_SDK_PATH -lXpsFile
LIBS += -L$$DESTINATION_SDK_PATH -lPdfWriter
LIBS += -L$$DESTINATION_SDK_PATH -lUnicodeConverter
LIBS += -L$$PWD/../../build/bin/icu/win_64
win32 {
LIBS += -lgdi32 \
......
......@@ -852,13 +852,11 @@ namespace PdfWriter
}
void CImageFileStream::Write(const BYTE* pBuffer, unsigned int unSize)
{
if (!OpenFile())
return;
m_oFile.WriteFile((BYTE*)pBuffer, unSize);
CloseFile();
// not used
}
void CImageFileStream::Read(BYTE *pBuffer, unsigned int* punSize)
{
*punSize = 0;
if (!OpenFile())
return;
DWORD dwBytesToRead = *punSize;
......@@ -912,8 +910,8 @@ namespace PdfWriter
}
bool CImageFileStream::OpenFile()
{
if (!m_oFile.OpenFile(m_wsFilePath, true))
return false;
if (!m_oFile.OpenFile(m_wsFilePath))
return false;
m_oFile.SeekFile(m_nFilePos);
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment