GithubHelp home page GithubHelp logo

Comments (10)

tejpratap46 avatar tejpratap46 commented on September 14, 2024

Looks like you changed some stuff inside library, PDFTextView constructor has unknown parameter false and "", check your PDFTextView class.

If i just use your getHeaderView() and getBodyViews() code in this library (as it was intended), you get result as this PDF File.

result.pdf

Also, if you are trying to create a PDF that this library cannot produce, please tell me as i can try to add those API's.

from pdfcreatorandroid.

sakaravinth avatar sakaravinth commented on September 14, 2024

Hi tej,

i am trying to create pdf without view in xml .Without rendering in screen i want to create pdf .is it possbile in this library

from pdfcreatorandroid.

sakaravinth avatar sakaravinth commented on September 14, 2024

from pdfcreatorandroid.

tejpratap46 avatar tejpratap46 commented on September 14, 2024

This library renders a view to pdf, it has to be rendered on a Screen (it can have visibility as INVISIBLE). Without rendering, we cannot determine height taken by that view.

If you do not want to show preview to user, You can call finish() on the activity once pdf is generated. User won't see any preview and you will get generated pdf file.

from pdfcreatorandroid.

sakaravinth avatar sakaravinth commented on September 14, 2024

Is there any posiblities like pagination .
like in 1st page 15 records 2nd page 20records like that

from pdfcreatorandroid.

tejpratap46 avatar tejpratap46 commented on September 14, 2024

Just make your last records Row height as match parent. It will fill all space and no other view can be added to that page.

But be aware, if your data is dynamic and your last row comes to next page, it will make that page empty.

from pdfcreatorandroid.

sakaravinth avatar sakaravinth commented on September 14, 2024

ok how to find last row record of every page .

from pdfcreatorandroid.

tejpratap46 avatar tejpratap46 commented on September 14, 2024

I thought you knew which is the last record as you said

"1st page 15 records 2nd page 20records"

So in your first page, make 15th record's row height as match_parent and in second page make 20th redocr's row height as match_parent.

If you want to know which view will be last in a page, there is no such API available.

Library calculate if there is enough space in current page to add next view, if yes then next view will be added to current page else that view will be added to a new page with Header.

from pdfcreatorandroid.

sakaravinth avatar sakaravinth commented on September 14, 2024

One more i tried to set 15 records for first page .where want to do this i am doing createPDFFromViewList method

and want to know where this Library calculate if there is enough space in current page to add next view, if yes then next view will be added to current page else that view will be added to a new page with Header.

happening bro?

from pdfcreatorandroid.

tejpratap46 avatar tejpratap46 commented on September 14, 2024

One more i tried to set 15 records for first page .where want to do this i am doing createPDFFromViewList method

If you want to limit 15 records for first page, make 15th record's height as match_parent. Or add a text view with height match_parent to fill current page.

and want to know where this Library calculate if there is enough space in current page

It is calculated in PDFCreatorActivity.createPDFFromViewList(), when this function waits till all view is rendered in activity view so we can get height required by every view, then we add views to page one by one and check remaining space should be >height of next view.

from pdfcreatorandroid.

Related Issues (20)

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.