Giter Site home page Giter Site logo

scerio / packages.flutter Goto Github PK

View Code? Open in Web Editor NEW
435.0 9.0 397.0 130.35 MB

👨‍💻 Plugins and packages for Flutter framework

Home Page: https://pub.dev/publishers/serge.software/packages

License: MIT License

Objective-C 4.11% Dart 77.21% Kotlin 2.41% Ruby 0.76% Swift 3.01% Dockerfile 0.20% Shell 0.36% HTML 0.35% CMake 1.89% C++ 3.82% C 0.12% Java 5.75%
flutter dart flutter-plugin pub dartlang

packages.flutter's People

Contributors

2shrestha22 avatar btrautmann avatar chriswm3 avatar deakjahn avatar graylandl avatar jon-salmon avatar kirill09 avatar kirit0-kun avatar lijy91 avatar lucazzp avatar luke-stead-sonocent avatar malikdoksoz avatar mapgoblin avatar martinale14 avatar mirkancal avatar mtallenca avatar musaffa avatar nukeolay avatar onlyamessenger avatar proteye avatar raphire08 avatar roboroads avatar sergeshkurko avatar sposnjak-cpot avatar steffenhaak avatar strixcode avatar tp avatar vioao avatar wibtu avatar zazo032 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

packages.flutter's Issues

Application crashes when wrong document is set in assets

So I made a mistake in writing the file name from the assets and application crashes.

Plugin should probably handle this. I am not sure if the same happens when calling openFile with wrong filePath, but for sure it crashes when using openAsset.

CrashLog:

E/AndroidRuntime(30053): FATAL EXCEPTION: Thread-6
E/AndroidRuntime(30053): Process: org.eldrider, PID: 30053
E/AndroidRuntime(30053): java.io.FileNotFoundException: flutter_assets/assets/pdfs/ELD_Rider_Instructions222.pdf
E/AndroidRuntime(30053): at android.content.res.AssetManager.nativeOpenAsset(Native Method)
E/AndroidRuntime(30053): at android.content.res.AssetManager.open(AssetManager.java:824)
E/AndroidRuntime(30053): at android.content.res.AssetManager.open(AssetManager.java:801)
E/AndroidRuntime(30053): at io.scer.pdf.renderer.NativePDFRendererPlugin.openAssetDocument(NativePDFRendererPlugin.kt:178)
E/AndroidRuntime(30053): at io.scer.pdf.renderer.NativePDFRendererPlugin.access$openAssetDocument(NativePDFRendererPlugin.kt:30)
E/AndroidRuntime(30053): at io.scer.pdf.renderer.NativePDFRendererPlugin$openDocumentAssetHandler$1.run(NativePDFRendererPlugin.kt:86)
E/AndroidRuntime(30053): at java.lang.Thread.run(Thread.java:919)
I/Process (30053): Sending signal. PID: 30053 SIG: 9

[native_pdf_view] Provide a onPageChanged callback

Is your feature request related to a problem? Please describe.
We would like to show the user that he is on page 1/n,

Describe the solution you'd like
To achieve that I believe that a simple onPageChanged callback could be easily implemented and would give us a lot of flexibility.

Describe alternatives you've considered
A built-in page indicator would also work, but might not fit into the UI of every app.

Additional context

Not possible to catch plugin errors, application just crashes

Describe the bug
There is no way to catch plugin error.

To Reproduce
Simplest way to reproduce - try to open non existing file.

Expected behavior
It should be possible to catch plugin errors. Example with non existing file is just example, in my case I observe some crashes because of some file format problems in some rare cases in production.

I already tried all 4 possible solution I know to catch dart/flutter errors, none of them works, application just crashes.

native_pdf_view: ^2.2.0

[native_pdf_view] Vertical smooth viewer

I am trying to switch from pdf_viewer_plugin to your package but I am not able to implement the same user experience as I have in the existing plugin.

What I need is vertical viewer with smooth scrolling. I need the page to load in full available width size (both in portrait and horizontal orientation). I need pinch/zoom possibility. The zoom should not reset when the new page is detected.

Basically, it should look like all pdf pages are merged vertically as the one big page and initially shown in the full available width space, with zoom and pinch possibility.

Can you please help me archive that with your plugin.

