Giter Site home page Giter Site logo

ilpdfkit's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ilpdfkit's Issues

Import UIKit and CoreGraphics header files

When I dropped ILPDFKit folder in a swift project I was't able to build it. Turns out I need to import UIKit and CoreGraphics for some classes in ILPDFKit.
I can prepare PR if you need that.

Internal navigation is not Working Properly

Hi ,
I have found below issue in latest updated ILPDFKit

While jump to page 10 from page 1 , interactive Elements are not showing.
Ex. while navigating to 10th page it shows the elements of 5th page.

Navigating single page works fine.

Saving partially flattened data

I would like to save the PDF document in such a way that the form elements are flattened, but interactive URLs remain clickable. Can you give any info as to how to modify flattenedData: method to achieve that? I looked over the class reference and can't seem to see anything that relates to clickable links.

Filled values doesn't show on Adobe Reader

Values filled by the library does show in the app, but it doesn't show up in Adobe Reader, they only appear only when you focus on the field. Any idea?

Do we need something extra while saving the filled values ?

Please help.

Thanks.

Saved pdf is corrupt

After editing and saving a form pdf, it doesnt open in acrobat reader. However, it opens in the browser.

Unable to manual import in a swift project

Really nice work : thanks!

But I can't import it manually in my project (mainly swift but may not be related).

  • I added ILPDFKit folder to my project (mainly swift project)
  • I already use ARC
  • I linked
    • UIKit
    • QuartzCore
    • CoreGraphic (seen it in project template)

I compare the template project and mine and don't see what is wrong.
The only difference is

  • my project mainly swift

VERSUS

  • template project : Objective C

=> I don't see the problem...


If someone had a try one day to import it manually in swift project, tell me (so that I will understand where I am wrong right now^^)

Adobe Acrobat cannot read many of the files created

After filling in some forms, I see this error in Adobe Acrobat when opening the PDF files:

"There was an error opening this document. The root object is missing or invalid."

Here is a link to a PDF form from around the Internet that do not work with ILPDFKit that show the above error:

http://www.stuart-design.co.uk/docs/Sample%20Fillable%20PDF%20Form.pdf

Here is another form that after I save it, I can view it in Preview but NOT in Adobe Acrobat:

http://www.thewebjockeys.com/TheWebJockeys/Fillable_PDF_Sample_from_TheWebJockeys_vC5.pdf

These are the very first two files that I tried - and neither of them currently works. Any idea what the issue might be?

Thanks!

Installation problems with cocoapods

Pod spec

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
xcodeproj 'Test.xcodeproj'
pod 'ILPDFKit', '0.0.6'

If you open up the ILPDFKit folder while it's installing, you'll see the code downloading as it should but at the last phase it'll delete all the source files.

I have no idea why it'd do that.

Here's the terminal printout
dtmac:trunk dt$ pod install --verbose
Preparing

Analyzing dependencies

Updating spec repositories
$ /usr/bin/git rev-parse >/dev/null 2>&1
Updating spec repo master
$ /usr/bin/git pull --ff-only
Already up-to-date.

Inspecting targets to integrate
Using ARCHS setting to build architectures of target Pods: (``)

