WO2014023078A1 - 一种将gif图片转换到pdf文档后动态显示图片的方法 - Google Patents

一种将gif图片转换到pdf文档后动态显示图片的方法 Download PDF

Info

Publication number
WO2014023078A1
WO2014023078A1 PCT/CN2013/000594 CN2013000594W WO2014023078A1 WO 2014023078 A1 WO2014023078 A1 WO 2014023078A1 CN 2013000594 W CN2013000594 W CN 2013000594W WO 2014023078 A1 WO2014023078 A1 WO 2014023078A1
Authority
WO
WIPO (PCT)
Prior art keywords
gif
picture
pictures
pdf file
converting
Prior art date
Application number
PCT/CN2013/000594
Other languages
English (en)
French (fr)
Inventor
郭圣恩
Original Assignee
福州福昕软件开发有限公司北京分公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 福州福昕软件开发有限公司北京分公司 filed Critical 福州福昕软件开发有限公司北京分公司
Priority to US14/419,966 priority Critical patent/US20150221113A1/en
Publication of WO2014023078A1 publication Critical patent/WO2014023078A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites

Definitions

  • the present invention relates to a method for dynamically displaying a plurality of images, and more particularly to a method for dynamically displaying a plurality of images after converting a gif image to a pdf document. Background technique
  • One feature of the gif format is that it can store multiple color images in one gif file. If multiple image data stored in one file is read out and displayed on the screen, it can form the simplest animation. This is the dynamic gif picture. At present, after converting the dynamic gif image into a pdf format document, only one static image (generally the first frame) is left in the pdf file, the pictures of other frames are lost, and the original gif cannot be used. The picture is displayed dynamically.
  • the main object of the present invention is to provide a method for dynamically displaying a plurality of images after converting a gif image to a pdf document, which can dynamically display the gif image in a pdf file, and can display the entire gif image like an animation.
  • the present invention provides a method for dynamically displaying a picture after converting a gif picture to a pdf file, which includes the following steps:
  • Step S1 extract all the frames in the gif picture, and insert the extracted multiple pictures into the pdf file;
  • Step S2 Control the display of each frame picture by using JavaScript, and realize the function of displaying the gif picture animation.
  • step S1 a plurality of pictures are inserted into the same page of the pdf file, and the same position coordinates are set.
  • Step S2 includes the following substeps: Step S21: setting all the pictures to be hidden by the OC dictionary item of the picture object; Step S22: When the content of the page is to be rendered, modify the OC dictionary item of each picture by a JavaScript script to control whether the picture is displayed or hidden;
  • Step S23 Refresh the current page according to the refresh frequency of each frame of the gif picture.
  • step S1 a screen annotation is created in the pdf file, and each frame in the gif image is extracted and inserted into the same page of the pdf file as the content stream marked by the screen.
  • Step S2 includes the following substeps:
  • Step S21 when the content of the page is to be rendered, the JavaScript script is used to set the content of the marked AP dictionary item to be the picture stream to be displayed according to the refresh frequency of each frame of the gif picture;
  • Step S22 Refreshing the friendship screen annotation.
  • the method of the present invention enables the gif image to be dynamically displayed in the pdf file, and can display the entire content of the gif image like an animation, retaining the performance capability of the original gif image, and making the information transfer capability of the pdf file stronger.
  • FIG. 1 is a flow chart of a method for dynamically displaying a picture after converting a gif picture to a pdf file according to the present invention
  • FIG. 2 is a flow chart of a method for dynamically displaying a picture after converting a gif picture to a pdf file according to the present invention
  • FIG. 3 is a flow chart of another embodiment of a method for dynamically displaying a picture after converting a gif picture to a pdf file according to the present invention. detailed description
  • the method for dynamically displaying a picture after converting the gif picture to a pdf file according to the present invention includes the following steps: Step S1: extracting a gif picture All the frames in the frame are inserted into the pdf file; Step S2: Use JavaScript to control the display of each frame of the image to realize the function of displaying the gif image animation.
  • the method for dynamically displaying a picture after converting a gif picture into a pdf document has two embodiments, and the following is a detailed introduction to the ⁇ .
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • Participating in Figure 2 is a method for dynamically displaying a picture after converting a gif picture to a pdf file according to the present invention
  • Step S 1 1 extract and process each frame in the gif picture, then insert the pictures into the same page of the pdf file, and set the same position coordinates; after setting, the pictures will be displayed in the same place. At this point, a picture superimposed on these pictures is displayed, so it is necessary to control the display of each picture.
  • Step S21 setting all the pictures to be hidden by the OC dictionary item of the picture object;
  • Step S22 When the content is to be rendered, use a JavaScript script to "change the OC dictionary item of each picture to control whether to display or hide State
  • Step S23 Refresh the current page according to the refresh frequency of each frame of the gif picture.
  • the picture in the pdf file can display the content of each frame dynamically as the original gif picture.
  • Embodiment 2
  • FIG. 3 is a flowchart of an embodiment of the present invention for dynamically displaying a picture after converting a gif picture to a pdf file, which includes the following steps:
  • Step S ir Create a screen annotation in the pdf file, and add each frame in the gif image. Extracted to be inserted into the same page of the pdf file as the content stream marked by the screen;
  • Step S21 to render the content of the page, use a JavaScript script to set the content of the labeled AP dictionary item to be the image stream to be displayed according to the refresh rate of each frame of the gif image;
  • Step S22 Refresh the screen annotation.
  • the picture in the pdf file can display the content of each frame dynamically as the original gif picture.
  • Both of the above embodiments can realize the dynamic display of the picture after the gif picture is converted to the pdf file, which has the following common points and differences:
  • the extracted pictures are inserted into the same page of the pdf file as ordinary picture objects, and then the OC dictionary items are used to control whether to display or hide, and the page needs to be refreshed at a certain frequency.
  • the extracted picture is stored as a labeled content stream in a pdf file. By modifying the labeled AP dictionary item to control which picture to display, the content displayed by the label needs to be refreshed at a certain frequency.
  • the method of the present invention enables the gif image to be dynamically displayed in the pdf file, and can display the entire content of the gif image like an animation, retaining the performance capability of the original gif image, and making the information transfer capability of the pdf file stronger.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明公开一种将gif图片转换到pdf文档后动态显示图片的方法,其包括如下步骤:步骤S1:提取gif图片中的所有帧,将提取的多个图片插入到pdf文件中;步骤S2:利用JavaScript对每一帧图片的显示进行控制,实现gif图片动画显示的功能。通过上述的方法,能让gif图片在pdf文件中也进行动态的显示,可以像动画一样显示这个gif图片的全部内容,保留了原来gif图片的表现能力,使pdf文件的信息传递能力更强。

