Skip to content

Commit

Permalink
Updates desc for import PDF/PPT to creates new doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hollyschinsky committed Oct 31, 2024
1 parent b05832f commit 6252141
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions src/pages/guides/develop/use_cases/content_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,24 @@ const {document} = AddOnSDKAPI.app;

const mediaAttributes = {title: "Sample.pdf"}

// Add PDF to current page
// Import a PDF. Note this will be imported as a new Adobe Express document.
function importPdf(blob, mediaAttributes) {
try {
document.importPdf(blob, mediaAttributes);
}
catch(error) {
console.log("Failed to add pdf to the document.");
console.log("Failed to import the pdf.");
}
}

// Add pdf(url) to the current page
// Import a PDF from a URL. Note this will be imported as a new Adobe Express document.
async function importPdfFrom(url) {
try {
const blob = await fetch(url).then(response => response.blob());
document.importPdf(blob, {title: "Sample.pdf"});
}
catch(error) {
console.log("Failed to add pdf to document.");
console.log("Failed to import the pdf.");
}
}
```
Expand All @@ -178,7 +178,7 @@ const {document} = AddOnSDKAPI.app;

const mediaAttributes = {title: "Sample.pptx"} // only .pptx file types are supported by Express

// Import presentation to document
// Import a presentation. Note: this will be imported as a new Adobe Express presentation.
function importPresentation(blob, mediaAttributes) {
try {
document.importPresentation(blob, mediaAttributes);
Expand All @@ -188,7 +188,7 @@ function importPresentation(blob, mediaAttributes) {
}
}

// Add presentation(url) to the current page
// Import a powerpoint presentation from a URL. Note: this will be imported as a new Adobe Express presentation.
async function importPresentationFrom(url) {
try {
const blob = await fetch(url).then(response => response.blob());
Expand Down
16 changes: 8 additions & 8 deletions src/pages/references/addonsdk/app-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,24 +358,24 @@ const {document} = AddOnSDKAPI.app;

const mediaAttributes = {title: "Sample.pdf"}

// Import Pdf to document
// Import a PDF. Note this will be imported as a new Adobe Express document.
function importPdf(blob, mediaAttributes) {
try {
document.importPdf(blob, mediaAttributes);
}
catch(error) {
console.log("Failed to import pdf to the page.");
console.log("Failed to import the pdf.");
}
}

// Add pdf(url) to the current page
// Import a PDF from a URL. Note this will be imported as a new Adobe Express document.
async function importPdfFrom(url) {
try {
const blob = await fetch(url).then(response => response.blob());
document.importPdf(blob, {title: "Sample.pdf"});
}
catch(error) {
console.log("Failed to import pdf to document.");
console.log("Failed to import the pdf.");
}
}
```
Expand Down Expand Up @@ -413,24 +413,24 @@ const {document} = AddOnSDKAPI.app;

const mediaAttributes = {title: "Sample.pptx"} // only Pptx is supported by Express

// Import presentation to document
// Import a presentation. Note: this will be imported as a new Adobe Express presentation.
function importPresentation(blob, mediaAttributes) {
try {
document.importPresentation(blob, mediaAttributes);
}
catch(error) {
console.log("Failed to import presentation to the page.");
console.log("Failed to add the presentation to the document.");
}
}

// Add presentation(url) to the current page
// Import a powerpoint presentation from a URL. Note: this will be imported as a new Adobe Express presentation.
async function importPresentationFrom(url) {
try {
const blob = await fetch(url).then(response => response.blob());
document.importPresentation(blob, {title: "Sample.pptx"});
}
catch(error) {
console.log("Failed to import presentation to the document.");
console.log("Failed to add the presentation to document.");
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions src/pages/references/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ contributors:
## 2024-09-24

- Adds a new [`addAnimatedImage()`](./addonsdk/app-document.md#addanimatedimage) method which can be used to add **animated GIF** images to the document (as long as they fit within certain [technical constraints](./addonsdk/app-document.md#image-requirements)).
- Adds a new [`importPdf()`](./addonsdk/app-document.md#importpdf) method which can be used to add a PDF to the document.
- Adds a new [`importPresentation()`](./addonsdk/app-document.md#importpresentation) method which can be used to add a PowerPoint presentation to the document.
- Adds a new [`importPdf()`](./addonsdk/app-document.md#importpdf) method which can be used to import a PDF as a new Adobe Express document.
- Adds a new [`importPresentation()`](./addonsdk/app-document.md#importpresentation) method which can be used to import a Powerpoint as a new Adobe Express document.
- Adds notes about specific support and handling for animated GIF images when [importing](./addonsdk/app-document.md#addimage) and [dragging content](./addonsdk/addonsdk-app.md#enabledragtodocument). This includes a [new FAQ item](../guides/faq.md#are-animated-gifs-supported-when-importing-or-dragging-content-to-the-document) summarizing the associated use cases.
- Adds all of the new methods mentioned above to the [content management](../guides/develop/use_cases/content_management.md) use case page with example code snippets for each.

Expand Down

0 comments on commit 6252141

Please sign in to comment.