Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Xamarin.iOS - GetImageForPage - custom render size 6 years 8 months ago #12713

  • zemacik
  • zemacik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

Xamarin.iOS - GetImageForPage - custom render size 6 years 8 months ago #12717

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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.

Please Log in or Create an account to join the conversation.

Xamarin.iOS - GetImageForPage - custom render size 6 years 8 months ago #12757

  • zemacik
  • zemacik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

Xamarin.iOS - GetImageForPage - custom render size 6 years 8 months ago #12758

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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/

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum