Hi,
I have made an application using IONIC in this I generate a report in PDF format, but since iOS 10 update the app freezes while generating PDF I have used the latest version of pdfmake i.e, 0.1.20 to generate PDF.
If there is any solution for this issue please let me know where should I make changes in my app?
Thank you.
I am having a similar problem using pdfmake in iOS 10 and Sierra 10. I'm getting the following error when I add an image to the document using base64 data url's:
RangeError: Range consisting of offset and length are out of bounds
Here is the dataURL:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAggAAACCCAYAAAAjSDD0AAAAAXNSR0IArs4c6QAACtxJREFUeAHt3W2IHdUZAOBbE12sFKvpx8agRvzCNhhKIfhVCi1t8IdQ/6iICiL6Q0tBaPujoiGlPxS0xfqB/rFQWlsstgqCilgKtiKBVUFBVFBRSEgixJJKm9XVvm+8R2Zvsru5uzv3zsx9DryZmTsf57zPBM65s3Nnej2FAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAg0RWCqKQ3RDgIECB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js5eMtW7acNTc393odSa/mMXft2tXbuXPnwUNOTU31Nm3atJqHX9Vjzc7O9nbv3t3bs2fPvONu2LChNz09Pe8zCwQIECBQv8CaNWvO3rFjxxv11zR8DWuH38UeVYH169f3YiBzsOM9cOBAb2Zmprd58+be2rXjp92/f39v7969vX378pEFh5Z169b1Nm7ceOgKnxAgQIDAxAs09gpCC89MvgL66Uq7b475RyrL+VChL0XkzYB5OX+w5Pp8r8Fgyc9nI+YiPq5EjkDyXoF8HsN3I7ZGXBixWMmRwraI30f8e7ENrSNAgAABAgRWTyBfVpSdf1PipWjLlRHHRigECBAgQIDAGAXyG3/1iYt1Dxbeifoeirgq4tSIrF8hQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEWifwfzv/FPA2d3K+AAAAAElFTkSuQmCC
Finally got it to work again. I had to use a different pdfmake.min.js file. I downloaded one from Armcharts.com
https://github.com/amcharts/amcharts3/tree/master/amcharts/plugins/export/libs/pdfmake
Hope this helps others.
For me the pdfmake in this link doesn't work ! Now I can't even open the application on iOS 10!
I used the pdfmake.min.js from the armchart.com site and it works perfectly. What error are you getting on your application? I had an issue where I had an empty node in the content of the pdf and it threw an error ({_margin:null}). All I had to do is make sure I didn't have any empty nodes and the data url images worked perfectly.
I am getting error as Error: TypeError: pdfMake.createPdf is not a function. (In 'pdfMake.createPdf( docDefinition )', 'pdfMake.createPdf' is undefined) after updating pdfmake.min.js from amcharts
I don't get any error by using the pdfmake.min.js from the armchart.com, the app just can't even open by using this pdf library from the website you posted in here... that's really strange...
By the way, I just found another link that's works for me with iOS 10! Looks like they just build the update 5 days ago! Follow the link: https://github.com/pdfmake/pdfmake
Still getting Error: TypeError: pdfMake.createPdf is not a function. (In 'pdfMake.createPdf( docDefinition )', 'pdfMake.createPdf' is undefined)
saormart https://github.com/pdfmake/pdfmake is a broken link
It's not ! try by click on your copy of the link I have posted ! by the way you can get direct to: http://pdfmake.github.io and you can click "Sources" on top right that will bring you to the link I posted !
Can someone explain the relationship between this repository and https://github.com/pdfmake/pdfmake? Seems like this is the one that the bower package is pointing to, but the other is the npm one. However, the bower tag on this one says 0.1.20, but on _pdfmake_ it's 0.1.31. bower info pdfmake says 0.1.20 is the latest one.
https://github.com/pdfmake/pdfmake is a fork that is more alive than this repository.
solution found in #710
Now that https://github.com/pdfmake/pdfmake is inexplicably shut down, we're back to looking for a better solution.
@jimothyhalpert7 All changes from pdfmake/pdfmake are merged back here and there will continue active development. :)
@liborm85 thanks. Are you considering a tag-worthy release any time soon?
@jimothyhalpert7 Date of release is not set. But because a lot of fixes is in master, it should be as soon as possible.
Solve this problem, the latest released version (0.1.22) ?
Thanks so much! Been awaiting for this release.
On Friday, December 23, 2016 4:30 PM, Libor M. <[email protected]> wrote:
Solve this problem, the latest released version (0.1.22) ?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Most helpful comment
https://github.com/pdfmake/pdfmake is a fork that is more alive than this repository.