- Posts: 4
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
Xamarin.iOS - GetImageForPage - custom render size
IP: 192.168.0.71
9 years 1 month ago #12713
by zemacik
Xamarin.iOS - GetImageForPage - custom render size was created by zemacik
Hello Gurus,
I'm currently playing with Radaee PDF lib for Xamarin iOS, and rendering pages with GetImageForPage .
But the rendered image is too small.
Please do you know how do I set my own image ressolution?
In radaee for Windows UWP platform I just do something like:
PDFBmp m_dib = new PDFBmp(scaledWidth, scaledHeight);
m_dib.Reset(0xFFFFFFFF);
PDFMatrix mat = new PDFMatrix(scale, -scale, 0, scaledHeight);
pdfPage.RenderToBmp(m_dib, mat, true, PDF_RENDER_MODE.mode_normal);
Please can you help?
Thank you
Regards,
Michal
I'm currently playing with Radaee PDF lib for Xamarin iOS, and rendering pages with GetImageForPage .
But the rendered image is too small.
Please do you know how do I set my own image ressolution?
In radaee for Windows UWP platform I just do something like:
PDFBmp m_dib = new PDFBmp(scaledWidth, scaledHeight);
m_dib.Reset(0xFFFFFFFF);
PDFMatrix mat = new PDFMatrix(scale, -scale, 0, scaledHeight);
pdfPage.RenderToBmp(m_dib, mat, true, PDF_RENDER_MODE.mode_normal);
Please can you help?
Thank you
Regards,
Michal
IP: 192.168.0.71
9 years 1 month ago #12717
by emanuele
Replied by emanuele on topic Xamarin.iOS - GetImageForPage - custom render size
Dear Michal,
the actual method returns the pdf page image using the original size.
We release the Xamarin module with the Obj-C library project for free and opensource to let users customize or add features.
In this case you can scale the image returned by the method or change the method implementation using the Obj-C project to meet your needs.
the actual method returns the pdf page image using the original size.
We release the Xamarin module with the Obj-C library project for free and opensource to let users customize or add features.
In this case you can scale the image returned by the method or change the method implementation using the Obj-C project to meet your needs.
IP: 192.168.0.71
9 years 1 month ago #12757
by zemacik
Replied by zemacik on topic Xamarin.iOS - GetImageForPage - custom render size
Thank you for your answer.
To be honest I'm not a Objective C developer.
I tried to do the function by myself. But I'm unable to get it back to visual studio binging lib.
in the xamarin binding project from the sample "RDPDFViewXamarin" there is a file file:
libRadaeeLibSDK.a of size about 28 Mbytes.
but when I compile RadaeeLib xcode project from iOS directory
I get file libRadaeeLib.a and is much smaller than the original one (only 13 Mbytes)
When I try to put the new file to the binding project, compile, run application I get a message
"Exception is: Exception - Could not create an native instance of the type 'RadaeeLib.RadaeePDFPlugin': the native class hasn't been loaded."
Please can you help me how should I compile the modified lib in xcode to get it working in my xamarin project?
Or why is the original one called libRadaeeLibSDK.a and the new one only libRadaeeLib.a.
How do I get libRadaeeLibSDK.a ?
(of course i renamed my file "libRadaeeLib.a." to "libRadaeeLibSDK.a") but it is not working.
Thank you
Best regards,
Michal
To be honest I'm not a Objective C developer.
I tried to do the function by myself. But I'm unable to get it back to visual studio binging lib.
in the xamarin binding project from the sample "RDPDFViewXamarin" there is a file file:
libRadaeeLibSDK.a of size about 28 Mbytes.
but when I compile RadaeeLib xcode project from iOS directory
I get file libRadaeeLib.a and is much smaller than the original one (only 13 Mbytes)
When I try to put the new file to the binding project, compile, run application I get a message
"Exception is: Exception - Could not create an native instance of the type 'RadaeeLib.RadaeePDFPlugin': the native class hasn't been loaded."
Please can you help me how should I compile the modified lib in xcode to get it working in my xamarin project?
Or why is the original one called libRadaeeLibSDK.a and the new one only libRadaeeLib.a.
How do I get libRadaeeLibSDK.a ?
(of course i renamed my file "libRadaeeLib.a." to "libRadaeeLibSDK.a") but it is not working.
Thank you
Best regards,
Michal
IP: 192.168.0.71
9 years 1 month ago #12758
by emanuele
Replied by emanuele on topic Xamarin.iOS - GetImageForPage - custom render size
Hi,
if you have to add/modify functions, you should edit RadaeePDFPlugin class in Xcode and ApiDefinition in Visual Studio
To compile a new lib for Xamarin, you have to use the "make" file in iOS folder to compile all architectures (go to iOS folder then run the command "make" from terminal).
For more info about this, you could take a look at this article: developer.xamarin.com/guides/ios/advance...ctive-c/walkthrough/
if you have to add/modify functions, you should edit RadaeePDFPlugin class in Xcode and ApiDefinition in Visual Studio
To compile a new lib for Xamarin, you have to use the "make" file in iOS folder to compile all architectures (go to iOS folder then run the command "make" from terminal).
For more info about this, you could take a look at this article: developer.xamarin.com/guides/ios/advance...ctive-c/walkthrough/
Time to create page: 0.467 seconds