djphoenix719 / pdfoundry Goto Github PK
View Code? Open in Web Editor NEWA fully featured PDF viewer module for Foundry VTT, including form fillable actor sheets, journal links, and more!
License: Apache License 2.0
A fully featured PDF viewer module for Foundry VTT, including form fillable actor sheets, journal links, and more!
License: Apache License 2.0
Opened one of my NPCs and changed the sheet to pdfoundry.PDFActorSheetAdapter. Produced a blank pdf view. Wanted to change it back, so clicked Sheet Select. This opens a dialog with a Select Sheet dropdown and a Conform button. The dropdown is empty. I cannot change to a different sheet.
Foundry 0.6.6 via Node
DND5e 0.96
Will disable other modules and re-test.
Although I trust them, I'd rather that my players didn't have the ability to create PDFs. This would prevent them from reading an adventure PDF and getting spoilers.
If the button in Journal could be removed for them as well as disabling it, that would be most preferred!
PF2E 'Inspect Data' is broken
Describe the bug
All text in text fields is oriented 90 degrees clockwise.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Have the text displayed in proper orientation.
Screenshots
If applicable, add screenshots to help explain your problem.
Version Information:
Additional context
Fillable spaces were made by me from extracted pages and work fine in Adobe Acrobat Reader DC 20.012.20048 and Foxit PhantomPDF 9.5.0.20721
SWNr Karta edytowalna.pdf
Describe the bug
When I create a new actor from an imported form-fillable pdf, PDFoundry selects all the checkboxes by default.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version Information:
Server
The Forge; Foundry VTT version: 0.6.6
Client
MacOS: 10.15.6
Browser: Microsoft Edge version 85.0.564.63 and Chrome Version 85.0.4183.121
I have also confirmed the issues with Windows 10 (2004) and Edge (Version 85.0.564.63)
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Does #28 mean that Foundry 0.7.5 is not yet supported? I know module.json only lists compatibility up to 0.7.3 but it's so common for module authors not to update module.db that it's hard to know when that's lagging awaiting the next module release and when someone REALLY means that it's not supported.
Describe the solution you'd like
Add Foundry 0.7.5/0.7.x statements to https://foundryvtt.com/packages/pdfoundry/ and README.md here so folks who consider PDFoundry an important part of their game know the compatibility status.
Describe alternatives you've considered
At some point I'll stand up a 0.7.5 instance and do some testing myself, but having an issue to collect positive/negative reports seems like it will help concentrate news about testing that the community has done.
Additional context
N/A
If a PDF is put on the canvas with no page given, it'll open the PDF on page 5. Expected would be page 1.
Describe the bug
In some PDFs, the text fields are centered, yet PDFoundry renders those as left align.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the text to be left aligned, like it is in Adobe Reader.
Screenshots
This is part of a sheet rendered in Adobe Reader:
This is the same file rendered in Foundry:
PopOut compatibility must be investigated; it is worthwhile to add compatibility if it is simple to do.
Describe the bug
When a dropdown list is used to set a value in a formfillable PDF for a character sheet the value does not remain once the sheet has been closed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected there to be a value in the are filled by the dropdown list.
Screenshots
This image shows a dropdown list being used in the relevant sheet.
Version Information:
P.S I was unable to attach any files as part of this post. Will attempt to reach you over Discord with a share. These files are the actor JSON and the formfillable PDF.
Describe the bug
When I close out of Foundry on the Forge, and then come back in, later, I have to open one of the PDFoundry characters and make sure the proper sheet is chosen. All sheets are adjusted when I make this change, but it returns to the default sheet choice in Foundry when I close out. Just to ensure I'm describing this so as to be understood, I can get all of my sheets back once I've opened one of the characters and change it to the PDFoundry sheet I built, but each time I close out it returns all sheets to the default.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected my sheet to open automatically. It's not 0.7.6, either, because it was doing this three days ago, as well.
Screenshots
Wouldn't really help.
Version Information:
Additional context
I can't think of any.
As far as sending files, I can grab copies of my my Template and a Character PDF copy, but I haven't made any Actors off of the Forge, and I don't yet know how to send things from the Forge without downloading the whole ball of wax.
Captain Mo.pdf
TE-FVTT-CS.pdf
Nothing is filled out on either of these copies, unless I left some testing information on there; they're clean on The Forge.
Thank you for helping me out with this. If something's wrong with my setup, please let me know?
~Paul
I'm having a problem linking files using Foundge hosted on Forge.
This is the link: https://assets.forge-vtt.com/5edaa5ad1af78ac47ba4d4c6/PDF/Grit-and-Glory-v6_compressed.pdf generated on select the PDF
But, when I test:
The module created another link: https://atalant.forge-vtt.com/https://assets.forge-vtt.com/5edaa5ad1af78ac47ba4d4c6/PDF/Grit-and-Glory-v6_compressed.pdf"
How to fix it?
(I tested it with 6 different PDFs.)
Would it be possible to have Journal Entries open a defined PDF on a defined page rather than opening the Journal Entry if the entry only contains a single link to a PDF?
Editing the Journal Entry then could be done via context menu maybe.
PDF path does not take into account the routePrefix in options.json
To Reproduce
Steps to reproduce the behavior:
PDF.js v2.6.320 (build: bfbef604) Message: Missing PDF "https://vtt.example.com/modules/pdfoundry/assets/manual/en/manual.pdf".
route should be https://vtt.example.com/examplePrefix/modules/pdfoundry/assets/manual/en/manual.pdf
I can still add pdf's by manually adding the route prefix so I know it works but the manual doesn't load through the default ui buttons and it's slightly more work to add new pdf's. There may be other issues caused by this but I have not found them.
Describe the bug
I'm referencing the same PDF for multiple PDF Journal Entries -- but refer to different page offsets. I drop these journal entries onto my different maps. Problem is that the journal entry token on each map is remembering the page offset last used -- even when caching is disabled.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Version Information:
Additional context
It's absolutely critical to my purposes to be able to reference the same PDF in multiple Journal Entries and be able to use different page offsets. If I move around in the PDF, I do NOT want that offset remembered -- I always want the page offset I setup for the Journal Entries to be used. Currently, accessing the Journal Entries from the Journal directly and clicking the "Test Settings" button is the behavior I want to have when I click the Journal Entry instances on my maps -- and I will use that as a work-around until this issue is fixed. But it would make things much easier if this problem was fixed.
Describe the bug
Dynamic links with Page offset doesn't work if the scrolling mode or spread mode have been changed.
To Reproduce
Steps to reproduce the behavior:
Version Information:
Additional context
This seems also to be the case if you change the Spread options. Not sure how easy this will be to fix, but maybe disabling those options (or reset them on opening?) if it can't be fixed.
Describe the bug
The pdf manual is missing after a fresh install
"PDF.js v2.6.320 (identifiant de compilation : a28ee725)
Message : Missing PDF "http://localhost:30000/modules/pdfoundry/assets/manual/en/manual.pdf"."
Version Information:
Is your feature request related to a problem? Please describe.
Would be amazing if we could change the form field colors and transparency values, to achieve better synergy with the sheet. Something like:
Describe the solution you'd like
Since each sheet is a different world, I'd suggest a setting where user can simply input the rgba() value
Describe alternatives you've considered
Replicate multiple themes each with preset colors and transparency for form fields. But this will bloat too much.
Additional context
As a hint, this is where the css style matters:
.annotationLayer .textWidgetAnnotation input,
.annotationLayer .textWidgetAnnotation textarea,
.annotationLayer .choiceWidgetAnnotation select,
.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
background-color: rgba(0, 54, 255, 0.13);
EDIT: As a side suggestion please also consider the :hover style border that shows up, it can be weird in some forms
.annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
border: 1px solid rgba(0, 0, 0, 1);
}
Having PDFs in FVTT is great but having to navigate to a page you seek is cumbersome. Also linking to a PDF (@item[PDF-Title]) only opens the sheet not the PDF. This severely limits the usefulness.
Introducing a way to link to a specific page inside of a specific PDF would be greatly beneficial. For example you have a Journal Entry "Races" containing information about the races available in your setting. Having a link there that leads directly to the page in the PDF containing detailed information about the races would add another layer of usefulness. This would allow you to place that link for further reading available to everyone looking at that JournalEntry.
I don't know how such a link could look like but it should be made easy to remember.
An alternative (also very beneficial and one that should possibly be introduced along with links) would be a way to set up a Journal Entry that does not even opens a Journal Entry but a PDF on a specific page directly. This way - if you have a PDF containing all the information - you could name the Journal Entry Races and have it open the PDF on the page that shows the information on races without the need to write anything in your Journal.
Linking to a bookmark present in the PDF is also a viable alternative.
Currently the user manual does not have an adequate explanation of the map pins feature
Describe the bug
When I have set up an actor with an actor sheet, clicking on Inspect Data does nothing.
To Reproduce
Expected behavior
I expect the Data Inspector to open.
Version Information:
Describe the bug
PDF Details are openable by anyone
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Opening of the PDF itself, or otherwise the details of the PDF but with the settings being locked (like being able to see Modules but not able to turn them on or off), rather than editable to then be denied access to edit.
Version Information:
Describe the bug
embedding a pdf in a journal entry does not work. The @pdf syntax seems to be not recognized
when dragging a pdf into a journal entry, it is recognized as a journalEntry (eg @JournalEntry[fmKbkcXeg07L0dvk]{"name of the pdf"}
To Reproduce
see screenshot
Version Information:
Currently @pdf links don't render for non-core things unless they are specifically supported by PDFoundry. As far as I know this is because enrichHTML is not used for the links.
Since Journal Entries can be put on the tabletop to create Journal Notes it would be good to have that functionality for PDFs as well. Currently if you stick a PDF to the tabletop the PDF can't be opened by clicking on those. It would also be great if for those notes a page could be defined.
Reporting on the behalf of Pete | Dragons Are Real#6554, so I apologize if I don't have all the details. Pete, if you can add anything missing, that would be greatly appreciated!
Describe the bug
When Pdfoundry is active I cannot draw horizontal lines or create tables in a Journal entry using the TinyMCe editor.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Version Information:
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
No, I have been trying to find a way to play Vampire the Masquerade through FoundryVTT and your module seemed like the solution. Until I got it all installed and working properly and found that PDFs lose their interactivity function.
V20_4-Page_Neonate_Interactive.pdf
Describe the solution you'd like
I would love to have a way to be able to retain the interactive features of PDFs like the one above with the ability to save them after they were edited. This would allow me to use them as character sheets in Foundry
Other than that the module is great!
Describe the bug
I am using a laptop, I notice when I open a character sheet that uses PDFs, my CPU fans start spinning hard and fast. And this remains so while the PDF is open. Stops when I close the pdf or alt-tab into another browser page.
PDF Sheet on the test is just 2 pages long.
Version Information:
Not sure if imagining things, but didn't PDFjs have a dark theme prior to 0.6.10 or something...?
My personal preference is a dark theme, which i think goes better together with the windows in FVTT. But maybe have an option in the module settings to change the theme?
Describe the bug
"Open to page" in dynamic links doesn't work unless a Page Offset value is entered in the PDF settings. For a PDF without an actual page offset, the value needs to be specifically set to 0.
To Reproduce
Steps to reproduce the behavior:
Version Information:
Additional context
I think a null value should be treated as 0.
We would like to include a PDF with our game system and I want to programmatically create the PDF journal entry during the game initialization.
We want to include the "free" version of the game rules (GURPS LITE) and provide a few example character sheets which reference them. Due to the nature of our character sheets, the "page ref" is data driven, and it would just be easier if we could have the already created journal entry to enable PDFoundry's openPDFDataByCode() method.
Is your feature request related to a problem? Please describe.
Right now, the text fields for PDFs are always highlighted in blue.
Describe the solution you'd like
I’d like an option to hide the blue highlight text fields, like Adobe Reader can. I think it’s visually more pleasing and for character sheets generally not needed.
Sheet not saving dropdown box
WtF_2ndED_Official_4-Page_Interactive.pdf
When using MrGone PDFs for character sheets the dropdown selection is now saving in PDFoundry.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The sheet to save the dropdown box selection.
Version Information:
Additional context
In addition the dropdown box does not allow you to enter a custom item even though that is how it is designed in normal browsers.
PDF and Exported Character Provided
PDF + Char Export.zip
Is your feature request related to a problem? Please describe.
When I drag & drop a pdf-journal entry into a new compendium, I cant open the pdf-journal from inside the compendium, no pdf is loaded, only an option for text/image, see image:
Describe the solution you'd like
To be able to create compendiums with journals/pdfs, so that we can export to modules that we can activate in other worlds.
Is your feature request related to a problem? Please describe.
The GURPS Basic books are two separate and distinct PDF files: Characters, and Campaigns. The page number, however, is consecutive: Characters start on page 1 and run to 336; Campaigns starts at page 337 and runs through 575.
It is a GURPS convention to refer to both these books using the abbreviation, "B" (e.g., B100, B450).
I would like PDFoundry to allow me to create two PDFs and map both of them to the B prefix; but to look at the page number to decide which PDF to open.
Describe the solution you'd like
In the PDFoundry settings, allow both a PDF Code and a Page Range to refer to a specific PDF. If the page range is omitted, PDFoundry works as it does now. If the page range is included, the module would check the combination of Code and Page Range to determine which book to open.
If the user enters something inconsistent, such as overlapping page numbers, PDFoundry may either show the user an Alert and bail out or pick the first PDF to display when clicking a PDF code.
Describe alternatives you've considered
Certainly the authors of GURPS material in Foundry may edit the book abbreviation ("B1:" and "B2:" for example, leading to non-ambiguous references such as B1:100 and B2:450) but the current standard (B100, B450) is well established and would lead to lots of hacking of imported data of established materials (such as character sheet data).
Describe the bug
In SWADE Character sheets (not NPC sheets) have a section called Edges which have their description shown on the right when an Edge/Hindrance is selected on the right. In this description preview (not technically a preview as it shows the entire description) links to PDFs to not function. Links to journalEntries and such core function links work fine. The same is true for the powers.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
PDF links should always be shown as links, not in plain text.
Screenshots
Screenshots where provided on Discord.
Requested for the PF2E for use with Pathfinder Society. Need to map specific data from the PFS tab to fillable form fields. Should make this generic enough while I'm at it other systems can support it if desired.
Describe the bug
During play, for some of the players some of the data in forms of Actor Sheets occasionally wasn’t rendered. While most of the data was there, in some of form fields the data was simply missing (as in invisible or not rendered, the data was still there in the background). Closing and re-opening the window solved this and the data re-appeared correctly.
It happened with different forms for different characters each time this happened.
To Reproduce
I wasn’t able to reproduce it reliably as the host, but I think it happened once for me, too. All the players did was opening and closing their sheets from time to time.
As a GM, I also opened their sheets. We did have the same sheet open by the player and by me as the GM simultaneously, but that didn’t result in the missing data directly (or at least immediately), as far as we could tell.
I also once showed them another PDF using the “Show to...” button.
Sorry this is so vague. We were not able to see a pattern at which it happened.
Expected behavior
I expected that all the data in the forms are rendered all the time.
Version Information:
PDF path does not take into account the routePrefix in options.json
To Reproduce
Steps to reproduce the behavior:
PDF.js v2.6.320 (build: bfbef604) Message: Missing PDF "https://vtt.example.com/modules/pdfoundry/assets/manual/en/manual.pdf".
route should be https://vtt.example.com/examplePrefix/modules/pdfoundry/assets/manual/en/manual.pdf
I can still add pdf's by manually adding the route prefix so I know it works but the manual doesn't load through the default ui buttons and it's slightly more work to add new pdf's. There may be other issues caused by this but I have not found them.
Automation Tools for form fillable actor sheets will allow users to easily create helpers and permit disabling fields.
The use case here is game speed and removal of mathematical errors during play.
Describe the bug
I seem to get some errors in the dev console when opening a PDF (see screenshot below). The PDF is configured to not cache, and I'm opening it as a GM. Foundry VTT is running locally on the computer, and the pdf is stored locally.
Checking caching seems to get rid of the errors...
Version Information:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.