Description

一种将 gif图片转换到 Pdf文档后动态显示图片的方法 技术领域
本发明涉及一种动态显示多个图像的方法, 特别涉及一种将 gif图片转换到 pdf文档后动态显示多个图像的方法。 背景技术
gif格式的一个特点是可以在一个 gif 文件中存多幅彩色图像, 如果把存于 一个文件中的多幅图像数据逐幅读出并显示到屏幕上, 就可构成一种最简单的 动画, 这就是动态的 gif 图片。 目前将这中动态的 gif 图片转换为 pdf格式文档 后, 就只剩下一张静态的图片 (一般都是第一帧)在 pdf文件中, 丢失了其它帧 的图片, 并且也不能像原 gif图片那样动态显示了。
因此, 如何解决 gif图片转换到 pdf文件中后, 只能显示一个静态图片的问 题, 即为本领域技术人员的研究方向所在。 发明内容
本发明的主要目的是提供一种将 gif图片转换到 pdf文档后动态显示多个图 像的方法, 其可以让 gif图片在 pdf文件中也进行动态的显示, 可以像动画一样 显示这个 gif图片的全部内容
为了达到上述目的, 本发明提供一种将 gif图片转换到 pdf文档后动态显示 图片的方法, 其包括如下步骤:
步骤 S1 : 提取 gif图片中的所有帧, 将提取的多个图片插入到 pdf文件中; 步骤 S2: 利用 JavaScript对每一帧图片的显示进行控制, 实现 gif图片动画 显示的功能。
其中, 在步骤 S1 中, 是将多个图片插入到 pdf文件的同一页中, 并设置相 同的位置坐标。
其中, 步骤 S2包括如下子步骤: 步骤 S21 : 通过图片对象的 OC字典项设置所有的图片都是隐藏状态; 步骤 S22: 当该页内容要渲染时, 通过 JavaScript 脚本来修改每个图片的 OC字典项来控制是显示还是隐藏状态;
步骤 S23 : 按照 gif图片每帧的刷新频率来刷新当前页面。
其中, 在步骤 S 1 中, 在 pdf文件中创建一个 screen标注, 将 gif 图片中的 每一帧都提取出来插入到 pdf文件的同一页中, 作为该 screen标注的内容流。
其中, 步骤 S2包括如下子步骤:
步骤 S21, : 在要渲染该页内容时,按照 gif 图片每帧的刷新频率利用 JavaScript脚本来设置标注的 AP字典项的内容为要显示的图片流;
步骤 S22, : 刷新谊 screen标注。
与现有技术相比, 本发明的有益效杲在于:
本发明的方法能让 gif图片在 pdf文件中也进行动态的显示, 可以像动画一 样显示这个 gif 图片的全部内容, 保留了原来 gif 图片的表现能力, 使 pdf文件 的信息传递能力更强。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例 或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中 的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出 创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明将 gif图片转换到 pdf文档后动态显示图片的方法流程图; 图 2为本发明将 gif图片转换到 pdf文档后动态显示图片的方法一实施例流 程图;
图 3为本发明将 gif图片转换到 pdf文档后动态显示图片的方法另一实施例 流程图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有付出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
如图 1所示, 为本发明将 gif图片转换到 pdf文档后动态显示图片的方法流 程图, 本发明将 gif图片转换到 pdf文档后动态显示图片的方法包括如下步骤: 步骤 S1 : 提取 gif图片中的所有帧, 将提取的多个图片插入到 pdf文件中; 步骤 S2: 利用 JavaScript对每一帧图片的显示进行控制, 实现 gif图片动画 显示的功能。
本发明将 gif图片转换到 pdf文档后动态显示图片的方法具有两个实施例, 以下对 匕进亍详细介绍。
实施例一:
参与图 2, 为本发明一种将 gif 图片转换到 pdf文档后动态显示图片的方法
―实施例流程图, 其包括如下步骤:
步骤 S 1 1 : 将 gif 图片中的每一帧都提取处理, 然后将这些图片插入到 pdf 文件的同一页中, 并设置相同的位置坐标; 如此设置后, 会在同一个地方显示 出来这些图片, 此时显示出来的是这些图片叠加出来的一副图片, 因此还需要 对每一幅图片的显示进行控制。
步骤 S21 : 通过图片对象的 OC字典项设置所有的图片都是隐藏状态; 步骤 S22: 当该也内容要渲染时, 通过 JavaScript 脚本来^"改每个图片的 OC字典项来控制是显示还是隐藏状态;
步骤 S23 : 按照 gif图片每帧的刷新频率来刷新当前页面。
通过上述步骤的实施, 在 pdf文件中的图片与原来的 gif图片一样, 可以动 态地显示每一帧的内容。 实施例二:
参与图 3, 为本发明一种将 gif图片转换到 pdf文档后动态显示图片的方法 ―实施例流程图, 其包括如下步骤:
步骤 S i r: 在 pdf文件中创建一个 screen标注, 将 gif图片中的每一帧都提 取出来插入到 pdf文件的同一页中, 作为该 screen标注的内容流;
步骤 S21,: 要渲染该页内容时,按照 gif图片每帧的刷新频率利用 JavaScript 脚本来设置标注的 AP字典项的内容为要显示的图片流;
步骤 S22,: 刷新该 screen标注。
通过上述步骤的实施, 在 pdf文件中的图片与原来的 gif图片一样, 可以动 态地显示每一帧的内容。
上述两个实施例均可以实现 gif图片转换到 pdf文档后动态显示图片, 其具 有如下共同点及不同点:
共同点:都是提取 gif中的所有帧,并插入到 pdf文件中,然后利用 JavaScript 来控制每一帧图片的显示, 实现 gif图片动画显示的功能。
不同点: 实施例一是将所有提取出来的图片作为普通的图片对象插入到 pdf 文件的同一页中, 然后通过 OC字典项来控制显示还是隐藏, 需要以一定的频率 刷新页面。实施例二是将提取出来的图片作为一个标注的内容流存放在 pdf文件 中, 通过修改标注的 AP字典项来控制要显示哪一幅图片, 需要以一定的频率刷 新该标注显示的内容。
与现有技术相比, 本发明的有益效果在于:
本发明的方法能让 gif图片在 pdf文件中也进行动态的显示, 可以像动画一 样显示这个 gif 图片的全部内容, 保留了原来 gif 图片的表现能力, 使 pdf文件 的信息传递能力更强。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术人员应当理 解: 其依然可以对前述实施例所记载的技术方案进行修改, 或者对其中部分技术特 征进行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明实 施例技术方案的精神和范围。

