cannot read property of ‘getViewManagerConfig’ of null

enter image description here
data is an array of URLs and maxResults is just an integer:

function VideoScreenWrapper({data, maxResults}){
  const videoRef = useRef([]);
  const onError = (error) => {
    console.log("Error: ", error);
  }
  console.log("Data in VideoScreenWrapper: ", data);
  if (data && data.length>0){
      return(
        <View>
          {data.slice(0, maxResults).map((item, index) => (
            
            <Video 
              key={index}  
              source={{ uri: item }}
              ref={el => videoRef.current[index] = el}
              onError={onError}
              //style={styles.backgroundVideo}
              resizeMode='cover'
              controls
            />
          ))}
        </View>
      );
    }else {
      return(
        <View>
          <Text> No data </Text>
        </View>
      );
  }
}

I tried changing useRef, logging the errors, using different libraries for videos but still getting the same error

Google Chrome Version 133.0.6943.99 not support angular ngx-dropzone file drop

<div class="custom-dropzone overflow-unset custom-drop"
     ngx-dropzone
     [accept]="'application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
     [multiple]="false"
     (change)="onFileDropped($event)"
     style="overflow: unset;">

  <ngx-dropzone-label>
    <p>Drag & drop your Excel file here or click to browse</p>
  </ngx-dropzone-label>
</div>

this is my html

   onFileDropped(event:any) {

    if (event.rejectedFiles.length > 0) {
      this.spinner.hide();
      this.globalService.showError('Invalid File Format. Supported file formats are xls,xlsx');
    } else {

      const acceptedFormats = [
        'application/vnd.ms-excel', // .xls
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' // .xlsx
      ];

      const isValid = event.addedFiles.every((file: File) => acceptedFormats.includes(file.type));

      if (!isValid) {
        this.globalService.showError('Invalid File Format. Supported file formats are xls, xlsx');
        return;
      }

      console.log(event.addedFiles)
      this.headerFiles = [];
      this.headerImageSrc = [];
      this.headerFiles.push(...event.addedFiles);
    }
  }

this is my component ts
problem is when i excute code on chrome file drag& drop not working but click on dropzone and it open file explore
but other browsers i tested firefox,edge are working fine with file drag & drop using same code block

Static route with form

I am using form in page

import WRAction from "@r/src/components/we-request/WRAction";
import WRFields from "@r/src/components/we-request/WRFields";
import {weRequestFromAction} from "@ut/weRequestFromAction";
import React from "react";

const page = () => {
  return (
    <div>
      <form action={weRequestFromAction}>
        <WRFields />
        <WRAction />
      </form>
    </div>
  );
};

export default page;

weRequestFromAction function is just empty function

export async function weRequestFromAction(formData: FormData) {
  "use server";
}

where WRFields it is just a component with two required field and bunch of useless UI

import Field from "@r/src/ui/field/Field";
import React from "react";

const WRFields = () => {
  return (
    <div>
      <Field
        isPass={false}
        placeholder="YOUR NAME"
        required
        name="login"
        id="login"
      />
      <Field
        isPass={false}
        placeholder="YOUR CONTACTS"
        required
        name="contacts"
        id="contacts"
      />
    </div>
  );
};

export default WRFields;

and WRAction just component with custom but regular html button with type="submit"

import RoundedButton from "@r/src/ui/buttons/RoundedButton";
import React from "react";

const WRAction = () => {
  return (
    <div>
      <RoundedButton
        isDisabled={false}
        type="submit"
      />
    </div>
  );
};

export default WRAction;

Question: Why when I load a page in the bottom left corner in Nextjs >15, I usually have a “static route” icon, but on first load it doesn’t. But when I submit the form or click the button, this icon appears. Why so? Does this mean the page doesn’t display static(aka user render as i understand) unless I click the button and submit the form?

First load:
First load

Button click and submit form:
Button click

Quilljs textFromat api doesn’t preserve previous font format

I use this code to set a font to the text via quilljs api:

const setFont = (font) => {
  const lastRange = quill.getSelection();
  quill.formatText(lastRange.index, lastRange.length, {font: font})
}

and this one to set text bold:

const setFormat = () => {
  const lastRange = quill.getSelection();
  if (!lastRange) return;

  const currentFormats = quill.getFormat(lastRange.index, lastRange.length);
  // Preserve existing font while setting bold
  quill.formatText(lastRange.index, lastRange.length, {
    ...currentFormats,  // Spread existing formats
    bold: true,         // Apply bold
  });
};

when I bold part of the text, the previous font is gone from the start selected position to the end of the text.

before set bold

after set bold

Hiding the input (submit) if there is an email in the database [closed]

I wrote a JS code that handles the loss of focus and passes the command to PHP. If there is mail in the database, it hides the button, but hiding occurs via display, is there any way to do it more reliably?

I tried using the input type, but the button does not return.

PHP:

if(isset($_POST['email']) && is_string($_POST['email'])) {
    include('config.php');
    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $message = $_POST['message'];
    $headers = "From: $emailrnReply-to: $emailrnContent-type:text/plain; charset=utf-   8rn";
    $query = $connection->prepare("SELECT * FROM all_feedbacks WHERE email=:email");
    $query->bindParam(":email", $email, PDO::PARAM_STR);
    $query->execute();
    $result = $query->fetch(PDO::FETCH_ASSOC);
    if ($query->rowCount() > 0) {
        echo 'none';
    }
    if ($query->rowCount() == 0 && isset($_POST['formSubmit'])){
        $error_form = BackEndValidationFeedbackForm($name, $email, $phone, $message);
        if(!empty($error_form)){ 
            echo $error_form;
        }
    }
}

JS:

var request = new XMLHttpRequest();

function liveEmailCheckInit() {
var emailInput = document.getElementById("emailInput");
request.onreadystatechange = function() {
   if (this.readyState == 4 && this.status == 200) {
    document.getElementById("emailCheckResult").style.display = this.responseText 
   }
}
emailInput.addEventListener( "blur", function() { 
   request.open("POST", "/formMailCompleted.php", true);
   request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
   request.send("email=" + this.value);  
}, false)
}
window.addEventListener( "load", liveEmailCheckInit, false );

React Router v6 to v7 breaking styles

I followed the react router upgrade guide from v6 to v7, but while doing this I broke the CSS. Tabs type is Link[].

My problem is, when I open dashboard it starts, with Stammdaten its okay. But when I click Fotos, URL is changing but class which is aria-selected=”false” still stays false for Fotos tab.

If I delete extra relative segments (..), tabs goes infinite loop, but if I change it manually it renders the page and also the line under the Fotos tab. It should show like the 2nd screenshot. I don’t understand why that is.

            <Page
              title="Unterkunft"
              tabs={[
                { to: "../profile", text: "Stammdaten" },
                { to: "../photos", text: "Fotos" },
                { to: "../address", text: "Adresse" },
                { to: "../amenities", text: "Ausstattung" },
                { to: "../topics", text: "Themen" },
                { to: "../payout-profiles", text: "Zahlungsprofile" },
                { to: "../languages", text: "Sprachen" },
              ]}
            >
interface PageTabsProps {
  tabs: Link[];
  onChange: (index: number) => void;
}

const PageTabs = ({ tabs, onChange }: PageTabsProps) => {
  const location = useLocation();

  const selectedIndex = useMemo(
    () =>
      tabs.findIndex((t) => location.pathname.includes(`/${toToString(t.to)}`)),
    [location.pathname],
  );

  return (
    <Tab.Group selectedIndex={selectedIndex} onChange={onChange}>
      <Tab.List className={styles.tabs}>
        {tabs.map((link) => (
          <Tab
            key={toToString(link.to)}
            className={styles.tab}
            disabled={link.disabled}
          >
            {link.showWarning && (
              <Icon glyph={SvgWarning} className={styles.warningIcon} />
            )}
            {link.text}
          </Tab>
        ))}
      </Tab.List>
    </Tab.Group>
  );
};

enter image description here

enter image description here

enter image description here

Having trouble displaying updated profile and work activity in HTML/JavaScript

I’m creating an app in which a user logs in and can update their profile and work activity for church volunteering/donations. I have to it where I have all the buttons going to the correct pages, but after submitting the form with information for both, it is supposed to display the information on the activity log page. As of right now, it does not do that. Could I get some help with this?

userinfo.html

<!DOCTYPE html>
<html>
<head>
    <title>User Information</title>
    <link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
