From 6252141642ba2d20e5288e6a3cb029fb7b4ee95c Mon Sep 17 00:00:00 2001 From: Holly Schinsky Date: Thu, 31 Oct 2024 14:47:54 -0400 Subject: [PATCH] Updates desc for import PDF/PPT to creates new doc --- .../develop/use_cases/content_management.md | 12 ++++++------ src/pages/references/addonsdk/app-document.md | 16 ++++++++-------- src/pages/references/changelog.md | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/pages/guides/develop/use_cases/content_management.md b/src/pages/guides/develop/use_cases/content_management.md index c090d9304..0266b3d0e 100644 --- a/src/pages/guides/develop/use_cases/content_management.md +++ b/src/pages/guides/develop/use_cases/content_management.md @@ -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."); } } ``` @@ -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); @@ -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()); diff --git a/src/pages/references/addonsdk/app-document.md b/src/pages/references/addonsdk/app-document.md index 881814d55..b9ac9aa96 100644 --- a/src/pages/references/addonsdk/app-document.md +++ b/src/pages/references/addonsdk/app-document.md @@ -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."); } } ``` @@ -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."); } } ``` diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index bc082887b..c6c95da88 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -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.