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

TOPIC:

Highlights show on simulators but no on devices 8 years 10 months ago #8993

  • Gracanin
  • Gracanin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
I don't understand what I am doing wrong...

I am testing my project on iPad Mini (iOS version 8.1.2) and iPhone 4 (iOS version 7.1.2) and everything works instead of highlights. Interesting part here is that everything with highlights work fine on simulators.
I have imported PDF viewer 3.3.3 library into project, and set armv7, armv7s and arm64 as valid architectures. I've tried with older version (2.2) limited on armv7 architecture, but still won't work.

More precisely, method addAnnotMarkup returns true on simulators, but false on devices. I am calling ObjsStart method on every page change and render page after mark up (with vRenderPage method).
Oh, and, Global_activeProfession method returns true on devices.

I'm new in PDFViewer and thus aware that I may be doing something wrong all the time. Am I missing some specific detail here, some special parameter(s) that need(s) to be set..?

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

Last edit: by Gracanin.

Highlights show on simulators but no on devices 8 years 10 months ago #8995

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

I suggest to use the last version available here .
At the moment this is a beta version because we're working on a RTOL text issue, but al features are working correctly, and the core library is updated.

Did you try with the same pdf file? it possible that the file used on device is readonly?

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

Highlights show on simulators but no on devices 8 years 10 months ago #8996

  • Gracanin
  • Gracanin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
Yes, pdf file is readonly, I can easily spot it by calling PDFDoc's canSave method which returns false.

I am not calling that method when trying to set markups, though. Is it possible that PDF Viewer library's render method can't do its job with highlights when file is not editable? If so, how can I avoid it or make my PDF file editable on device?

P.s. I have tried with 3.3.6 version library, highlights unfortunately still are not showing...

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

Highlights show on simulators but no on devices 8 years 10 months ago #9000

  • Gracanin
  • Gracanin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
I tried with editable pdf file, at least I think it is editable because PDFDoc's canSave method returns true, but only on simulator...

Yet again, my situation is as follows:
  • PDFDoc's canSave returns true on simulator but false on devices
  • Page_addAnnotMarkup2 returns true on simulator but false on devices
  • PDFGlobal's Global_activeProfession returns true both on devices and simulators

I have also noticed that PDFVCache.Clear is often written twice on console when compiling on device, and always once when compiling on simulator. I don't know in which situations clear method has to be called, but I can see on stack trace that it is being called from RenderSync method which is called within vSelMarkup method.

Please, help. This is the third day I am dealing with this issue...

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

Highlights show on simulators but no on devices 8 years 10 months ago #9001

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

The pdf file is in a writable directory? if you use the demo project, you can put the file into the app using iTunes, that copy the file into Documents directory (that is writable).
can you upload the pdf file? We will check it and we will let you know if the problem is due to the file or not.
The following user(s) said Thank You: Gracanin

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

Highlights show on simulators but no on devices 8 years 10 months ago #9002

  • Gracanin
  • Gracanin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
I am testing PDF Viewer features in my own project. So I was getting the path to my pdf file from resources.

When I moved pdf file to Documents directory, highlights were suddenly shown on device, finally!

Grazie mille, emanuele!

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

  • Page:
  • 1
Powered by Kunena Forum