</head>
<body>
    <header>
        <h1>User Information</h1>
        <a href="file:about.html">About</a>
        <a href="file:menu.html">Menu</a>
    </header>

    <main>
        <form id="userForm">
            <label for="firstName">First Name:</label>
            <input type="text" id="firstName" required><br><br>

            <label for="lastName">Last Name:</label>
            <input type="text" id="lastName" required><br><br>

            <label for="birthdate">Birthdate:</label>
            <input type="date" id="birthdate" required><br><br>

            <label for="password">Password:</label>
            <input type="password" id="password" required><br><br>

            <label for="phone">Phone Number:</label>
            <input type="tel" id="phone" required><br><br>

            <label for="gender">Gender:</label>
            <select id="gender">
                <option value="male">Male</option>
                <option value="female">Female</option>
            </select><br><br>

            <button type="button" onclick="updateInfo()">Update</button>
        </form>

        <p id="message"></p>
    </main>

    <script src="scripts/jquery-1.8.3.min.js"></script>
    <script src="scripts/jquery.mobile-1.3.1.min.js"></script>
    <script src="scripts/userinfo.js"></script>
</body>
</html>

userinfo.js

function updateInfo() {
    const firstName = document.getElementById('firstName').value;
    const lastName = document.getElementById('lastName').value;
    const birthdate = document.getElementById('birthdate').value;
    const password = document.getElementById('password').value;
    const phone = document.getElementById('phone').value;
    const gender = document.getElementById('gender').value;

    if (!firstName || !lastName || !birthdate || !password || !phone) {
        document.getElementById('message').textContent = "Please fill in all required fields.";
        return;
    }

    localStorage.setItem('firstName', firstName);
    localStorage.setItem('lastName', lastName);
    localStorage.setItem('birthdate', birthdate);
    localStorage.setItem('password', password); //Note: Storing passwords like this is insecure.
    localStorage.setItem('phone', phone);
    localStorage.setItem('gender', gender);

    document.getElementById('message').textContent = "User information updated successfully!";
}

//Load existing data, if any, on page load
window.onload = function() {
    document.getElementById('firstName').value = localStorage.getItem('firstName') || '';
    document.getElementById('lastName').value = localStorage.getItem('lastName') || '';
    document.getElementById('birthdate').value = localStorage.getItem('birthdate') || '';
    document.getElementById('password').value = localStorage.getItem('password') || '';
    document.getElementById('phone').value = localStorage.getItem('phone') || '';
    document.getElementById('gender').value = localStorage.getItem('gender') || 'male';
};

activitylog.html

<!DOCTYPE html>
<html>
<head>
    <title>Work Activity Log</title>
    <link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
</head>
<body>
    <header>
        <h1>Work Activity Log</h1>
        <a href="file:about.html">About</a>
        <a href="file:menu.html">Menu</a>
    </header>

    <main>
        <h2>User Information</h2>
        <div id="userInfoDisplay">
            <!-- User info will be displayed here -->
             <p><strong>First Name:</strong> <span id="displayFirstName">N/A</span></p>
             <p><strong>Last Name:</strong> <span id="displayLastName">N/A</span></p>
             <p><strong>Birthdate:</strong> <span id="displayBirthdate">N/A</span></p>
             <p><strong>Phone:</strong> <span id="displayPhone">N/A</span></p>
             <p><strong>Gender:</strong> <span id="displayGender">N/A</span></p>
            <button onclick="editProfile()">Edit Profile</button>
        </div>

        <h2>Work Activity History</h2>
        <ul id="activityList">
            <!-- Activity logs will be displayed here -->
        </ul>

        <button onclick="newEntry()">New Entry</button>
        <button onclick="clearHistory()">Clear History</button>
    </main>

    <script src="scripts/jquery-1.8.3.min.js"></script>
    <script src="scripts/jquery.mobile-1.3.1.min.js"></script>
    <script src="scripts/activitylog.js"></script>
</body>
</html>

activitylog.js

function editProfile() {
    window.location.href = "userinfo.html";
}

function newEntry() {
    window.location.href = "newentry.html";
}

function clearHistory() {
    if (confirm("Are you sure you want to clear the activity history?")) {
        localStorage.removeItem('activityLogs');
        displayActivityLogs(); // Refresh the display
    }
}

function displayActivityLogs() {
    const activityList = document.getElementById('activityList');
    activityList.innerHTML = ""; // Clear existing list items

    let logs = JSON.parse(localStorage.getItem('activityLogs')) || [];

    logs.forEach((log, index) => {
        const listItem = document.createElement('li');
        listItem.textContent = `Date: ${log.date}, Ministered To: ${log.ministeredTo}, Items: ${log.itemsDonated || 'None'}, Hours: ${log.hours}`;
        activityList.appendChild(listItem);
    });
}

//Display User Information
function displayUserInfo() {
    document.getElementById('displayFirstName').textContent = localStorage.getItem('firstName') || 'N/A';
    document.getElementById('displayLastName').textContent = localStorage.getItem('lastName') || 'N/A';
    document.getElementById('displayBirthdate').textContent = localStorage.getItem('birthdate') || 'N/A';
    document.getElementById('displayPhone').textContent = localStorage.getItem('phone') || 'N/A';
    document.getElementById('displayGender').textContent = localStorage.getItem('gender') || 'N/A';
}


window.onload = function() {
    displayUserInfo();
    displayActivityLogs();
};

// Add event listener to update user info when the page is shown
document.addEventListener("pageshow", function(event) {
    displayUserInfo(); // Refresh the user info whenever the page is shown
});

newentry.html

<!DOCTYPE html>
<html>
<head>
    <title>New Work Activity Entry</title>
    <link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
</head>
<body>
    <header>
        <h1>New Work Activity Entry</h1>
        <a href="file:about.html">About</a>
        <a href="file:menu.html">Menu</a>
    </header>

    <main>
        <form id="newEntryForm">
            <label for="date">Date:</label>
            <input type="date" id="date" required><br><br>

            <label for="ministeredTo">Who ministered to:</label>
            <input type="text" id="ministeredTo" required><br><br>

            <label for="itemsDonated">Items donated (optional):</label>
            <input type="text" id="itemsDonated"><br><br>

            <label for="hours">Number of hours:</label>
            <input type="number" id="hours" required><br><br>

            <button type="button" onclick="saveEntry()">Save</button>
        </form>

        <p id="message"></p>
    </main>

    <script src="scripts/jquery-1.8.3.min.js"></script>
    <script src="scripts/jquery.mobile-1.3.1.min.js"></script>
    <script src="scripts/newentry.js"></script>
</body>
</html>

newentry.js

function saveEntry() {
    const date = document.getElementById('date').value;
    const ministeredTo = document.getElementById('ministeredTo').value;
    const itemsDonated = document.getElementById('itemsDonated').value;
    const hours = document.getElementById('hours').value;

    if (!date || !ministeredTo || !hours) {
        document.getElementById('message').textContent = "Please fill in all required fields.";
        return;
    }

    const newEntry = {
        date: date,
        ministeredTo: ministeredTo,
        itemsDonated: itemsDonated,
        hours: hours
    };

    //Get Existing logs
    let logs = JSON.parse(localStorage.getItem('activityLogs')) || [];

    //Add the new entry
    logs.push(newEntry);

    //Save back to local Storage
    localStorage.setItem('activityLogs', JSON.stringify(logs));

    document.getElementById('message').textContent = "Work activity entry saved successfully!";

    //Clear the form
    document.getElementById('newEntryForm').reset();
}

Naming the useEffect function increases debugging in stack trace, code readability, only one effect for one purpose? [closed]

Facing a named function exception while using named useEffect function.

I was looking for using the useEffect function that produces an easier way of identifying the bug while developing.

The reasons i have investigated is as follows:

  1. Improves debugging by showing the named function in the stack trace when an useEffect function throws an error.
  2. Helps other programmers showing the purpose of the useEffect function.
  3. One useEffect is for only one purpose.

Reference: View stackBlitz implementation

Below showing an example of making an api using Named useEffect function.

useEffect(
  function makeApiCallAfterMount() {
      async function fetchData() {
         const res = await fetch('https://jsonplaceholder.typicode.com/todos/');
         const data = await res.json();
         setData(data);
        }
        x = data; /* code for showing Reference Error in stack trace */
        fetchData();
       },
      []
   );

Stack Trace Image for Named useEffect Function:

Named-useEffect-Function

The useEffect function with arrow function syntax:

 useEffect(() => {
    const fetchData = async () => {
      const res = await fetch('https://jsonplaceholder.typicode.com/todos/');
      const data = await res.json();
      setData(data);
    };
    x = data; /* code for showing Reference Error in stack trace */
    fetchData();
  }, []);

Stack Trace Image for Arrow Syntax useEffect Function:

Arrow-Ayntax-useEffect-Function

Do you have any other suggestions of using useEffect ?

Showing error invalid url in terminal while connecting database through appwrite