Claims

权 利 要 求
1、 一种将 gif 图片转换到 pdf 文档后动态显示图片的方法, 其特征在于, 其包括如下步骤:
步骤 S 1 : 提取 gif图片中的所有帧, 将提取的多个图片插入到 pdf文件中; 步骤 S2: 利用 JavaScript对每一帧图片的显示进行控制, 实现 gif图片动画 显示的功能。
2、 根据权利要求 1 所述的一种将 gif 图片转换到 pdf文档后动态显示图片 的方法, 其特征在于, 在步骤 S 1 中, 是将多个图片插入到 pdf文件的同一页中, 并设置相同的位置坐标。
3、 根椐权利要求 2所述的一种将 gif 图片转换到 pdf文档后动态显示图片 的方法, 其特征在于, 步骤 S2包括如下子步骤:
步骤 S21 : 通过图片对象的 OC字典项设置所有的图片都是隐藏状态; 步骤 S22: 当该页内容要渲染时, 通过 JavaScript 脚本来修改每个图片的 OC字典项来控制是显示还是隐藏状态;
步骤 S23: 按照 gif图片每帧的刷新频率来刷新当前页面。
4、 根据权利要求 1 所述的一种将 gif 图片转换到 pdf文档后动态显示图片 的方法, 其特征在于, 在步骤 S 1 中, 在 pdf文件中创建一个 screen标注, 将 gif 图片中的每一帧都提取出来插入到 pdf 文件的同一页中, 作为该 screen标注的 内容流。
5、 根据权利要求 4所述的一种将 gif 图片转换到 pdf文档后动态显示图片 的方法, 其特征在于, 步骤 S2包括如下子步骤:
步骤 S21, : 在要渲染该页内容时,按照 gif 图片每帧的刷新频率利用 JavaScript脚本来设置标注的 AP字典项的内容为要显示的图片流;
步骤 S22, : 刷新该 screen标注。
PCT/CN2013/000594 2012-08-09 2013-05-21 一种将gif图片转换到pdf文档后动态显示图片的方法 WO2014023078A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/419,966 US20150221113A1 (en) 2012-08-09 2013-05-21 Method for dynamically displaying picture after converting gif picture to pdf file

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210283260.5 2012-08-09
CN201210283260.5A CN103578126A (zh) 2012-08-09 2012-08-09 一种将gif图片转换到pdf文档后动态显示图片的方法

