• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to convert image to binary file/stream in adobe acrobat pro?

Community Beginner ,
Jul 17, 2017 Jul 17, 2017

Copy link to clipboard

Copied

I want to convert image to binary file/stream in adobe acrobat pro using Adobe Javacipt.  I need to embed the  uploaded image path as a binary file/stream and then add to 2D Bar code and fetch the image while reading from the bar code.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 17, 2017 Jul 17, 2017

Copy link to clipboard

Copied

Tried to convert the uploaded image to binary stream under button click so as to embed to bar code and to fetch the image while reading.But the stream data is coming as alert.

// JScript source code

var pathFile = "E:/Adobe/PDF/Images/home.jpg";

app.alert(pathFile);

this.importIcon("myIcon", pathFile, 0);

var oIcon = util.iconStreamFromIcon(this.getIcon("myIcon"));

app.addToolButton({

    cName: "btnTest",

    oIcon: oIcon,

    cExec: "console.println('My Button!');",

    cTooltext: "Test!",

    nPos: 0

});

app.alert("b");

app.alert(oIcon);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 17, 2017 Jul 17, 2017

Copy link to clipboard

Copied

var pathFile = "E:/Adobe/Alex/Smart PDF latest/Images/home.jpg";

var inputStream = event.target.getDataObjectContents(pathFile);

app.alert(inputStream);

var k = util.stringFromStream(inputStream);

app.alert(k);

Not working in above method too

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

This is not possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

Any solution to do the same. I tried various ways to covert the Image Field to base64 string in barcode so as to fetch the image from the barcode while reading the data from it. I am using Adobe Acrobat Pro.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

Can you explain what you want?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

I am uploading a Customer Image on clicking browse button which works via adobe acrobat pro. Afterwards I want to save the Image file to base 64 format and add it to a bar code. From the bar code I would extract the binary data in base 64 and fetch the image from another sector via c# code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

May be someone else understand this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

In short, needs to convert the image to binary file (base 64 string ) and via c# code I would convert this base 64 string to image file. Need is to convert an image file to base 64 in adobe acrobat.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

Trying to clarify... you want to import an image, convert it to a base64 string and then set the value of a barcode field so that when the barcode is later scanned, you can interpret the barcode data as an image.

Did I get that right?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

Yes this is exactly what I want. i am using Adobe Acrobat pro. I can browse the image and upload the same fine. But unable to convert the image field to base 64 string.

Tried few  solutions but none has  worked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

LATEST

Did you resolve this issue ? I'm doing same thing Could you please help me

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines