Comments (11)
Hi.
Using scroll view is not a good strategy
because it is clipped against itself.
Simply don't use one.
This library does not support continuous
rendering. Sorry.
Simply get everything outside.
from android-pdfmyxml.
So you are saying there is no way by which i can render the rest part in another page of the pdf? :(
from android-pdfmyxml.
You cannot with scrollView.
from android-pdfmyxml.
Okay then , please suggest any other way :(
from android-pdfmyxml.
move the content of the Srollview outside and divide it into pages, that's it,
the dimensions have to be static
from android-pdfmyxml.
one final question , if i dont use any scrollview how i can be able to show the stuff in my app which does not fit in the display, Actually im developing an app to make Resume , So i dont want to fit all the details in the display as it will look terribly small,So in order to see the whole stuff user have to scroll down to see,
from android-pdfmyxml.
https://i.imgur.com/HhlrEvI_d.jpg?maxwidth=640&shape=thumb&fidelity=medium
please see this , i want to get the stuffs like this in my pdf ,
from android-pdfmyxml.
The API of this library supports multi pages.
You need design each page. Or to break your
Long content into pages. The way most do it,
is to break the pages into seperate template views.
Another option might be using a scrollView and taking snapshots, and scrolling the view and then taking another snapshot etc...
I think this is possible by using the scrollTo() API of a scrollView.
Another option is to make template containers.
And to calculate how many of them you would need and then to add them dynamically
from android-pdfmyxml.
something like the code below, and then your templates/pages
are just ImageViews, that you feed them the images
@Override
public final Bitmap render(Bitmap bitmap, int width, int height, in page_index, ScrollView view) {
int specWidth = View.MeasureSpec.makeMeasureSpec(width, width==0 ? View.MeasureSpec.UNSPECIFIED : View.MeasureSpec.EXACTLY);
int specHeight = View.MeasureSpec.makeMeasureSpec(height, height==0 ? View.MeasureSpec.UNSPECIFIED : View.MeasureSpec.EXACTLY);
view.measure(specWidth, specHeight);
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
// recycle bitmap
Bitmap b = bitmap;//Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
//// here scroll
view.scrollTo(0, PIXELS_PER_PAGE * page_index);
view.draw(c);
return b;
}
from android-pdfmyxml.
okay thanks dude , will try this.out ,
from android-pdfmyxml.
This functionality should be out of the box, not as separate. Now this library is pretty useless...
from android-pdfmyxml.
Related Issues (20)
- How to get PDF from Android Activity? HOT 1
- How I can reduce the text size without blur it? HOT 1
- Listview issues HOT 1
- How to save the Pdf in storage HOT 2
- Webview issues HOT 3
- How to add to gradle HOT 8
- Positioning Problem
- Creating pdf with multipages dynamically HOT 5
- PDF checkbox is not checked. HOT 3
- Strangely taking 20 seconds to finish
- print a view with a recyclerview HOT 5
- setText on multiple textviews HOT 1
- Can't find where the file is storaged HOT 1
- The pdf creation process does not work in the DEGUB Build Variant HOT 4
- Only the original thread that created a view hierarchy can touch its views HOT 1
- Problem with implementation HOT 1
- Will the library work with hyperlinks? HOT 1
- I am having trouble adding dependency HOT 1
- imageView stretch pdf - layout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-pdfmyxml.