Publications (1)

Publication Number Publication Date
WO2014023078A1 true WO2014023078A1 (zh) 2014-02-13

Family

ID=50049846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/000594 WO2014023078A1 (zh) 2012-08-09 2013-05-21 一种将gif图片转换到pdf文档后动态显示图片的方法

Country Status (3)

Country Link
US (1) US20150221113A1 (zh)
CN (1) CN103578126A (zh)
WO (1) WO2014023078A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991162B (zh) * 2017-03-22 2020-07-28 未来电视有限公司 一种网页上的节省网络资源的动画效果的实现方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006137713A1 (en) * 2005-06-24 2006-12-28 Nhn Corporation Method for inserting moving picture into 3-dimension screen and record medium for the same
US20070153004A1 (en) * 2005-12-30 2007-07-05 Hooked Wireless, Inc. Method and system for displaying animation with an embedded system graphics API
KR20080078751A (ko) * 2007-01-09 2008-08-28 김기한 Pdf 포맷 문서와 전자칠판을 이용한 동영상 컨텐츠 제작시스템
CN101751693A (zh) * 2010-01-26 2010-06-23 北京天石网通科技有限责任公司 一种3d互动用户手册制作方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7933956B2 (en) * 2006-01-24 2011-04-26 Simulat, Inc. System and method to create a collaborative web-based multimedia layered platform
CA2676676C (en) * 2007-02-09 2015-01-20 Novarra, Inc. Method and system for converting interactive animated information content for display on mobile devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006137713A1 (en) * 2005-06-24 2006-12-28 Nhn Corporation Method for inserting moving picture into 3-dimension screen and record medium for the same
US20070153004A1 (en) * 2005-12-30 2007-07-05 Hooked Wireless, Inc. Method and system for displaying animation with an embedded system graphics API
KR20080078751A (ko) * 2007-01-09 2008-08-28 김기한 Pdf 포맷 문서와 전자칠판을 이용한 동영상 컨텐츠 제작시스템
CN101751693A (zh) * 2010-01-26 2010-06-23 北京天石网通科技有限责任公司 一种3d互动用户手册制作方法