Resolving dependencies of Podfile
Resolving dependencies for target `Pods' (iOS 7.0)

  • ILPDFKit (= 0.0.6)

Comparing resolved specification to the sandbox manifest
A ILPDFKit

Downloading dependencies

-> Installing ILPDFKit (0.0.6)

Git download
Git download
$ /usr/bin/git clone https://github.com/iwelabs/ILPDFKit.git /Users/dtan/Projects/BMS/trunk/Pods/ILPDFKit --single-branch --depth 1 --branch 0.0.6
Cloning into '/Users/dt/Projects/test/trunk/Pods/ILPDFKit'...
Note: checking out 'c2590b9db8d81c1c26887b0d126119428dd77f5d'.

 You are in 'detached HEAD' state. You can look around, make experimental
 changes and commit them, and you can discard any commits you make in this
 state without impacting any branches by performing another checkout.

 If you want to create a new branch to retain commits you create, you may
 do so (now or later) by using -b with the checkout command again. Example:

   git checkout -b new_branch_name

Generating Pods project

  • Creating Pods project
  • Adding source files to Pods project
  • Adding frameworks to Pods project
  • Adding libraries to Pods project
  • Adding resources to Pods project
  • Linking headers
  • Installing targets
    • Installing target Pods-ILPDFKit iOS 7.0
    • Installing target Pods iOS 7.0
  • Running post install hooks
  • Writing Xcode project file to Pods/Pods.xcodeproj
  • Writing Lockfile in Podfile.lock
  • Writing Manifest in Pods/Manifest.lock

Integrating client project

Integrating target Pods (test.xcodeproj project)

Check Boxes...

Was wondering how would one program in a check for a checkbox?
I have tried:

[_pdfViewController.document.forms setValue:@"Yes" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"YES" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"1" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"Y" forFormWithName:@"Married"];

But none of them added a check to the box. I have checked and double checked the form name thinking I may have typed it in wrong but it is correct.

Thanks

App crash because createWidgetAnnotationViewForPageView returns nil

Hi,

If the form has the ILPDFAnnotationFlagHidden, ILPDFAnnotationFlagInvisible o ILPDFAnnotationFlagNoView, createWidgetAnnotationViewForPageView returns nil. Later, the method updateWidgetAnnotationViews tries to add this nil view and add it to an array. The app crashes. Found using a pdf with those flags.

Thanks

Guillem

Set fonts

Hi, is there a way to change the font (size etc.) within the single acroforms when setting the text programmatically? Thank you.

Font size for the text field in saved static PDF

I'm evaluating ILPDFKit with its sample app. I added a form which contains text fields with two different font sizes: 34 for the "label_title" field, while 16 for the others.

However, after filling out the form with the following code, and save it as static PDF, the resulting font sizes look different from the original ones.

Is there any way to make it follows the original font sizes? Alternatively, is there any way to set the font size problematically when filling out the form?

My form filling code:
`

    let document = ILPDFDocument(resource:"sample_form")

    document.forms.setValue("SAMPLE FORM", forFormWithName: "label_title")

    document.forms.setValue("From: ", forFormWithName: "label_from")

    document.forms.setValue("John Doe", forFormWithName: "field_from")

    document.forms.setValue("Subject: ", forFormWithName: "label_subject")

    document.forms.setValue("My Subject...", forFormWithName: "field_subject")

    document.forms.setValue("Message: ", forFormWithName: "label_body")

    document.forms.setValue("My Body...", forFormWithName: "field_body")