Error TypeError: Invalid URL
at new URL (node:internal/url:796:36)
at Account.create (webpack-internal:///(action-browser)/./node_modules/node-appwrite/dist/services/account.mjs:71:17)
at $$ACTION_1 (webpack-internal:///(action-browser)/./lib/actions/user.actions.ts:36:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: ‘ERR_INVALID_URL’,
input: ‘undefined/account’
}
This error is showing in my terminal and I am unable to fix it

I am try to connect database using appwrite on my next.js application

How to Deep Clone an Object in JavaScript? [duplicate]

I’m trying to create a deep copy of an object in JavaScript. I initially used Object.assign(), but I realized it only creates a shallow copy.

const obj = { 
  a: 1, 
  b: { c: 2 } 
};

const copy = Object.assign({}, obj);
copy.b.c = 42;

console.log(obj.b.c); // 42 (unexpected)

The nested object reference is still shared, meaning changes to copy.b.c also modify obj.b.c.

What is the best way to deep clone an object in JavaScript?

how to regroup some datas under the same label with supabase?

So, I have this table with some datas (in supabase):

data1 data2 data3 data4
1 2 3 4

and what I want is that my supabase.from('table').select('data1,data2,data3,data4') return datas like that:

{
    data1:1,
    groupData:{
        data2:2,
        data3:3
    },
    data4:4
}

is it possible to do that with SupabaseJS, or do I need to handle it by myself ?

AWS S3 Metadata Not Retrievable After Upload Using @aws-sdk/client-s3

I’m encountering an issue where custom metadata set during file upload to AWS S3 using @aws-sdk/client-s3 is not being retrieved when fetching the object’s metadata later.

Problem Description:
I’m uploading media files (images, videos) to an S3 bucket along with custom metadata (title and description) using the PutObjectCommand. The upload appears to be successful, and I can see the files in my bucket. However, when I attempt to retrieve the metadata using HeadObjectCommand, the Metadata property of the response is consistently empty.

import { S3Client, PutObjectCommand, GetObjectCommand, HeadObjectCommand, ListObjectsV2Command } from '@aws-sdk/client-s3';

const s3Client = new S3Client({
  region: 'MyRegion',
  credentials: {
    accessKeyId: 'MyAccessKey',
    secretAccessKey: 'MySecretAccessKey',
  },
});

export const BUCKET_BASE_URL = "MyBucketBaseURL";

export const getHrefAgainstKey = (key) => {
  return `${BUCKET_BASE_URL}${key}`;
};

const S3MediaUploader = () => {
  const [file, setFile] = useState(null);
  const [metadata, setMetadata] = useState({ title: '', description: '' });
  const [uploadedMedia, setUploadedMedia] = useState([]);
  const [loading, setLoading] = useState(false);
  const bucketName = 'MyBucketName';

  const handleFileChange = (e) => {
    setFile(e.target.files[0]);
  };

  const handleMetadataChange = (e) => {
    setMetadata({ ...metadata, [e.target.name]: e.target.value });
  };

  const handleUpload = async () => {
    if (!file) {
      alert('Please select a file.');
      return;
    }

    setLoading(true);

    const reader = new FileReader();

    reader.onload = async (event) => {
      const arrayBuffer = event.target.result;
      const uint8Array = new Uint8Array(arrayBuffer);

      const params = {
        Bucket: bucketName,
        Key: file.name,
        Body: uint8Array,
        Metadata: {
          title: metadata.title.toLowerCase(),
          description: metadata.description.toLowerCase(),
        },
        ACL: "public-read",
        ContentType: file.type,
      };

      try {
        const response = await s3Client.send(new PutObjectCommand(params));
        alert('File uploaded successfully!');
        setFile(null);
        setMetadata({ title: '', description: '' });
        fetchMedia();
      } catch (error) {
        console.error('Error uploading file:', error);
        alert('Error uploading file.');
      } finally {
        setLoading(false);
      }
    };

    reader.onerror = () => {
      console.error('Error reading file.');
      setLoading(false);
    };

    reader.readAsArrayBuffer(file);
  };

  const fetchMedia = async () => {
    setLoading(true);
    try {
      const response = await s3Client.send(new ListObjectsV2Command({ Bucket: bucketName }));
      if (response.Contents) {
        const media = await Promise.all(
          response.Contents.map(async (item) => {
            const getObjectParams = {
              Bucket: bucketName,
              Key: item.Key,
            };

            const //Empty Metadata = await s3Client.send(new HeadObjectCommand(getObjectParams));   **// Getting Empty Metadata.Metadata**
            return {
              key: item.Key,
              href: getHrefAgainstKey(item.Key),
              url: BUCKET_BASE_URL,
              metadata: {metadataResponse.Metadata},
            };
          })
        );
        setUploadedMedia(media);
      } else {
        setUploadedMedia([]);
      }
    } catch (error) {
      console.error('Error fetching media:', error);
    } finally {
      setLoading(false);
    }
  };

IAM User Policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:*",
        "s3tables:*",
        "iam:PassRole"
      ],
      "Resource": "*"
    }
  ]
}

