diff --git a/Active View Port Rendering/.editorconfig b/Active View Port Rendering/.editorconfig new file mode 100644 index 0000000..f166060 --- /dev/null +++ b/Active View Port Rendering/.editorconfig @@ -0,0 +1,17 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single +ij_typescript_use_double_quotes = false + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/Active View Port Rendering/.gitignore b/Active View Port Rendering/.gitignore new file mode 100644 index 0000000..854acd5 --- /dev/null +++ b/Active View Port Rendering/.gitignore @@ -0,0 +1,44 @@ +# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/mcp.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings +__screenshots__/ + +# System files +.DS_Store +Thumbs.db diff --git a/Active View Port Rendering/.prettierrc b/Active View Port Rendering/.prettierrc new file mode 100644 index 0000000..d6c16d7 --- /dev/null +++ b/Active View Port Rendering/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 100, + "singleQuote": true, + "overrides": [ + { + "files": "*.html", + "options": { + "parser": "angular" + } + } + ] +} diff --git a/Active View Port Rendering/README.md b/Active View Port Rendering/README.md new file mode 100644 index 0000000..89161b3 --- /dev/null +++ b/Active View Port Rendering/README.md @@ -0,0 +1,59 @@ +# PdfviewerApp + +This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 22.1.3. + +## Development server + +To start a local development server, run: + +```bash +ng serve +``` + +Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. + +## Code scaffolding + +Angular CLI includes powerful code scaffolding tools. To generate a new component, run: + +```bash +ng generate component component-name +``` + +For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: + +```bash +ng generate --help +``` + +## Building + +To build the project run: + +```bash +ng build +``` + +This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. + +## Running unit tests + +To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command: + +```bash +ng test +``` + +## Running end-to-end tests + +For end-to-end (e2e) testing, run: + +```bash +ng e2e +``` + +Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. + +## Additional Resources + +For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/Active View Port Rendering/angular.json b/Active View Port Rendering/angular.json new file mode 100644 index 0000000..edf9a4f --- /dev/null +++ b/Active View Port Rendering/angular.json @@ -0,0 +1,74 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "cli": { + "packageManager": "npm", + "analytics": "c48a8fbc-c934-42e0-a6b7-aa4f6d242293" + }, + "newProjectRoot": "projects", + "projects": { + "pdfviewer-app": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular/build:application", + "options": { + "browser": "src/main.ts", + "tsConfig": "tsconfig.app.json", + "assets": [ + { + "glob": "**/*", + "input": "public" + } + ], + "styles": [ + "src/styles.css" + ] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kB", + "maximumError": "1MB" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "4kB", + "maximumError": "8kB" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular/build:dev-server", + "configurations": { + "production": { + "buildTarget": "pdfviewer-app:build:production" + }, + "development": { + "buildTarget": "pdfviewer-app:build:development" + } + }, + "defaultConfiguration": "development" + }, + "test": { + "builder": "@angular/build:unit-test" + } + } + } + } +} diff --git a/Active View Port Rendering/package.json b/Active View Port Rendering/package.json new file mode 100644 index 0000000..7f516aa --- /dev/null +++ b/Active View Port Rendering/package.json @@ -0,0 +1,34 @@ +{ + "name": "pdfviewer-app", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "packageManager": "npm@11.19.1", + "dependencies": { + "@angular/common": "^22.1.0", + "@angular/compiler": "^22.1.0", + "@angular/core": "^22.1.0", + "@angular/forms": "^22.1.0", + "@angular/platform-browser": "^22.1.0", + "@angular/router": "^22.1.0", + "@syncfusion/ej2-angular-pdfviewer": "^34.2.8", + "@syncfusion/ej2-tailwind3-theme": "^34.2.8", + "rxjs": "~7.8.0", + "tslib": "^2.3.0" + }, + "devDependencies": { + "@angular/build": "^22.1.3", + "@angular/cli": "^22.1.3", + "@angular/compiler-cli": "^22.1.0", + "jsdom": "^28.0.0", + "prettier": "^3.8.1", + "typescript": "~6.0.2", + "vitest": "^4.0.8" + } +} diff --git a/Active View Port Rendering/public/favicon.ico b/Active View Port Rendering/public/favicon.ico new file mode 100644 index 0000000..57614f9 Binary files /dev/null and b/Active View Port Rendering/public/favicon.ico differ diff --git a/Active View Port Rendering/src/app/app.config.ts b/Active View Port Rendering/src/app/app.config.ts new file mode 100644 index 0000000..cb1270e --- /dev/null +++ b/Active View Port Rendering/src/app/app.config.ts @@ -0,0 +1,11 @@ +import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core'; +import { provideRouter } from '@angular/router'; + +import { routes } from './app.routes'; + +export const appConfig: ApplicationConfig = { + providers: [ + provideBrowserGlobalErrorListeners(), + provideRouter(routes) + ] +}; diff --git a/Active View Port Rendering/src/app/app.css b/Active View Port Rendering/src/app/app.css new file mode 100644 index 0000000..e69de29 diff --git a/Active View Port Rendering/src/app/app.html b/Active View Port Rendering/src/app/app.html new file mode 100644 index 0000000..a1c4296 --- /dev/null +++ b/Active View Port Rendering/src/app/app.html @@ -0,0 +1,344 @@ + + + + + + + + + + + +
+
+
+ +