highlight text on epub_view and getting chapters

Hello dear
Thank you very much for your great work on this project.

i would like to know if you have plan to add text highlight as you know it is necessary for ebook reader.

Also it is necessary to get chapters for example to show it on a drawer for chapter navigations

Cannot build apk release (compileSdkVersion 29)

I can't build apk release (my compileSdkVersion is 29)
I get this error:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':native_pdf_renderer:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed

flutter\build\native_pdf_renderer\intermediates\res\merged\release\values\values.xml:236: error: resource android:attr/fontVariationSettings not found.
flutter\build\native_pdf_renderer\intermediates\res\merged\release\values\values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.

To resolve this error i increase compileSdkVersion in build.gradle of module native_pdf_rendererfrom 27 to 28

I found this solution here

crosswalk-project/cordova-plugin-crosswalk-webview#207 (comment)

So you need to increase compileSdkVersion to 28 in source code.
Thanks

[native_pdf_view] get pdf page count

It would be helpful if there was a way to get the currently opened pdf's page count.

At this moment, i'm not sure how one can get this number other than brute forcing by jumping to a page and seeing if the onPageChanged callback is fired or not.

how can get the current show page?

Describe the bug
Forgive my poor english,I want to show the pdf automatic and i used Future.periodic and pageController.nextPage api, but how can i get the current show page to stop the animation or go to the first page?

Changelog is wrong

Something went wrong in the changelog regarding 2.0.0

image

shouldn't it be PDF on the left hand side? And not Pdf?

PdfView.builder zoom full width

I would like to have pages render at full screen width when loaded.

  1. is there a standard way to achieve this?

  2. I believe I can use the Custom Page Builder referenced in the documentation.
    However, PdfView.builder does not seem to be a standard type for this class.
    Is there a more complete example showing how to use PdfView.builder?

Thank you,
Great Package!

controller loadDocument parameter not used

Can you please explain me how the parameter is used in the loadDocument method:

`
/// Load document
Future loadDocument(Future documentFuture) {
if (_pdfViewState != null) {
return null;
}
_pdfViewState._changeLoadingState(_PdfViewLoadingState.loading);
return _loadDocument(document);
}

`

[native_pdf_view] can't load files with japanese filenames.

Describe the bug
Cannot load files with japanese filenames.

To Reproduce

  1. Clone example project.
  2. Rename sample.pdf to 日本語.pdf
  3. Rename pubspec.yaml asset file reference from sample.pdf to 日本語.pdf
  4. Change sample.pdf String in main.dart to 日本語.pdf
  5. packages get
  6. run main.dart

Expected behavior
open file.

Additional context
project works fine when the file is sample.pdf, and even if i change the filename to 123.pdf. but fails when it uses japanese.

Add a way to render a subset of a PDF page

Package name
native_pdf_renderer

Describe the solution you'd like
To be able to specify a rectangle in the coordinates of the PDF page to specify what to render.

Describe alternatives you've considered
The alternative is to render the entire page and then copy the part you want.

ePub reader crashes

After installing your package and following the example, the app crashes with the error below

RangeError (index): Invalid value: Valid value range is empty: 0

gotopage

A method can be added to go to the page that the user chooses.

search chapters

Epub_view| I have a book with a lot of chapters. How can I search these sections? Thank you.

Fail in jumpToPage

Describe
The jumpToPage method just doesn't work

To Reproduce
Steps to reproduce the behavior:

  1. Click on arrow next button in AppBar
    WhatsApp Image 2020-05-13 at 15 49 01
import 'package:flutter/material.dart';
import 'package:native_pdf_view/native_pdf_view.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int _actualPageNumber = 1, _allPagesCount = 0;
  PdfController _pdfController;

  @override
  void initState() {
    _pdfController = PdfController(
      document: PdfDocument.openAsset('assets/sample.pdf'),
    );
    super.initState();
  }

  @override
  void dispose() {
    _pdfController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) => MaterialApp(
        theme: ThemeData(primaryColor: Colors.white),
        home: Scaffold(
          appBar: AppBar(
            title: Text('PdfView example'),
            actions: <Widget>[
              Container(
                margin: EdgeInsets.only(right: 16),
                alignment: Alignment.center,
                child: Text(
                  '$_actualPageNumber/$_allPagesCount',
                  style: TextStyle(fontSize: 22),
                ),
              ),
              IconButton(
                icon: Icon(Icons.navigate_next),
                onPressed: () {
                  _pdfController.jumpToPage(_pdfController.page + 1);
                },
              )
            ],
          ),
          body: PdfView(
            documentLoader: Center(child: CircularProgressIndicator()),
            pageLoader: Center(child: CircularProgressIndicator()),
            controller: _pdfController,
            onDocumentLoaded: (document) {
              setState(() {
                _allPagesCount = document.pagesCount;
              });
            },
            onPageChanged: (page) {
              setState(() {
                _actualPageNumber = page;
              });
            },
          ),
        ),
      );
}

Smartphone

  • Device: [Samgung J7 prime 2]
  • OS: [Android 9]

Flutter doctor
issue native pdf

Landscape | only partial file shown

Describe the bug
When I open pdf in the landscape mode, only partial of the file is loaded.

Expected behavior
User should be able to view the entire page (probably by scroll up/down)

Smartphone (please complete the following information):

  • Device: Android 10

Additional context
Is there a way to workaround this problem? I used the provided example

Plugin error should be catchable

Package name
A name of package whom this bug concerns. Ex. native_pdf_renderer

Describe the bug
On error in the package the entire app crashes and closes.

To Reproduce
Steps to reproduce the behavior:

  1. ListView.builder
  2. Returns a Card with a FutureBuilder in the ListView which returns an "Image" as a thumbnail of a FILE BASED PDF file (downloaded from the internet to INTERNAL STORAGE)
  3. Scroll rapidly down a long list
  4. The problem is intermittend but happens often

Expected behavior
Throw a catchable exception

Screenshots
N/A

Smartphone (please complete the following information):

  • Device: Android Emulator API 28
  • OS: Android 9
  • Version [28]

Additional context
Below 3 items that worked OK before the next one caused the error.

D/PDF_RENDER( 3424): OpenFileDocument. File: /data/user/0/za.co.mydomain.myapp/app_flutter/Cache/d503a6e1-4be2-4f33-9504-eb4072c26afb.pdf
D/PDF_RENDER( 3424): OpenFileDocument. File: /data/user/0/za.co.mydomain.myapp/app_flutter/Cache/36d1d5da-2086-4d29-a283-4dbb1615bcbd.pdf
D/PDF_RENDER( 3424): OpenFileDocument. File: /data/user/0/za.co.mydomain.myapp/app_flutter/Cache/b6371a15-b068-497c-a410-98cf9ad9a321.pdf
E/AndroidRuntime( 3424): FATAL EXCEPTION: Thread-7
E/AndroidRuntime( 3424): Process: za.co.mydomain.myapp, PID: 3424
E/AndroidRuntime( 3424): io.scer.pdf.renderer.resources.RepositoryItemNotFoundException: 7c4172e9-dcb7-44b7-99f5-0e5f32822ff7
E/AndroidRuntime( 3424): at io.scer.pdf.renderer.resources.Repository.get(Repository.kt:12)
E/AndroidRuntime( 3424): at io.scer.pdf.renderer.NativePDFRendererPlugin$openPageHandler$1.run(NativePDFRendererPlugin.kt:129)
E/AndroidRuntime( 3424): at java.lang.Thread.run(Thread.java:764)
I/Process ( 3424): Sending signal. PID: 3424 SIG: 9

Error on iOS build

[!] Unable to determine Swift version for the following pods:

- `native_pdf_renderer` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

what should i do?

[native_pdf_view] Open a certain page when document is loaded

Describe the bug
I want to animate or jump to a certain page when document is loaded at the very start of rendering.

To Reproduce
1 - I tried to jump to a certain page when document is loaded in
onDocumentLoaded: (PdfDocument document) { _pdfController.jumpToPage(10); },

But I faced an exception :
Reloaded 9 of 868 libraries in 854ms. D/PDF_RENDER( 6672): OpenFileDocument. File: /data/user/0/projectname/cache/file_picker/Short-stories-from-100-Selected-Stories.pdf E/flutter ( 6672): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: type '_AssertionError' is not a subtype of type 'Exception' �[38;5;248mE/flutter ( 6672): #0 PdfController._loadDocument�[39;49m E/flutter ( 6672): <asynchronous suspension> �[38;5;248mE/flutter ( 6672): #1 PdfController._attach�[39;49m �[38;5;248mE/flutter ( 6672): #2 _PdfViewState.initState�[39;49m �[38;5;244mE/flutter ( 6672): #3 StatefulElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #4 ComponentElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #5 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #6 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #7 SingleChildRenderObjectElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #8 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #9 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #10 ComponentElement.performRebuild�[39;49m �[38;5;244mE/flutter ( 6672): #11 Element.rebuild�[39;49m �[38;5;244mE/flutter ( 6672): #12 ComponentElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #13 ComponentElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #14 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #15 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #16 ComponentElement.performRebuild�[39;49m �[38;5;244mE/flutter ( 6672): #17 Element.rebuild�[39;49m �[38;5;244mE/flutter ( 6672): #18 ComponentElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #19 ComponentElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #20 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #21 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #22 ComponentElement.performRebuild�[39;49m �[38;5;244mE/flutter ( 6672): #23 Element.rebuild�[39;49m �[38;5;244mE/flutter ( 6672): #24 ComponentElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #25 ComponentElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #26 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #27 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #28 ComponentElement.performRebuild�[39;49m �[38;5;244mE/flutter ( 6672): #29 Element.rebuild�[39;49m �[38;5;244mE/flutter ( 6672): #30 ComponentElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #31 ComponentElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #32 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #33 MultiChildRenderObjectElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #34 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #35 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #36 ComponentElement.performRebuild�[39;49m �[38;5;244mE/flutter ( 6672): #37 StatefulElement.performRebuild�[39;49m �[38;5;244mE/flutter ( 6672): #38 Element.rebuild�[39;49m �[38;5;244mE/flutter ( 6672): #39 ComponentElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #40 StatefulElement._firstBuild�[39;49m �[38;5;244mE/flutter ( 6672): #41 ComponentElement.mount�[39;49m �[38;5;244mE/flutter ( 6672): #42 Element.inflateWidget�[39;49m �[38;5;244mE/flutter ( 6672): #43 Element.updateChild�[39;49m �[38;5;244mE/flutter ( 6672): #44 ComponentElement.performRebuild�[39;49m E/flutter ( 6672): #45 Element.rebuild (package:flutter/src/w

Expected behavior
I expected to open on the page I requested.

Screenshots

Screen Shot 2020-05-11 at 10 31 50 PM

Smartphone (please complete the following information):

  • Device: Android emulator Pixel 3a
  • OS: Android
  • Version : API 28

Build error in native_pdf_renderer plugin on Swift 4.2

Package name
native_pdf_renderer v1.3.0+1

Describe the bug

=== BUILD TARGET native_pdf_renderer OF PROJECT Pods WITH CONFIGURATION Release ===
/Users/escolarmanager/work/flutter_plugins_pdf/packages/native_pdf_renderer/ios/Classes/document/Page.swift:59:30: error: 'pngData()' has been renamed to
'UIImagePNGRepresentation(_:)'
data = image.pngData() as Data?
^~~~~~~
UIImagePNGRepresentation
UIKit.UIImage:58:17: note: 'pngData()' was introduced in Swift 4.2
public func pngData() -> Data?

To Reproduce
Steps to reproduce the behavior:

  1. Create a new flutter project;
  2. Adds native_pdf_renderer v1.3.0+1 plugin to pubspec.yaml
  3. Run flutter build ios command
  4. See error

Expected behavior
Successful build

Smartphone (please complete the following information):

  • MAC OS Mojave 10.14.5
  • XCODE Version 10.1 (10B61)
  • Swift 4.2

Additional context
I was replaced the 59 line of Page.swift file and the build works!!!

original
data = image.pngData() as Data?

suggestion
data = UIImagePNGRepresentation(image)

Could you please publish the correction in pub.dev?

Thanks in advance

Native_pdf_renderer crashes a lot

Describe the bug

E/AndroidRuntime(14575): FATAL EXCEPTION: Thread-16
E/AndroidRuntime(14575): Process: de.gebatzens.sia, PID: 14575
E/AndroidRuntime(14575): io.scer.pdf.renderer.resources.RepositoryItemNotFoundException: 63c623e9-64e1-4c23-8b18-a28b18d8f27c
E/AndroidRuntime(14575): 	at io.scer.pdf.renderer.resources.Repository.get(Repository.kt:12)
E/AndroidRuntime(14575): 	at io.scer.pdf.renderer.NativePDFRendererPlugin$openPageHandler$1.run(NativePDFRendererPlugin.kt:129)
E/AndroidRuntime(14575): 	at java.lang.Thread.run(Thread.java:919)
I/Process (14575): Sending signal. PID: 14575 SIG: 9

To Reproduce
Steps to reproduce the behavior:
When I open a pdf file with the native_pdf_renderer sometimes it crashes.

Smartphone (please complete the following information):

  • Device: Xiaomi Mi 9T Pro
  • OS: Android 10

Using AutoAnimatedSliverList with Dismissible child causes list to redraw when OnDismissed() gets called

Describe the bug
My Dismissible widget contains

setState((){
_items.removeAt(index);
})

callback in onDismissed() method.

Previously I used SliverList, and it handled it perfectly -- item was removed without any errors. Now, with AutoAnimatedSliverList(), my onDismissed() method causes whole list to redraw and scroll to top.

To Reproduce
Steps to reproduce the behavior:

  1. Use Dismissible() widget as a child for AutoAnimatedSliverList();
  2. Try to swipe on element;
  3. See AutoAnimatedSliverList redrawed.

Expected behavior
I expected it to behave as SliverList, handling Dismissible behavior under the hood.

At least it must be explained in documentation on how to solve similar issue, probably using some GlobalKey.

page.close() does not work

native_pdf_renderer V 1.3.0+1

page.close() does not work. On iOS (not tested on android)

final document = await PDFDocument.openAsset('assets/sample.pdf');
final page = await document.getPage(1);
final pageImage = await page.render(width: page.width, height: page.height);
await page.close();

/// this generates an error: PlatformException(RENDER_ERROR, Unexpected error: ItemNotFound., null)
final page1 = await document.getPage(1);
final pageImage1 = await page1.render(width: page1.width, height: page1.height); 
await page1.close();

How to convert PDFPageImage to image inorder to view PDF file as Image ?

  imageFromPdfFile2(File pdfFile) async {
    List<im.Image> imageList = List();
    int height = 0, width = 0;

    final document = await pdf_ren.PDFDocument.openFile(pdfFile.path);
    im.Image imImage;
    for (int i = 1; i <= document.pagesCount; i++) {
      final page = await document.getPage(i);
      final pdfPageImage =
          await page.render(width: page.width, height: page.height);
      imImage = im.decodeImage(pdfPageImage.bytes); // First issue in this line
      height += imImage.height;
      width += imImage.width;
      imageList.add(imImage);
      await page.close();
    }

    im.Image mergedImage = im.Image(width, height);
    // Merge generated image vertically as vertical-orientated-multi-pdf
    for (var item in imageList) {
      im.copyInto(mergedImage, item, blend: true);
    }

    savePdfAndImageDB(pdfFile, imImage.getBytes());
  }

[auto_animated] Export LiveOptions in library

Describe the bug
LiveOptions has to be imported from `package:auto_animated/src/helpers/options.dart.

Expected behavior
Importing package:auto_animated/auto_animated.dart should make LiveOptions available.

Repeatedly loaded PDF file doesn't replace previous pages

If I read the new PDF file instead of the existing one (eg. using a StreamBuilder), already rendered and probably cached pages will not be replaced with the pages from the new file. Only pages not yet visited in the previous PDF will be rendered correctly.

Expected behavior
Loading a new PDF should invalidate previously cached pages.

Add custom menu item

Anyway to customise the PDFView by adding Highlight features in the UIMenuItem during text selected?

Rendering Page crashes on iOS

Describe the bug
When I try to render a PDF page the App crashes on an iOS device. There is no Exception, only the message :
"Lost connection to device.
Bad state: No element
Bad state: No element
Exited (sigterm)".

On Android this is working fine.

To Reproduce
The App is crashing in line 6

void main() async {
  try {
  WidgetsFlutterBinding.ensureInitialized();
    final document = await PDFDocument.openAsset('assets/hello.pdf');
    final page = await document.getPage(1);
    final pageImage = await page.render(width: page.width, height: page.height);
    await page.close();
    runApp(
      MaterialApp(
        home: Scaffold(
          body: Center(
            child: Image(
              image: MemoryImage(pageImage.bytes),
            ),
          ),
        ),
        color: Colors.white,
      )
    );
  } on Exception catch (error) {
    print(error);
  }
}

[native_pdf_view]some pdf show error

Describe the bug
I want to play .xls or .xlxs .doc format file on my device.but i cant find any plugin on flutter to show it.so i just transformed the file to the pdf format, the file transformed from .doc format show nothing error but the file transformed from .xls format shows nothing but white screen(if the font color is black and the background color is white).If I changed the font color to red i can see the word render an red line on the screen.
The file shows no error on my computer.

Screenshots
11587438545_ pic

Smartphone (please complete the following information):

  • Device: RK3128 BOX
  • OS: android 7.1
  • Version [2.2.1]

Additional context
I can provide the original file if necessary.
Waiting for u reply.Thx.

Getting error The argument type 'FadeTransition Function...

error: The argument type 'FadeTransition Function(BuildContext, int, Animation)' can't be assigned to the parameter type 'Widget Function(BuildContext, Animation)'. (argument_type_not_assignable at [xxxxxxx] lib\screens\pages\feeds\followers_feeds_page.dart:81)

code

AnimateIfVisibleWrapper(
                // Show each item through (default 250)
                showItemInterval: Duration(milliseconds: 150),

                child: SingleChildScrollView(
                  child: Column(
                    children: <Widget>[
                      // First item with `FadeTransition` and show duration 500
                      AnimateIfVisible(
                        key: Key('item.1'),
                        duration: Duration(milliseconds: 500),
                        builder: (
                            BuildContext context,
                            int index,
                            Animation<double> animation,
                            ) =>
                            FadeTransition(
                              opacity: Tween<double>(
                                begin: 0,
                                end: 1,
                              ).animate(animation),
                              child: YouFirstWidget(),
                            ),
                      ),

                      // Second item with `SlideTransition` and show duration 350
                      AnimateIfVisible(
                        key: Key('item.2'),
                        duration: Duration(milliseconds: 350),
                        builder: (
                            BuildContext context,
                            int index,
                            Animation<double> animation,
                            ) =>
                            SlideTransition(
                              position: Tween<Offset>(
                                begin: Offset(0, -0.1),
                                end: Offset.zero,
                              ).animate(animation),
                              child: YouSecondWidget(),
                            ),
                      ),
                    ],
                  ),
                ),
              )

[native_pdf_view] App crash when change page pdf

This error occurs if I scroll the page quickly when I finish or before rendering.

D/PDF_RENDER(26338): OpenFileDocument. File: /data/user/0/br.com.bmtcloud.jasaudeanimal/cache/1122734catofos_lamina_mobile.pdf
E/MethodChannel#io.scer.pdf.renderer(26338): Failed to handle method call
E/MethodChannel#io.scer.pdf.renderer(26338): java.lang.IllegalStateException: Current page not closed
E/MethodChannel#io.scer.pdf.renderer(26338): at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:269)
E/MethodChannel#io.scer.pdf.renderer(26338): at android.graphics.pdf.PdfRenderer.close(PdfRenderer.java:184)
E/MethodChannel#io.scer.pdf.renderer(26338): at io.scer.pdf.renderer.document.Document.close(Document.kt:23)
E/MethodChannel#io.scer.pdf.renderer(26338): at io.scer.pdf.renderer.resources.DocumentRepository.close(DocumentRepository.kt:25)

Other stack

D/PDF_RENDER(28542): OpenFileDocument. File: /data/user/0/br.com.bmtcloud.jasaudeanimal/cache/1122734catofos_lamina_mobile.pdf
I/flutter (28542): aqui
E/AndroidRuntime(28542): FATAL EXCEPTION: Thread-35
E/AndroidRuntime(28542): Process: br.com.bmtcloud.jasaudeanimal, PID: 28542
E/AndroidRuntime(28542): java.lang.IllegalStateException: Current page not closed
E/AndroidRuntime(28542): at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:269)
E/AndroidRuntime(28542): at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:224)
E/AndroidRuntime(28542): at io.scer.pdf.renderer.document.Document.openPage(Document.kt:30)
E/AndroidRuntime(28542): at io.scer.pdf.renderer.NativePDFRendererPlugin$openPageHandler$1.run(NativePDFRendererPlugin.kt:129)

Add possibility to define infinite zoom parameter

Is your feature request related to a problem? Please describe.
Actually I started using this package due to the fact that it uses the native iOS and Android API.
I need to permit user to zoom infinitely on my PDFView, but now zoom is not simply settable. In some PDF page the actual zoom is not enough.

Describe the solution you'd like
It will be beautiful to add a parameter on PDFView widget in order to set the maximum PDF zoom/zoomRatio in a simply way. Something like:

return PDFView(
                  document: snapshot.data,
                  infiniteZoom: true/false,
                  // or maxZoomRatio: 4.0,
                );

Can it be possible?

Thank you

[native_pdf_view] Add Zooming without pixel loss

Package name
A name of package whom this idea concerns. Ex. native_color
zoomable image view
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I want to zoom in the rendered I tried zoomable image package but as its just image with low pixel I lose pixels
Describe the solution you'd like
A clear and concise description of what you want to happen.
I want to render a high-quality image so no issue for pixel loss or update pixel by taking an image from the zoomable image I mean just Zoomable pdf renderer
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

crash app

E/AndroidRuntime(22186): FATAL EXCEPTION: Thread-123
E/AndroidRuntime(22186): Process: com.abcd.bookse, PID: 22186
E/AndroidRuntime(22186): java.lang.IllegalStateException: Current page not closed
E/AndroidRuntime(22186): at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:273)
E/AndroidRuntime(22186): at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:226)
E/AndroidRuntime(22186): at io.scer.pdf.renderer.document.Document.openPage(Document.kt:30)
E/AndroidRuntime(22186): at io.scer.pdf.renderer.NativePDFRendererPlugin$openPageHandler$1.run(NativePDFRendererPlugin.kt:129)
E/AndroidRuntime(22186): at java.lang.Thread.run(Thread.java:764)
E/AndroidRuntime(22186): FATAL EXCEPTION: Thread-125
E/AndroidRuntime(22186): Process: com.anhtudev.bookse, PID: 22186
E/AndroidRuntime(22186): java.lang.IllegalStateException: Current page not closed
E/AndroidRuntime(22186): at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:273)
E/AndroidRuntime(22186): at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:226)
E/AndroidRuntime(22186): at io.scer.pdf.renderer.document.Document.openPage(Document.kt:30)
E/AndroidRuntime(22186): at io.scer.pdf.renderer.NativePDFRendererPlugin$openPageHandler$1.run(NativePDFRendererPlugin.kt:129)
E/AndroidRuntime(22186): at java.lang.Thread.run(Thread.java:764)
I/Process (22186): Sending signal. PID: 22186 SIG: 9
Lost connection to device.

page not loaded when onDocumentLoaded and onPageChanged are not set

I don't have a need to be notified of onDocumentLoaded and onPageChanged events. Since the arguments are not marked as mandatory I didn't set onDocumentLoaded and onPageChanged.

As I saw your code expects that this callbacks are set and loading document crashes...

You should probably mark fields as mandatory or do a null check in the code before calling methods.

PdfView called by Consumer build

I have two different documents to display.
One in English - doc_en.pdf, and one in German - doc_de.pdf.
In the user settings page of the app, the user can change an instance of UserPrefs.

The mainApp is enclosed with

ChangeNotifierProvider<UserPrefs>.value(
        value: userPrefs,
        child: MaterialApp(

I have tried several schemes to enclose PdfView with a Consumer

PdfController pdfController;

Widget _buildPdfView(String documentName) {
      if (pdfController != null) {
        pdfController.dispose();
      }
      pdfController =
          PdfController(document: PdfDocument.openAsset(documentName));
      return PdfView(key: Key('PdfView'), controller: pdfController);
    }

Consumer<UserPrefs>(builder: (context, prefs, child) {
              String displayPdf =
                  'assets/pdf/${widget.docTitle}/${widget.docTitle}_${prefs.getLang()}.pdf';
              print(displayPdf);   // prints correct result
              return _buildPdfView(displayPdf);

The document displays properly when the app is started.
However, when the UserPrefs object is changed, the app raises an exception with

════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building PdfView-[<'PdfView'>](dirty, dependencies: [_EffectiveTickerMode], state: _PdfViewState#13f6e(ticker inactive and muted)):
The getter 'pagesCount' was called on null.
Receiver: null
Tried calling: pagesCount

Is there a way to use PdfView inside a Consumer block?

No correct scrolling for one page possible

Describe the bug
If you have an one page pdf and you are scrolling to the top / down, the pdf is cut off, so you can't see the rest of the pdf

To Reproduce
Steps to reproduce the behavior:

  1. Take a one page pdf
  2. Open the PDF View
  3. Smartphone in landscape
  4. Scrolle up and down to see the bug

Expected behavior
See the entire pdf.

Screenshots
IMG_A683CCD72665-1

Smartphone (please complete the following information):

  • Device: iPad 2018

Additional context

Get bookmark in pdf

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

'native_pdf_renderer/native_pdf_renderer-Swift.h' file not found #import <native_pdf_renderer/native_pdf_renderer-Swift.h>

In first case with the fresh project of Flutter
If i am running from command line then the app is running fine on simulator as well on real device. but i am building and running from Xcode then it is giving me following errors.

Second case is to run with existing application with alot of other plugins
Then the following error is occurring in both cases, either from terminal or from Xcode.

Failed to build iOS app
Error output from Xcode build:
↳
    2019-12-05 11:06:42.202 xcodebuild[22067:169419]  DTDeviceKit: deviceType from 98762ebee0668151686dd01da2abb6186fc9a98a was NULL
    2019-12-05 11:06:42.295 xcodebuild[22067:169419]  DTDeviceKit: deviceType from 98762ebee0668151686dd01da2abb6186fc9a98a was NULL
    ** BUILD FAILED **
Xcode's output:
↳
    **flutter_downloader-cravousdkmjzvhbseqbfmbuiktbf
    /Users/ars/.pub-cache/hosted/pub.dartlang.org/native_pdf_renderer-1.6.1/ios/Classes/NativePDFRendererPlugin.m:2:9: fatal error: 'native_pdf_renderer/native_pdf_renderer-Swift.h' file not found
    #import <native_pdf_renderer/native_pdf_renderer-Swift.h>**
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    flutter_downloader-cravousdkmjzvhbseqbfmbuiktbf
    note: Using new build system
    note: Planning build
    note: Constructing build description
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'Reachability' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'FMDB' from project 'Pods')

Flutter Doctor

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale en-GB)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (2 available)

• No issues found!
ARSs-Mac-mini:portfolio ars$ 

Following plugins, that i am using

dependencies:
  flutter:
    sdk: flutter

  flutter_localizations:
    sdk: flutter
    
  flutter_cupertino_localizations: ^1.0.1

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  font_awesome_flutter: "8.5.0"
  # flutter_full_pdf_viewer: 1.0.5
  flutter_pdfview: 1.0.0+10
  path: 1.6.4
  path_provider: 0.5.0+1
  chewie: 0.9.8
  http: 0.12.0+2
  json_annotation: ^3.0.0
#  simple_permissions:
  flutter_downloader: 1.2.2
  permission_handler: 3.2.2
  bloc: ^0.15.0
  equatable: 0.5.1
  flutter_bloc: 0.21.0
  sqflite: "1.1.6+4"
  connectivity: 0.4.4
  url_launcher: 5.1.4
  flutter_svg: 0.14.2
  csv: 4.0.3
  spreadsheet_decoder: 1.0.1
  pinch_zoom_image: 0.2.5
  shared_preferences: ^0.4.3
  native_pdf_renderer: ^1.6.1


dev_dependencies:
  flutter_test:
    sdk: flutter
  video_player:
  json_serializable: ^3.2.0
 

Please note: other pdf plugins are commented to use this.

page take a noticeable time to load

when the pdf file is loaded pages takes time to load even in release which is pretty annoying for book readers and it is even worse for pages that contain images, is there any to make it faster?

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.