
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@simplepdf/web-embed-pdf
Advanced tools
Read more about SimplePDF Embed »
Join Our Discord
·
Follow us on Twitter
Open PDF files with SimplePDF, using a simple script tag.
Add this script in the head of your webpage:
<script src="https://unpkg.com/@simplepdf/web-embed-pdf" defer></script>
Replace companyIdentifier
with your own
<script
src="https://unpkg.com/@simplepdf/web-embed-pdf"
companyIdentifier="yourcompany"
defer
></script>
Anchor links (a
) with an href pointing to a PDF file (.pdf
) or SimplePDF forms are automatically opened in SimplePDF
Exclude any anchor tags from opening SimplePDF by adding the class exclude-simplepdf
:
<a href="/example.pdf" class="exclude-simplepdf">Doesn't open with SimplePDF</a>
Add a class simplepdf
to any anchor tag to open them with SimplePDF:
<a href="/example_without_pdf_extension" class="simplepdf">Open with SimplePDF</a>
In case you want to have more control over how the modal for editing PDFs is invoked, you can directly interact with the simplePDF
global variable that is injected in the window
by the script.
SimplePDF currently supports the following languages automatically detects the language of the page (using the lang
attribute) and opens the editor in the following languages:
en
)de
)es
)fr
)it
)pt
)If you wish to override the automatic detection, you can specify the locale
attribute on the script tag as follows:
<script
src="https://unpkg.com/@simplepdf/web-embed-pdf"
companyIdentifier="yourcompany"
locale="fr"
defer
></script>
window.simplePDF.openEditor({ href: 'publicly_available_url_pdf' });
window.simplePDF.openEditor({ href: null });
window.simplePDF.closeEditor();
The context is sent as part of the submission via the webhooks integration: read more
Use-cases:
Do not store sensitive information in the context (!!) as it is available locally to anyone inspecting the code
window.simplePDF.openEditor({
href: 'publicly_available_url_pdf',
context: {
customer_id: '123',
environment: 'prod',
},
});
Use-cases:
window.simplePDF.setConfig({
locale: 'fr',
autoOpen: false,
});
FAQs
SimplePDF straight into your website
The npm package @simplepdf/web-embed-pdf receives a total of 130 weekly downloads. As such, @simplepdf/web-embed-pdf popularity was classified as not popular.
We found that @simplepdf/web-embed-pdf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.