Dependencies:

"dependencies": {
  "@aws-sdk/client-s3": "^3.749.0",
}

Troubleshooting Steps Taken:
Verified that the upload process completes without errors.
Confirmed that the files are present in the S3 bucket.
Tried using both HeadObjectCommand and GetObjectCommand to fetch metadata.
Checked IAM user permissions to ensure full S3 access.
Ensured that the metadata keys are lowercase (as per S3 requirements).

Expected Behavior:
I expect the Metadata property of the HeadObjectCommand or GetObjectCommand response to contain the title and description values set during upload.

Actual Behavior:
The Metadata property is consistently empty.

Catching Errors from WebAssembly in an Optimized Code

I think I need some human input here 🙂 I have a simple CPP code:

#include <stdexcept>

#include <emscripten/bind.h>

using namespace emscripten;

double add(double a, double b) 
{
    if(a>5)
        throw std::runtime_error("big a");
    return a+b;
}

EMSCRIPTEN_BINDINGS(my_module) {
    function("add", &add);
}

I compile this simple example with:

emcc -lembind -o quick_example.js quick_example.cpp -fexceptions -sDISABLE_EXCEPTION_CATCHING=0 -O2

When I catch the error in JavaScript, it prints out weird numbers instead of the error message. I can only see the error message when not using any level of optimization. What am I missing here.

Unable to make widget/field appearance showing in Acrobat(works with pdf-x change, foxit)

Appearances for signature are not showing properly in Adobe Acrobat.
The ‘thumbnail’ shows up on the thumbnail panel but its not showing on the actually PDF.

This pdf has a certification digital signature and revision one. The signature field appearance is set between the two digital signatures. If I click the ‘view signed version’, there is a report with an error 4000 about invalid appearance.

15 0 obj
<<
/Type /XObject
/Subtype /Image
/BitsPerComponent 8
/Width 125
/Height 132
/ColorSpace /DeviceRGB
/SMask 21 0 R
/Filter /FlateDecode
/Length 70
>>
stream
...
endobj
16 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /Courier
/Encoding /WinAnsiEncoding
>>
endobj
17 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 17
>>
stream
...
endstream
endobj
18 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/Im1 15 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 34
>>
stream
...
endstream
endobj
19 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/n0 17 0 R
/n2 18 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 42
>>
stream
...
endstream
endobj
20 0 obj
<<
/BBox [ 0 0 200 100 ]
/Resources <<
/XObject <<
/FRM 19 0 R
>>
>>
/Subtype /Form
/Type /XObject
/Filter /FlateDecode
/Length 22
>>
stream
...
endstream
endobj
21 0 obj
<<
/Type /XObject
/Subtype /Image
/Height 132
/Width 125
/BitsPerComponent 8
/ColorSpace /DeviceGray
/Decode [ 0 1 ]
/Filter /FlateDecode
/Length 1824
>>
stream
...
endstream
endobj

I’m using pdf-lib to manage every step of the workflow. Right now, I’m just trying to check other/similar post and test other ways to structure the pdf objects.

pdf and its signatures should be valid in any pdf reader.

result after certification, signature field filled, 2nd digital signature
result after certification, signature field filled, 2nd digital signature

signed version, click view report shows this
signed version

Add content above viewport and scroll up

Im trying to make an animation where I add content that is supposed to be located above the page. When the content is added it is supposed to expand the page upwards and then scroll to it. However when I add my content everything else is instead pushed down. Here is where I get stuck:

$(".contact").click(function(){

$( "#top" ).empty().prepend( "<div id = 'test'>Test</div>" );

});
#test{
    padding-bottom: 25%;
    position: relative;
    overflow: hidden;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<div id = "top"></div>

<h2>Greetings</h2>
<div class="container">
    <div class="contact">Press Here to scroll upwards</div>
</div>

I got the idea from a page called yearofmoo, a website that contains codingguides and videos. If you want to check it out the animation happens when you press contact in the menu. Have anyone acheived something simiular? I think I can manage the scroll myself, my question is how I can the content above the viewpoint.