CN103631964A - PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method - Google Patents

PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method Download PDF

Info

Publication number
CN103631964A
CN103631964A CN201310698005.1A CN201310698005A CN103631964A CN 103631964 A CN103631964 A CN 103631964A CN 201310698005 A CN201310698005 A CN 201310698005A CN 103631964 A CN103631964 A CN 103631964A
Authority
CN
China
Prior art keywords
pdf
html
content
file
canvas
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201310698005.1A
Other languages
Chinese (zh)
Inventor
侯锋
韩鹏
王燕霞
王少青
任小龙
陈锐
裴存亮
段建雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Academy of Science and Technology
Original Assignee
Chongqing Academy of Science and Technology
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 Chongqing Academy of Science and Technology filed Critical Chongqing Academy of Science and Technology
Priority to CN201310698005.1A priority Critical patent/CN103631964A/en
Publication of CN103631964A publication Critical patent/CN103631964A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention provides a PDF (portable document format)-embedded hypertext markup language (HTML) file shuffling method which comprises the steps of newly building a canvas in an editing tool, calling text, pictures and a PDF module component into the canvas, adjusting a module editor area and carrying out overall arrangement; adding concrete text and the content of the pictures into the positions of corresponding modules of the canvas, selecting a PDF file path, loading the PDF module and storing a PDF file into a temporary catalogue; analyzing the PDF file, acquiring the content of PDF home page, previewing and displaying; taking the PDF file relative path as a label and adding the label into the attribute of the canvas; determining the content of PDF home page, and carrying out zoom display according to a PDF display area arranged by the canvas; determining the display content of the canvas, converting the whole content information displayed by the modules in the canvas into the HTML format resource, storing and displaying. After the PDF-embedded HTML file shuffling method is adopted, the contents of the PDF file and the HTML file are effectively integrated with each other while being not damaged, the browsing effect of taking a browser as a PDF reader can be realized, and the amount of information contained by the HTML can be better enriched.

Description

