pdfview

Swift 4: Change / Clear PDFView content

和自甴很熟 提交于 2021-01-29 19:09:59
问题 I want to use PDFView framework in Swift 4. (https://developer.apple.com/documentation/pdfkit/pdfview) The following function receives a path to a PDF document. If the path is valid, the PDF file is successful shown. A problem occurs, when I call openMe(path: String) twice. In this case, the old content is still there and the new content is added. I just want to change the old content with the new content. private var pdfData: NSData? = nil func openMe(path: String) { let fileManager =

How I can restrict position view while moving/dragging on PDFView? (Swift)

六月ゝ 毕业季﹏ 提交于 2021-01-28 07:58:45
问题 I took one custom view (SignatoryView) on pdf, When I click on Add button from Navigation bar, it will add that SignatoryView on PDF view and according to my choice I can move/drag that signatory view to any location. Problem : When I am moving that signatory view on pdf, it is going outside edges of pdfView. (Left, right, bottom and top also) Here is the demo : It should not go beyond its boundaries, it should be movable only inside edges on PDF view. How I can achieve this ? Here is the

how to view PDF from a list view which is fetch from Firebase database?

无人久伴 提交于 2020-06-16 19:04:49
问题 I have fetched a PDF list view from Firebase Database This is the code that i used to fetch public class ViewFiles extends AppCompatActivity { ListView myViewFiles; DatabaseReference databaseReference; List<uploadFiles> uploadDOCS; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_view_files); myViewFiles = (ListView) findViewById(R.id.myViewFiles); uploadDOCS = new ArrayList<uploadFiles>(); viewAllFiles();

How can i create a pdf view in android

邮差的信 提交于 2020-06-01 07:39:04
问题 I have have uploaded pdf files and set it to the database Stored steps in Firebase Database and i have create a code to display in android and it works fine Displaying in listview i have create an intent to open in a new page and view the pdf in android public class ViewPdfFiles extends AppCompatActivity { private PDFView pdfView; private String url; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_view_pdf

How to use “pdfView” in object library in iOS?

主宰稳场 提交于 2020-01-17 07:24:10
问题 I see in "object library" pdfView is there, but, when I click on .XIB it got disappers.How can I use this for iPhone or IPad development? Plaese provide me any example links.Thanks. Note: Plaese do not tell me to use any 3rd party lib,because I'm already refering two.This i don't want ot use going forword. 回答1: PDFView is only for cocoa(OSX) not for iOS. A PDFView object encapsulates the functionality of PDF Kit into a single widget that you can add to your application PDFKit only available

PDFKit: PDFView doesn't resize when device rotated

拈花ヽ惹草 提交于 2020-01-03 15:53:15
问题 I have an iPad app displaying a PDFView. The app is rotatable to any orientation. The PDFView is full-screen and single-page. The PDF displays as expected when launched in either orientation; the entire first page is visible, zoomed to fit the screen without any of the PDF appearing off-screen. The PDF will always be a US-letter-size document. When rotated, the PDF rotates, but does not resize. When rotated landscape-to-portrait the PDF is displayed "too small" - with a huge empty border

Cocoa PDFView does not resize

吃可爱长大的小学妹 提交于 2019-12-25 06:48:04
问题 I am attempting to create a custom subclass of the PDFView class in XCode. I add a PDFView instance to my window in InterfaceBuiler and create the following files for the subclass: MyPDFView.h: #import <Quartz/Quartz.h> @interface MyPDFView : PDFView -(void)awakeFromNib; -(void)mouseDown:(NSEvent *)theEvent; @end MyPDFView.m: #import "MyPDFView.h" @implementation MyPDFView -(void)awakeFromNib { [self setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable|NSViewMinXMargin|NSViewMaxXMargin