`
sample_form.pdf
Expected_Filled_Form.pdf
screen shot of the pdf created by ilpdfkit

Thanks!

Image/Signature

How to manage Image or Signature ?
Currently we can update TextField and Checkboxes, but what about updating a placeholder for image or signature ?

Running on iPad

I'm running your project on an iPad with iOS 7.1 and I can't save any of your pdf files. Everything works in the simulator.

I get the Object Stream error.

Rendering of Form Fields are off on Multiple Pages

Not sure if this library is still being developed/supported but I just noticed that when you render a PDF form with text boxes on multiple pages the boxes seems to be offset. For example on the first page everything is 100% perfect. However the second page the boxes are all slightly offset, third page even more so, etc. My guess is that the way it calculates the y margin might be a bit off as you add more pages. just curious if anyone has run into this issue. I'm on IOS 8 so not sure if it was an issue with previous versions (iPad/iPad mini/iPhone same issue). I'm trying to narrow down problem and will post if I figure anything out

Crash while opening a PDF with Forms

For the most cases I'm able to open PDF with forms, but for a special file the app is crashing because of

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance

If find out that the ILPDFFormContainer is the reason for that. Especially in the populateNameTreeNode: method you expect a NSMutableDictionary, but in my case here it is an array:

   ...
    NSMutableDictionary *dict  = node[base];  // here in the dict var there comes an array and not dictionary, the base is "1" as STRING
    if (dict == nil) {
        dict = [NSMutableDictionary dictionary];
        node[base] = dict;
    }
    [self populateNameTreeNode:dict withComponents:[components subarrayWithRange:NSMakeRange(1, [components count]-1)] final:final];

My bad solution was it to check for the class, and in case that it is not a dictionary I don't populate:

    NSMutableDictionary *dict  = node[base];
    if (dict == nil) {
        dict = [NSMutableDictionary dictionary];
        node[base] = dict;
    }
    if ([dict isKindOfClass:[NSMutableDictionary class]])
    {
        [self populateNameTreeNode:dict withComponents:[components subarrayWithRange:NSMakeRange(1, [components count]-1)] final:final];
    }

Change Form Text Field Font Size

I have a form in my project, and this form has some textfield. I modify the textfield using follow code and this works:

document.forms.setValue( "Name", forFormWithName: "LabourName")

However, i want to change the font size of the text field in the form , named "LabourName". I have tried to change the font size of the form to 16 in the PDF, but when i set the text field in the form using above code, the font size still remain unchanged. How can i modify the font size or other property like bold words in text field? Thanksss.

Can't read text in parsed PDFs (weird encoding)

I'm using ILPDFKit to extract some text from some PDF files generated by another iOS app. Now I'm having some issues with the encoding of the text in certain files. I convert the Contents stream of an ILPDFPage into a string, then look for BT / ET pairs to extract the text.

For instance, one file contains the following text stream:

BT 0.03260000 Tc 7 0 0 7 0 0 Tm /Tc1 1 Tf [ (Las) 4 (t Name) ] TJ ET

from which I can easily extract the string Last Name

In another file (which has the same general format of the previous file, and which renders correctly on screen), I see the following string instead:

BT 0.03260000 Tc 7 0 0 7 0 0 Tm /TT2 1 Tf [ (!\"#) 4 ($%&\"\'\\() ] TJ ET

Why do I see those weird characters instead of the text Last Name? What am I doing wrong?

The only difference between the two files, apparently, is that one was created on iOS 9, the other was created on iOS 10.

Can't add ILPDFKit to custom view

Dear
I am trying to display the PDF to custom view using ILPDFKit , not full screen view controller.
Let me know how can I use the ILPDFKit to display the PDF into custom view

how to save the flatPDF within app

Can you educate me on how to save the flatPDF file within iOS app. My objective is to save the faltPDF file within app so that user can send this file via e-mail or airprint from the app.

Any help or guidance would really be appreciated

Regards,

Closing app with an open ILPDFViewController displays blank PDF on re-entry.

If you are viewing a PDF, close the app with the Home button, then re-open the app- the PDF will change to a split half-black half-white screen.

It appears the app reopen flow calls into ILPDFViewController
calls

  • (void)viewWillTransitionToSize
    which calls
    [self loadPDFView];
    which creates a new _pdfView = [[ILPDFView alloc] initWithDocument:_document];
    then adds it to the view with-
    [self.view addSubview:_pdfView];

Which I assume is causing the blank.

If I change the function to:

- (void)loadPDFView {
    [_pdfView removeFromSuperview];
    if (!_pdfView) {
        _pdfView = [[ILPDFView alloc] initWithDocument:_document];
    }
    [self.view addSubview:_pdfView];
}

It works.

Is it my implementation causing an issue? Or is this a viable fix.

Thanks for your work.

Sample project crashes

Using the project on iOS 10.2 makes the project crash -
Getting a lot of these errors:
invalid AES padding.
invalid AES block size.

Finally get this
2016-12-17 23:17:03.155 ILPDFKitExample[60071:559333] -[__NSDictionaryM addObject:]: unrecognized selector sent to instance 0x608000640720
2016-12-17 23:17:03.164 ILPDFKitExample[60071:559333] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM addObject:]: unrecognized selector sent to instance 0x608000640720'

doesn't show annotations

First of all great library. I am working on adding annotations on a PDF with forms.. I am adding annotation in a PDF, but when opened through ILPDFKit they doesn't show up, but actually they are there..

Is there anything that you can help me ?

Check the sample PDF I have added an annotation here https://db.tt/6sqgvrul

Multi-Page PDF crashes when scrolling

I have a multi-page PDF that loads the first page however as soon as I scroll up to the second page it crashes the app and logs "Collection <__NSArrayM: 0x16084c530> was mutated while being enumerated."

How update a checkbox (PDFFormTypeButton)???

assuming form is a PDFFormTypeButton
on = [_pdfDocument.forms setValue:@"1" forFormWithName:form.name];??
off = [_pdfDocument.forms setValue:@"0" forFormWithName:form.name];??
seems do not work

All form fields are on the first page

Hi,

When I put in a multi page form with fields set in Adobe Acrobat DC, all the fields are on page 1 of 5 and there are no fields on pages 2-5. Any idea why this happens and how I can fix it?

Font sizes are bigger than the font size it was created

Font sizes on savedpdf would render the fontsizes to a bigger size than it normally was set.

The scenario in this screenshot below is that we created a pdf then added forms using Adobe acrobat, the problem relies now on filling the form fields the output results in larger font than what was set in the PDF.

[ILPDFForm associatedWidget] returns nil

font_sizes

Date select field is considered as PDFTextField

I have date select field in my PDF and ILPDFKit considers that field as PDFFormType.Text.
When I'm setting value "01/11/16" to the field in PDF, ILPDFKit converts the value and prints it out as
"2016-01-11 01:13:36 +0000". Is there a way to just input "01/11/16" instead of "2016-01-11 01:13:36 +0000" ?

Black bars appear with 1.1.3

I found a new issue using 1.1.3, the latest update. The Viewer has black bars at the left and right border. I also tried another pdf file, but stil the same. See the screenshots below:

Version 1.1.1
bildschirmfoto 2017-03-01 um 22 14 00

Version 1.1.3
bildschirmfoto 2017-03-01 um 22 12 39

Some Forms are not placed to the proper page

I've experienced that with some PDF (created with Acrobat 9 PDF version 1.3) some forms are all placed in the first page instead of the correct page.

Investigating the PDF structure, I've noticed that in some Form Widgets the reference to the Parent object is not present.
Besides the Form Widget is referenced from the Page Annots: Catalogue -> Pages -> Annots

Adding ILPDFkit gives linker error

Adding ILPDFKit with pods give me

ld: warning: directory not found for option '-F/Users/Summit/Documents/ios/crm/ParseLibraryV1.9.1'
duplicate symbol _checkKeys in:
/Users/Summit/Library/Developer/Xcode/DerivedData/crm-gcuupqssjsfapsfcnxxkuzzgwwfr/Build/Intermediates/crm.build/Debug-iphonesimulator/crm.build/Objects-normal/i386/PDFDictionary.o
/Users/Summit/Library/Developer/Xcode/DerivedData/crm-gcuupqssjsfapsfcnxxkuzzgwwfr/Build/Products/Debug-iphonesimulator/ILPDFKit/libILPDFKit.a(ILPDFDictionary.o)
ld: 1 duplicate symbol for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Keyboard Management

This is very cool software! Thanks for making it open source.

I have been evaluating it for only an hour. Is there keyboard management to avoid text fields on the bottom of the view controller from being covered by the keyboard?

Along the same lines, re-centering the view if a selected field is covered by the keyboard would also be a great enhancement.

I'll try to dig in further to see if these are enhancements I can code up and submit as pull requests.

Great work! I already love this project.

problem with the input in the textfield on a form

Whenever I want to add characters to a textfield field with content

  1. Select textfield with content
  2. go to a position within the existing contents
  3. input of a character or words from the clipboard
    ...until here it works...
  4. cursor jumps to the end of the entire content
    The problem:
    put on the marked can always be entered only one character. then the cursor jumps immediately to the end home.

All form data repeating on all pages

It seems that for the form I am testing all form data from each page is being rendered simultaneously on all pages. Is this what happens with flattenedData? Is there a way to address this?

Issue with Parse server

I have been trying to upload a form that I edited with ILPDF on the Parse server but all it uploads is a blank one paged pdf.

What program did you use to create PDF form?

I used adobe acrobat pro to create a new form to test out in the example program and only the radio buttons are coming up as fillable. I'm wondering if you did anything special to make ALL the fields show up so that I can fill them in on a custom form. Thanks!

Zooming causes text fields to truncate

If I enter text like "1234.56" into a small text field so that the text fills up all of the available space, for the most part the size of the text auto-shrinks to fill the available space. However, that functionality breaks when I zoom in and out - at some zoom levels the font size is too large and the field value is truncated to something like "123...". At other zoom levels the text is not truncated. Any ideas for a fix?

Crash on rotation

I've added a PDFViewController to a child container view:

let pdfVC = PDFViewController(path: path)
addChildViewController(pdfVC)
pdfVC.view.frame = containerView.bounds
containerView.addSubview(pdfVC.view)
pdfVC.didMoveToParentViewController(self)

And on rotation in ios8, a crash with no debug information occurs.

It seems to happen on _pdfView = nil in PDFViewController.m.

Sequence Protocol

Hi, when trying to iterate through the form container I get:
Type 'ILPDFFormContainer?' does not conform to protocol 'Sequence'
Any thoughts?

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.