Git Product home page Git Product logo

pdfium's Introduction

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.

pdfium's People

Contributors

ankk0294 avatar bartekn-chromium avatar brianosman avatar cary-clark avatar dj2 avatar janeliulwq avatar jbudorick avatar jeisinger avatar jinming-wang avatar kcwu avatar kjlubick avatar kmoon-work avatar leizleiz avatar nico avatar npm1 avatar oliverchang avatar pkasting avatar randomascii avatar reed-at-google avatar sgraham avatar tanderson-google avatar tonikitoo avatar tsepez avatar vitalybuka avatar weili0 avatar wileyrya avatar wins0n avatar zhaoqin avatar zmodem avatar zoddicus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdfium's Issues

pdfium out of bound bug

Bug

Thread 1 "pdfium_test" received signal SIGTRAP, Trace/breakpoint trap.
0x000055555c2ff819 in CFDE_TextOut::Line::GetPieceAtIndex(unsigned long)::$_1::operator()() const () at ../../xfa/fde/cfde_textout.cpp:551
551       CHECK(pdfium::IndexInBounds(pieces_, index));
(gdb) bt
#0  0x000055555c2ff819 in CFDE_TextOut::Line::GetPieceAtIndex(unsigned long)::$_1::operator()() const () at ../../xfa/fde/cfde_textout.cpp:551
#1  0x000055555c2fca4b in CFDE_TextOut::Line::GetPieceAtIndex(unsigned long) () at ../../xfa/fde/cfde_textout.cpp:551
#2  0x000055555c2ff378 in CFDE_TextOut::ReloadLinePiece(CFDE_TextOut::Line*, CFX_RectF const&) () at ../../xfa/fde/cfde_textout.cpp:472
#3  0x000055555c2fc26c in CFDE_TextOut::Reload(CFX_RectF const&) () at ../../xfa/fde/cfde_textout.cpp:446
#4  0x000055555c2fab97 in CFDE_TextOut::DrawLogicText(CFX_RenderDevice*, fxcrt::StringViewTemplate<wchar_t>, CFX_RectF const&) () at ../../xfa/fde/cfde_textout.cpp:291

details

void CFDE_TextOut::ReloadLinePiece(Line* pLine, const CFX_RectF& rect) {
  ......
  while (iPieceIndex < iPieceCount) {
    size_t start = start_char;
    size_t end = pPiece->char_count + start;
    while (start < end) {
      dwBreakStatus = m_pTxtBreak->AppendChar(text_span[start]);
      if (!CFX_BreakTypeNoneOrPiece(dwBreakStatus))
        RetrievePieces(dwBreakStatus, true, rect, &start_char, &iPieceWidths);

      ++start;
    }
    ++iPieceIndex;   //bug, after the step, the index may equal to iPieceCount, lead to oob
    pPiece = pLine->GetPieceAtIndex(iPieceIndex);
  }
  ......
  m_pTxtBreak->Reset();
}

fix

void CFDE_TextOut::ReloadLinePiece(Line* pLine, const CFX_RectF& rect) {
  ......
  while (iPieceIndex < iPieceCount) {
    if (iPieceIndex != 0 ) pPiece = pLine->GetPieceAtIndex(iPieceIndex);
    size_t start = start_char;
    size_t end = pPiece->char_count + start;
    while (start < end) {
      dwBreakStatus = m_pTxtBreak->AppendChar(text_span[start]);
      if (!CFX_BreakTypeNoneOrPiece(dwBreakStatus))
        RetrievePieces(dwBreakStatus, true, rect, &start_char, &iPieceWidths);

      ++start;
    }
    ++iPieceIndex;  
  }
  ......
  m_pTxtBreak->Reset();
}

Layer support?

I need create a pdf, and need many layer in one page. as far as I know, only libpdf can do that, but it costs a fee. so...

Upstream not tracked

Hello,

This gihub clone does not track the git repo at https://pdfium.googlesource.com/pdfium/.
The last commit on this fork is dated May 13, 2020, whereas the last commit on google git is July 23, 2021.
The delta is currently 14 months, and counting.

It would be nice if this repo would track upstream once again.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.