The html file mixing method of embedded PDF a kind of
Technical field
The present invention relates to HMTL documenting and displaying field, be specifically related to the html file mixing method of embedded PDF a kind of.
Background technology
Html document can be independent of operating system, is since nineteen ninety just used as WorldWideWeb information representation language, is also one of maximum document representation form of application at present.In the process of network multimedia technology and the fast development of digital publishing technology, HTML is not only used for writing Web webpage, also more multiplexly carry out layout document, create list, connect and insert the content of multimedia such as audio frequency, video and hyperlink, become one of important means that digital content represents.
The current common mode that the embedded pdf document overwhelming majority of HTML writes by code or template is applied mechanically, position and size that pdf document can only limit according to template scale or code are written into and pull, for not possessing the user of webpage making and digital typesetting technique, there is suitable difficulty, and can not be according to user's idea organization number resource content.
Summary of the invention
In order to overcome the defect existing in above-mentioned prior art, a kind of html file mixing method that the object of this invention is to provide embedded PDF, the method does not effectively integrate the two when not destroying pdf document and this two kinds of formatted file contents of html file, realized and utilized browser as the result of browse of PDF reader, the quantity of information that HTML is comprised is abundanter.The present invention is the directly preview in edit tool of pdf document content, and carries out layout and size is adjusted.The effect that the final html file generating is seen on main flow browser is identical with the effect when the editor, greatly reduced user and made and embed PDF to the difficulty in html file.
In order to realize above-mentioned purpose of the present invention, the invention provides the html file mixing method of embedded PDF a kind of, comprise the steps:
S1: newly-built painting canvas in html file edit tool, text, picture and PDF assembly are called in to painting canvas, adjust assembly editing area layout;
S2: concrete text, image content are added in painting canvas corresponding assembly position, select pdf document path to be written into PDF assembly, and this document is deposited into temp directory;
S3: pdf document is resolved, obtain PDF homepage content and carry out preview displaying, add to pdf document relative path as label in painting canvas attribute;
S4: determine PDF homepage content, and press the PDF display area convergent-divergent displaying of painting canvas layout;
S5: determine painting canvas displaying content, the whole content information that painting canvas inner assembly is shown is converted into html format resource and preserves;
S6: show step S5 gained mixing html file in browser.
In a kind of preferred implementation of the present invention, the form of adjusting assembly editing area layout in described step S1 and being by mouse drag position and convergent-divergent size completes.
In another kind of preferred implementation of the present invention, in described step S3, utilize the poppler storehouse of increasing income to resolve pdf document, to obtain PDF homepage content be picture format and carry out preview displaying.
The invention has the beneficial effects as follows:
1, the present invention can add pdf document in edit tool and carry out layout and position size adjustment by mouse drag, and writes without code.
2, the present invention can carry out the preview of pdf document in edit tool, and user needn't use other reading tools can see the homepage content of pdf document.
3, the present invention preserves pdf document automatically to specifying temporary folder, finally obtains the path with respect to html file, and user does not worry that pdf document path error causes the problem that can not show in HTML.
4, the present invention uses ActiveX Techniques, adopt the cross-platform integrated Poppler of the Qt technology storehouse of increasing income, user does not need any technical foundation can realize the resource edit of What You See Is What You Get, by mouse, pull PDF control, be positioned over page optional position, facilitated integration and the making of digital resource wright for dissimilar digital content.
Additional aspect of the present invention and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Accompanying drawing explanation
Above-mentioned and/or additional aspect of the present invention and advantage accompanying drawing below combination obviously and is easily understood becoming the description of embodiment, wherein:
Fig. 1 is the mixing documents editing interface of embedded PDF in a kind of preferred implementation of the present invention;
Fig. 2 is that the html file of embedded PDF in a kind of preferred implementation of the present invention is at the bandwagon effect of Chrome browser;
Fig. 3 is that the html file of embedded PDF in a kind of preferred implementation of the present invention is at the bandwagon effect of Firefox browser.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Below by the embodiment being described with reference to the drawings, be exemplary, only for explaining the present invention, and can not be interpreted as limitation of the present invention.
A kind of html file mixing method that the invention provides embedded PDF, comprises the steps:
S1: newly-built painting canvas in html file edit tool, text, picture and PDF assembly are called in to painting canvas, adjust assembly editing area layout;
S2: concrete text, image content are added in painting canvas corresponding assembly position, select pdf document path to be written into PDF assembly, and this document is deposited into temp directory;
S3: pdf document is resolved, obtain PDF homepage content and carry out preview displaying, add to pdf document relative path as label in painting canvas attribute;
S4: determine PDF homepage content, and press the PDF display area convergent-divergent displaying of painting canvas layout;
S5: determine painting canvas displaying content, the whole content information that painting canvas inner assembly is shown is converted into html format resource and preserves;
S6: show step S5 gained mixing html file in browser.
In a kind of embodiment being more preferably of the present invention, the html file mixing method of embedded PDF specifically comprises the steps:
The first step: newly-built painting canvas in html file edit tool, text, picture and PDF assembly are called in to painting canvas, adjust assembly editing area layout.In the present embodiment, html file edit tool refers to Qt programming tool.
In the present embodiment, the concrete grammar of text, picture and PDF assembly being called in to painting canvas is: the assembly button on click tools bar, this assembly button, for adding the button of text, picture and PDF, adds the assemblies such as text, picture and PDF to painting canvas.
In the present embodiment, adjusting assembly editing area layout is that form by mouse drag position and convergent-divergent size completes.By the mouse event of monitoring users, utilize the movement locus that pulls the incompatible trace component of event group and the final position of mouse, the event that pulls of concrete mouse comprises mouse moving event mouseMoveEvent, drags arrival event dragEnterEvent and drags release event dropEvent; Monitor mouse and setting up the event of pressing mousePressEvent (), the moving event mouseMoveEvent () at edge and the change that release event mouseReleaseEvent () determines component size.
Second step: concrete text, image content are added in painting canvas corresponding assembly position, select pdf document path to be written into PDF assembly, and this document is deposited into temp directory.
First, concrete text, image content are added in painting canvas corresponding assembly position, select pdf document path and be written into PDF assembly, pdf document is copied to the temporary folder of appointment, and the path of temp directory is returned to PDF assembly and preserved.
When adding concrete text, image content, can also preserve the attribute of text, image content, specifically select text or picture, the attribute information such as content of edit, font, font size, alignment thereof in attributes edit module; Also picture can be set, whether equal proportion demonstration etc. of picture is set; Attribute is preserved.
The 3rd step: be written into after pdf document at second step, pdf document is resolved, obtain PDF homepage content and carry out preview displaying, add to pdf document relative path as label in painting canvas attribute.
In the present embodiment, by edit routine, the function that utilizes poppler to increase income in storehouse is resolved pdf document, and to obtain PDF homepage content be picture format and carry out preview displaying.First, the file path of PDF is set, then by content of pages, obtain the content that function page () reads pdf document first page, recycling bitmap generating function renderToImage () plays up a pictures the content of first page, finally this image content is filled into label area and carries out preview.
The 4th step: determine PDF homepage content, and carry out convergent-divergent displaying by the PDF display area of painting canvas layout.The PDF preview effect of seeing according to the 3rd step, drags PDF assembly size and the position that PDF homepage is shown at painting canvas is set, and determines arranging of all component on painting canvas.
The 5th step: determine painting canvas displaying content, the whole content information that painting canvas inner assembly is shown is converted into html format resource and preserves.
In the present embodiment, the content information that painting canvas inner assembly is shown is converted into html format resource and preserves, and specifically collects all component on painting canvas, travels through the attribute that each assembly securing component has set.Using each assembly as a div label, the attributes such as point of addition, size, resource.Then utilize html file constructor htmlBuild () to generate the file of a html form, it comprises the basic label such as html, head, body, more all div labels are added in the body of the html page.
The 6th step: use Chrome or Firefox browser to open the html file generating in the 5th step.Effect as shown in Figures 2 and 3.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And the specific features of description, structure, material or feature can be with suitable mode combinations in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, those having ordinary skill in the art will appreciate that: in the situation that not departing from principle of the present invention and aim, can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is limited by claim and equivalent thereof.

Claims (3)

1. a html file mixing method of embedded PDF, is characterized in that, comprises the steps:
S1: newly-built painting canvas in html file edit tool, text, picture and PDF assembly are called in to painting canvas, adjust assembly editing area layout;
S2: concrete text, image content are added in painting canvas corresponding assembly position, select pdf document path to be written into PDF assembly, and this document is deposited into temp directory;
S3: pdf document is resolved, obtain PDF homepage content and carry out preview displaying, add to pdf document relative path as label in painting canvas attribute;
S4: determine PDF homepage content, and press the PDF display area convergent-divergent displaying of painting canvas layout;
S5: determine painting canvas displaying content, the whole content information that painting canvas inner assembly is shown is converted into html format resource and preserves;
S6: show step S5 gained mixing html file in browser.
2. the html file mixing method of embedded PDF as claimed in claim 1, is characterized in that, the form of adjusting assembly editing area layout in described step S1 and being by mouse drag position and convergent-divergent size completes.
3. the html file mixing method of embedded PDF as claimed in claim 1, is characterized in that, utilizes the poppler storehouse of increasing income to resolve pdf document in described step S3, and to obtain PDF homepage content be picture format and carry out preview displaying.
CN201310698005.1A 2013-12-18 2013-12-18 PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method Pending CN103631964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310698005.1A CN103631964A (en) 2013-12-18 2013-12-18 PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310698005.1A CN103631964A (en) 2013-12-18 2013-12-18 PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method

Publications (1)

Publication Number Publication Date
CN103631964A true CN103631964A (en) 2014-03-12

Family

ID=50213005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310698005.1A Pending CN103631964A (en) 2013-12-18 2013-12-18 PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method

Country Status (1)

Country Link
CN (1) CN103631964A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942314A (en) * 2014-04-22 2014-07-23 重庆市科学技术研究院 HTML file image-text integrating display method
CN104079652A (en) * 2014-06-30 2014-10-01 广州视源电子科技股份有限公司 Method for making and playing HTML advertisement file
CN104951457A (en) * 2014-03-26 2015-09-30 腾讯科技(深圳)有限公司 Method and device for providing standard measuring scale on webpages
CN107230241A (en) * 2017-06-29 2017-10-03 武汉斗鱼网络科技有限公司 Picture and text mixing implementation method and device
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document
CN109960498A (en) * 2017-12-26 2019-07-02 深圳联友科技有限公司 A kind of html editor editor and upgrade method and device based on C++
CN110019037A (en) * 2018-03-29 2019-07-16 中国平安财产保险股份有限公司 A kind of pdf document methods of exhibiting, device, equipment and storage medium
CN110427584A (en) * 2019-07-11 2019-11-08 北京字节跳动网络技术有限公司 Page generation method, device, electronic equipment and computer readable storage medium
CN111199141A (en) * 2018-10-31 2020-05-26 阿里巴巴集团控股有限公司 Picture processing method and device and electronic equipment
CN111796818A (en) * 2019-10-16 2020-10-20 厦门雅基软件有限公司 Method and device for manufacturing multimedia file, electronic equipment and readable storage medium
CN112650714A (en) * 2020-12-22 2021-04-13 微民保险代理有限公司 Document display method, device, equipment and computer readable medium
CN113627126A (en) * 2021-08-09 2021-11-09 平安医疗健康管理股份有限公司 Website language-based PDF file generation method, device, equipment and storage medium
CN111144078B (en) * 2019-12-13 2023-09-01 平安银行股份有限公司 Method, device, server and storage medium for determining positions to be marked in PDF (portable document format) file

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951457A (en) * 2014-03-26 2015-09-30 腾讯科技(深圳)有限公司 Method and device for providing standard measuring scale on webpages
CN103942314B (en) * 2014-04-22 2018-01-02 重庆市科学技术研究院 A kind of html file picture and text mixing display methods
CN103942314A (en) * 2014-04-22 2014-07-23 重庆市科学技术研究院 HTML file image-text integrating display method
CN104079652A (en) * 2014-06-30 2014-10-01 广州视源电子科技股份有限公司 Method for making and playing HTML advertisement file
CN104079652B (en) * 2014-06-30 2018-01-23 广州视源电子科技股份有限公司 method for making and playing HTM (hypertext markup language) advertisement file
CN107230241B (en) * 2017-06-29 2021-01-01 武汉斗鱼网络科技有限公司 Image-text mixed arrangement implementation method and device
CN107230241A (en) * 2017-06-29 2017-10-03 武汉斗鱼网络科技有限公司 Picture and text mixing implementation method and device
CN109960498B (en) * 2017-12-26 2022-09-06 深圳联友科技有限公司 C + + based HTML editor editing and upgrading method and device
CN109960498A (en) * 2017-12-26 2019-07-02 深圳联友科技有限公司 A kind of html editor editor and upgrade method and device based on C++
CN110019037A (en) * 2018-03-29 2019-07-16 中国平安财产保险股份有限公司 A kind of pdf document methods of exhibiting, device, equipment and storage medium
CN110019037B (en) * 2018-03-29 2023-06-16 中国平安财产保险股份有限公司 PDF file display method, device, equipment and storage medium
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document
CN111199141A (en) * 2018-10-31 2020-05-26 阿里巴巴集团控股有限公司 Picture processing method and device and electronic equipment
CN111199141B (en) * 2018-10-31 2023-05-05 阿里巴巴集团控股有限公司 Picture processing method and device and electronic equipment
CN110427584A (en) * 2019-07-11 2019-11-08 北京字节跳动网络技术有限公司 Page generation method, device, electronic equipment and computer readable storage medium
CN111796818A (en) * 2019-10-16 2020-10-20 厦门雅基软件有限公司 Method and device for manufacturing multimedia file, electronic equipment and readable storage medium
CN111144078B (en) * 2019-12-13 2023-09-01 平安银行股份有限公司 Method, device, server and storage medium for determining positions to be marked in PDF (portable document format) file
CN112650714A (en) * 2020-12-22 2021-04-13 微民保险代理有限公司 Document display method, device, equipment and computer readable medium
CN112650714B (en) * 2020-12-22 2024-04-05 微民保险代理有限公司 Document display method, device, equipment and computer readable medium
CN113627126A (en) * 2021-08-09 2021-11-09 平安医疗健康管理股份有限公司 Website language-based PDF file generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103631964A (en) PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method
US11514234B2 (en) Method and system for annotation and connection of electronic documents
US8176417B2 (en) Constructing and maintaining web sites
CN103942314B (en) A kind of html file picture and text mixing display methods
US20080178122A1 (en) System and method for website configuration and management
CN102141985B (en) A kind of manuscript online editor
CN104239284A (en) Method and device for automatic image-text composition
US10049095B2 (en) In-context editing of output presentations via automatic pattern detection
CN107943915A (en) The method and device of OFD file Real time displayings based on HTML5
CN101980183A (en) Method for analyzing Word file information and system thereof
DE112015003612T5 (en) Summary views for ebooks
KR101709186B1 (en) Interactive multimedia E-book authoring apparatus and method
US20140359432A1 (en) Electronic document production system and electronic document production method thereof
US8650485B2 (en) Method for integrating really simple syndication documents
US20160364491A1 (en) Search results modulator
CN103294463A (en) Editing system and method
CN115309476A (en) Browser-based ofd file display and editing method
KR20140062547A (en) Device and method of modifying, making and administrating electronic documents using database
Moore PDF/A-3u as an archival format for accessible mathematics
CN101710952B (en) Method and system for storing and displaying EPG data in XML format
Fels et al. Sign language online with Signlink Studio 2.0
WO2014042053A1 (en) Electronic book creation device, viewer device, electronic book system, and electronic book creation method
CN102446199A (en) Method for integrating really simple syndication files
WO2014050960A1 (en) Electronic publication creation device, electronic publication creation method, electronic publication perusal system, viewer device, and electronic publication perusal method
KR101460788B1 (en) Method, server and computer-readable recording media for configurating a screen of web application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140312