Also Published As

Publication number Publication date
US20150221113A1 (en) 2015-08-06
CN103578126A (zh) 2014-02-12

Similar Documents

Publication Publication Date Title
KR102210369B1 (ko) 멀티-스크린 애플리케이션들 위한 스크린캐스팅
US20130141471A1 (en) Obscuring graphical output on remote displays
CN103761315B (zh) 一种显示网页内容的方法及系统
US20130145241A1 (en) Automated augmentation of text, web and physical environments using multimedia content
US9224156B2 (en) Personalizing video content for Internet video streaming
WO2020001022A1 (zh) 图片展示方法、计算设备及计算机存储介质
US10728613B2 (en) Method and apparatus for content insertion during video playback, and storage medium
US11462009B2 (en) Dynamic image analysis and cropping
AU2012243007A1 (en) Gesture visualization and sharing between electronic devices and remote displays
CN103366607A (zh) 电子书系统及其共享附加页面信息的方法
CN106651992A (zh) 优化Android资源图片的方法及系统
CN104298423B (zh) 一种利用页面在终端上显示媒体文件的方法及装置
WO2022227974A1 (zh) 字幕处理方法、装置、设备及存储介质
CN107748688A (zh) 一种信息展示方法及装置
US9360339B2 (en) Rendering maps with canvas elements
CN105404612A (zh) 一种数字资源的显示方法及系统
US20230141277A1 (en) Immersive learning application framework for video with document overlay control
CN102663667B (zh) 触摸屏手写内容的存储方法、展示方法和终端设备
CN101616230A (zh) 具有文字说明功能的数码相框及其实现方法
US9542094B2 (en) Method and apparatus for providing layout based on handwriting input
WO2015180587A1 (zh) 一种图像的展示处理方法和装置
WO2014023078A1 (zh) 一种将gif图片转换到pdf文档后动态显示图片的方法
US20160011770A1 (en) Document autograph system and method
CN104572598A (zh) 数字出版物的排版方法和装置
CN109933262B (zh) 一种gif截屏方法及其装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13828189

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14419966

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13828189

Country of ref document: EP

Kind code of ref document: A1