Hello, {{ title() }}

+

Congratulations! Your app is running. 🎉

+
+ +
+
+ @for (item of [ + { title: 'Explore the Docs', link: 'https://angular.dev' }, + { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, + { title: 'Prompt and best practices for AI', link: 'https://angular.dev/ai/develop-with-ai'}, + { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, + { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, + { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, + ]; track item.title) { + + {{ item.title }} + + + + + } +
+ +
+
+
+ + + + + + + + + + + diff --git a/Active View Port Rendering/src/app/app.routes.ts b/Active View Port Rendering/src/app/app.routes.ts new file mode 100644 index 0000000..dc39edb --- /dev/null +++ b/Active View Port Rendering/src/app/app.routes.ts @@ -0,0 +1,3 @@ +import { Routes } from '@angular/router'; + +export const routes: Routes = []; diff --git a/Active View Port Rendering/src/app/app.spec.ts b/Active View Port Rendering/src/app/app.spec.ts new file mode 100644 index 0000000..5a8f900 --- /dev/null +++ b/Active View Port Rendering/src/app/app.spec.ts @@ -0,0 +1,23 @@ +import { TestBed } from '@angular/core/testing'; +import { App } from './app'; + +describe('App', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [App], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(App); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it('should render title', async () => { + const fixture = TestBed.createComponent(App); + await fixture.whenStable(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('h1')?.textContent).toContain('Hello, pdfviewer-app'); + }); +}); diff --git a/Active View Port Rendering/src/app/app.ts b/Active View Port Rendering/src/app/app.ts new file mode 100644 index 0000000..8cee1d2 --- /dev/null +++ b/Active View Port Rendering/src/app/app.ts @@ -0,0 +1,32 @@ +import { Component } from '@angular/core'; +import { PdfViewerModule, LinkAnnotationService, BookmarkViewService, + MagnificationService, ThumbnailViewService, ToolbarService, + NavigationService, TextSearchService, TextSelectionService, + PrintService, FormDesignerService, FormFieldsService, + AnnotationService, PageOrganizerService } from '@syncfusion/ej2-angular-pdfviewer'; + +@Component({ + selector: 'app-root', + standalone: true, + imports: [PdfViewerModule], + providers: [ LinkAnnotationService, BookmarkViewService, MagnificationService, + ThumbnailViewService, ToolbarService, NavigationService, + TextSearchService, TextSelectionService, PrintService, + FormDesignerService, FormFieldsService, AnnotationService, PageOrganizerService], + template: ` + + + ` +}) +export class App { + public documentPath: string = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + public resourcesUrl: string = 'https://cdn.syncfusion.com/ej2/34.2.8/dist/ej2-pdfviewer-lib'; + public tileRendering = { + enableTileRendering: false, + }; +} \ No newline at end of file diff --git a/Active View Port Rendering/src/index.html b/Active View Port Rendering/src/index.html new file mode 100644 index 0000000..6399e94 --- /dev/null +++ b/Active View Port Rendering/src/index.html @@ -0,0 +1,13 @@ + + + + + PdfviewerApp + + + + + + + + diff --git a/Active View Port Rendering/src/main.ts b/Active View Port Rendering/src/main.ts new file mode 100644 index 0000000..5df75f9 --- /dev/null +++ b/Active View Port Rendering/src/main.ts @@ -0,0 +1,6 @@ +import { bootstrapApplication } from '@angular/platform-browser'; +import { appConfig } from './app/app.config'; +import { App } from './app/app'; + +bootstrapApplication(App, appConfig) + .catch((err) => console.error(err)); diff --git a/Active View Port Rendering/src/styles.css b/Active View Port Rendering/src/styles.css new file mode 100644 index 0000000..88415b1 --- /dev/null +++ b/Active View Port Rendering/src/styles.css @@ -0,0 +1,2 @@ +/* You can add global styles to this file, and also import other style files */ +@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/pdfviewer/index.css'; \ No newline at end of file diff --git a/Active View Port Rendering/tsconfig.app.json b/Active View Port Rendering/tsconfig.app.json new file mode 100644 index 0000000..cb151e1 --- /dev/null +++ b/Active View Port Rendering/tsconfig.app.json @@ -0,0 +1,14 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": [] + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "src/**/*.spec.ts" + ] +} diff --git a/Active View Port Rendering/tsconfig.json b/Active View Port Rendering/tsconfig.json new file mode 100644 index 0000000..d2fbb9c --- /dev/null +++ b/Active View Port Rendering/tsconfig.json @@ -0,0 +1,31 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "compileOnSave": false, + "compilerOptions": { + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "isolatedModules": true, + "experimentalDecorators": true, + "importHelpers": true, + "target": "ES2022", + "module": "preserve" + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true + }, + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/Active View Port Rendering/tsconfig.spec.json b/Active View Port Rendering/tsconfig.spec.json new file mode 100644 index 0000000..9c8efb9 --- /dev/null +++ b/Active View Port Rendering/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": [ + "vitest/globals" + ] + }, + "include": [ + "src/**/*.d.ts", + "src/**/*.spec.ts" + ] +}