Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why iBook PDF won't export? #59

Open
stefnestor opened this issue Oct 16, 2023 · 2 comments
Open

Why iBook PDF won't export? #59

stefnestor opened this issue Oct 16, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@stefnestor
Copy link

👋 @bingryan, I appreciate your more Obsidian-direct automation of the ibooks_notes_exporter tool, cheers!

Request

I've been trying to figure why my iBook PDFs won't export via your tool. (Normal iBooks seem to work just fine.)

🙏 Would you mind reviewing if your tool works for exporting PDFs? And if not, will you kindly consider the feature request? If not able, will you kindly consider filtering out PDFs from your search since they won't work as a bug?

I'll go through manual scripting if needed as an alternative to munach/obsidian-extract-pdf-annotations and/or akaalias/obsidian-extract-pdf-highlights in order to customize back to the formatting you've defined which I prefer if expanding to include PDFs ends up not being within scope. TIA!

Example

Playing forward troubleshooting steps from #49, I checked

  1. I highlighted the first text of example How to Make a Complete Map of Every Thought You Think.pdf (original URL reference) PDF has text highlighted(/annotated) on page#0. For good measure I also highlighted & left a comment on page#iii.
    image
  2. Your "Obsidian iBook" tool has workable settings for testing
    image
  3. Using ibook: export by search for "how to make a complete" shows my PDF title and submitting does not DevTool console error
    image
    image
    downloads$ echo "
    >         SELECT
    >             *
    >         FROM ZBKLIBRARYASSET
    >         WHERE ZASSETID == '3821D2BFD7B808DE03C5F042C99A2A55'
    >     " | sqlite3 ~/Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary/BKLibrary-1-091020131601.sqlite -json
    [{"Z_PK":210,"Z_ENT":5,"Z_OPT":22,"ZCANREDOWNLOAD":1,"ZCOMBINEDSTATE":1,"ZCOMPUTEDRATING":null,"ZCONTENTTYPE":3,"ZDESKTOPSUPPORTLEVEL":0,"ZDIDRUNFORYOUENDOFBOOKEXPERIENCE":null,"ZDIDWARNABOUTDESKTOPSUPPORT":0,"ZFILESIZE":526770,"ZGENERATION":1,"ZHASRACSUPPORT":0,"ZISDEVELOPMENT":0,"ZISDOWNLOADINGSUPPLEMENTALCONTENT":null,"ZISEPHEMERAL":0,"ZISEXPLICIT":null,"ZISFINISHED":null,"ZISHIDDEN":0,"ZISLOCKED":0,"ZISNEW":1,"ZISPROOF":0,"ZISSAMPLE":0,"ZISSTOREAUDIOBOOK":null,"ZISSUPPLEMENTALCONTENT":0,"ZISTRACKEDASRECENT":null,"ZMETADATAMIGRATIONVERSION":null,"ZNOTFINISHED":null,"ZPAGECOUNT":0,"ZRATING":0,"ZSERIESISCLOUDONLY":null,"ZSERIESISHIDDEN":null,"ZSERIESNEXTFLAG":null,"ZSERIESSORTKEY":0,"ZSORTKEY":0,"ZSTATE":1,"ZTASTE":0,"ZTASTESYNCEDTOSTORE":0,"ZLOCALONLYSERIESITEMSPARENT":null,"ZPURCHASEDANDLOCALPARENT":null,"ZSERIESCONTAINER":null,"ZSUPPLEMENTALCONTENTPARENT":null,"ZASSETDETAILSMODIFICATIONDATE":719171132.39047099071,"ZBOOKHIGHWATERMARKPROGRESS":0.0,"ZBOOKMARKSSERVERMAXMODIFICATIONDATE":null,"ZCREATIONDATE":709921075.50168004337,"ZDATEFINISHED":null,"ZDURATION":0.0,"ZEXPECTEDDATE":null,"ZFILEONDISKLASTTOUCHDATE":null,"ZLASTENGAGEDDATE":null,"ZLASTOPENDATE":719171132.39014991421,"ZLOCATIONSERVERMAXMODIFICATIONDATE":null,"ZMODIFICATIONDATE":719171132.39014991421,"ZPURCHASEDATE":709921074.19790002609,"ZREADINGPROGRESS":0.0,"ZRELEASEDATE":null,"ZUPDATEDATE":719170411,"ZVERSIONNUMBER":0.0,"ZACCOUNTID":null,"ZASSETGUID":"23FCD756-0212-425D-AD20-1DF509E72D48","ZASSETID":"3821D2BFD7B808DE03C5F042C99A2A55","ZAUTHOR":"Lion Kimbro","ZBOOKDESCRIPTION":null,"ZBOOKMARKSSERVERVERSION":null,"ZCOMMENTS":null,"ZCOVERURL":null,"ZCOVERWRITINGMODE":null,"ZDATASOURCEIDENTIFIER":"com.apple.ibooks.datasource.ubiquity","ZDOWNLOADEDDSID":null,"ZEPUBID":"","ZFAMILYID":null,"ZGENRE":null,"ZGROUPING":null,"ZKIND":null,"ZLANGUAGE":null,"ZLOCATIONSERVERVERSION":null,"ZPAGEPROGRESSIONDIRECTION":null,"ZPATH":"/Users/stef/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/How to Make a Complete Map of Every Thought You Think.pdf","ZPERMLINK":null,"ZPURCHASEDDSID":null,"ZSEQUENCEDISPLAYNAME":null,"ZSERIESID":null,"ZSERIESSTACKIDS":null,"ZSORTAUTHOR":"Lion Kimbro","ZSORTTITLE":"How to Make a Complete Map of Every Thought You Think","ZSTOREID":null,"ZSTOREPLAYLISTID":null,"ZTEMPORARYASSETID":null,"ZTITLE":"How to Make a Complete Map of Every Thought You Think","ZVERSIONNUMBERHUMANREADABLE":null,"ZYEAR":null}]
    downloads$ echo "
    >         SELECT
    >             *
    >         FROM ZAEANNOTATION
    >         WHERE ZANNOTATIONASSETID == '3821D2BFD7B808DE03C5F042C99A2A55'
    >         ORDER BY ZPLLOCATIONRANGESTART,ZFUTUREPROOFING6
    >     " | sqlite3 ~/Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/AEAnnotation_v10312011_1727_local.sqlite -json
    # NULL
    
  4. Note in (3) that PDF JSON did export but no annotations returned in your second custom SQLite query, so the resulting page only has top-level PDF details but no annotations
    image
@bingryan bingryan added the bug Something isn't working label Oct 17, 2023
@bingryan
Copy link
Owner

@stefnestor hey, stefnestor, In mac, pdf files are not opened using the ibook app. The pdf file is opened using the preview app.The ibook app add book info data at database. but annotation not save.

@bingryan
Copy link
Owner

BTW, On macOS, PDF annotation data in the preview app is stored in the PDF file. you can use :

strings xxxx.pdf | grep Annots

@bingryan bingryan added help wanted Extra attention is needed and removed bug Something isn't working labels Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants